Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/modelfile/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func init() {
flags.StringVar(&generateConfig.Precision, "precision", "", "specify model precision, such as bf16, fp16, int8, etc")
flags.StringVar(&generateConfig.Quantization, "quantization", "", "specify model quantization, such as awq, gptq, etc")
flags.StringVarP(&generateConfig.Output, "output", "O", ".", "specify the output path of modelfilem, must be a directory")
flags.BoolVar(&generateConfig.IgnoreUnrecognizedFileTypes, "ignore-unrecognized-file-types", false, "ignore the unrecognized file types in the workspace")
flags.BoolVar(&generateConfig.IgnoreUnrecognizedFileTypes, "ignore-unrecognized-file-types", false, "[deprecated] ignore the unrecognized file types in the workspace")
Comment thread
aftersnow marked this conversation as resolved.
Comment thread
aftersnow marked this conversation as resolved.
flags.BoolVar(&generateConfig.Overwrite, "overwrite", false, "overwrite the existing modelfile")

if err := viper.BindPFlags(flags); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/config/modelfile/modelfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type GenerateConfig struct {
Name string
Version string
Output string
IgnoreUnrecognizedFileTypes bool
IgnoreUnrecognizedFileTypes bool // [deprecated] will be removed in the next release
Comment thread
aftersnow marked this conversation as resolved.
Overwrite bool
Arch string
Family string
Expand Down Expand Up @@ -83,7 +83,7 @@ func (g *GenerateConfig) Validate() error {
// If the output path does not exist, we can create the modelfile.
if _, err := os.Stat(g.Output); err == nil {
if !g.Overwrite {
return fmt.Errorf("Modelfile already exists at %s - use --overwrite to overwrite", g.Output)
return fmt.Errorf("modelfile already exists at %s - use --overwrite to overwrite", g.Output)
Comment thread
aftersnow marked this conversation as resolved.
}
}

Expand Down
Loading