Skip to content

Commit

Permalink
Making model module arg optional
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarElChamaa committed Apr 8, 2024
1 parent dee239f commit 400b8ea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/downloader/model/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,15 @@ func (a *Args) ToCobraTokenizer(cmd *cobra.Command) {
func (a *Args) ToPython() []string {

// Mandatory arguments
cmdArgs := []string{TagPrefix + EmfClient, TagPrefix + Overwrite, a.DirectoryPath, a.ModelName, a.ModelModule}
cmdArgs := []string{TagPrefix + EmfClient, TagPrefix + Overwrite, a.DirectoryPath, a.ModelName}

// Optional arguments regarding the model
if a.ModelClass != "" {
cmdArgs = append(cmdArgs, TagPrefix+ModelClass, a.ModelClass)
}
if a.ModelModule != "" {
cmdArgs = append(cmdArgs, TagPrefix+ModelModule, a.ModelModule)
}
if len(a.ModelOptions) != 0 {
var options []string
for _, modelOption := range a.ModelOptions {
Expand Down

0 comments on commit 400b8ea

Please sign in to comment.