Skip to content

Commit d54a264

Browse files
authored
feat(cmd): set raw flag default to true for attach, build, upload (#323)
Signed-off-by: chlins <[email protected]>
1 parent cfa3cef commit d54a264

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

cmd/attach.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func init() {
5757
flags.BoolVarP(&attachConfig.Force, "force", "f", false, "turning on this flag will force the attach, which will overwrite the layer if it already exists with same filepath")
5858
flags.BoolVar(&attachConfig.Nydusify, "nydusify", false, "[EXPERIMENTAL] nydusify the model artifact")
5959
flags.MarkHidden("nydusify")
60-
flags.BoolVar(&attachConfig.Raw, "raw", false, "turning on this flag will attach model artifact layer in raw format")
60+
flags.BoolVar(&attachConfig.Raw, "raw", true, "turning on this flag will attach model artifact layer in raw format")
6161
flags.BoolVar(&attachConfig.Config, "config", false, "turning on this flag will overwrite model artifact config layer")
6262

6363
if err := viper.BindPFlags(flags); err != nil {

cmd/build.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ func init() {
5959
flags.MarkHidden("nydusify")
6060
flags.StringVar(&buildConfig.SourceURL, "source-url", "", "source URL")
6161
flags.StringVar(&buildConfig.SourceRevision, "source-revision", "", "source revision")
62-
// TODO: set the raw flag to true by default in future.
63-
flags.BoolVar(&buildConfig.Raw, "raw", false, "turning on this flag will build model artifact layers in raw format")
62+
flags.BoolVar(&buildConfig.Raw, "raw", true, "turning on this flag will build model artifact layers in raw format")
6463
flags.BoolVar(&buildConfig.Reasoning, "reasoning", false, "turning on this flag will mark this model as reasoning model in the config")
6564
flags.BoolVar(&buildConfig.NoCreationTime, "no-creation-time", false, "turning on this flag will not set createdAt in the config, which will be helpful for repeated builds")
6665

cmd/upload.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func init() {
5252
flags.StringVarP(&uploadConfig.Repo, "repo", "", "", "target model artifact repository name")
5353
flags.BoolVarP(&uploadConfig.PlainHTTP, "plain-http", "", false, "turning on this flag will use plain HTTP instead of HTTPS")
5454
flags.BoolVarP(&uploadConfig.Insecure, "insecure", "", false, "turning on this flag will disable TLS verification")
55-
flags.BoolVar(&uploadConfig.Raw, "raw", false, "turning on this flag will upload model artifact layer in raw format")
55+
flags.BoolVar(&uploadConfig.Raw, "raw", true, "turning on this flag will upload model artifact layer in raw format")
5656

5757
if err := viper.BindPFlags(flags); err != nil {
5858
panic(fmt.Errorf("bind cache list flags to viper: %w", err))

0 commit comments

Comments
 (0)