-
Notifications
You must be signed in to change notification settings - Fork 578
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add an experimental —x-flag to the commands to denote whether fast build/run/push is used.
- Loading branch information
Showing
8 changed files
with
40 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,7 @@ the prediction on that.`, | |
addDockerfileFlag(cmd) | ||
addGpusFlag(cmd) | ||
addSetupTimeoutFlag(cmd) | ||
addFastFlag(cmd) | ||
|
||
cmd.Flags().StringArrayVarP(&inputFlags, "input", "i", []string{}, "Inputs, in the form name=value. if value is prefixed with @, then it is read from a file on disk. E.g. -i [email protected]") | ||
cmd.Flags().StringVarP(&outPath, "output", "o", "", "Output path") | ||
|
@@ -126,7 +127,7 @@ func cmdPredict(cmd *cobra.Command, args []string) error { | |
Image: imageName, | ||
Volumes: volumes, | ||
Env: envFlags, | ||
}, false) | ||
}, false, buildFast) | ||
|
||
go func() { | ||
captureSignal := make(chan os.Signal, 1) | ||
|
@@ -152,7 +153,7 @@ func cmdPredict(cmd *cobra.Command, args []string) error { | |
Image: imageName, | ||
Volumes: volumes, | ||
Env: envFlags, | ||
}, false) | ||
}, false, buildFast) | ||
|
||
if err := predictor.Start(os.Stderr, timeout); err != nil { | ||
return err | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ Otherwise, it will build the model in the current directory and train it.`, | |
addUseCudaBaseImageFlag(cmd) | ||
addGpusFlag(cmd) | ||
addUseCogBaseImageFlag(cmd) | ||
addFastFlag(cmd) | ||
|
||
cmd.Flags().StringArrayVarP(&trainInputFlags, "input", "i", []string{}, "Inputs, in the form name=value. if value is prefixed with @, then it is read from a file on disk. E.g. -i [email protected]") | ||
cmd.Flags().StringArrayVarP(&trainEnvFlags, "env", "e", []string{}, "Environment variables, in the form name=value") | ||
|
@@ -108,7 +109,7 @@ func cmdTrain(cmd *cobra.Command, args []string) error { | |
Volumes: volumes, | ||
Env: trainEnvFlags, | ||
Args: []string{"python", "-m", "cog.server.http", "--x-mode", "train"}, | ||
}, true) | ||
}, true, buildFast) | ||
|
||
go func() { | ||
captureSignal := make(chan os.Signal, 1) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters