forked from kubeflow/arena
-
Notifications
You must be signed in to change notification settings - Fork 0
/
submit.go
37 lines (33 loc) · 1.01 KB
/
submit.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package training
import "github.com/spf13/cobra"
var (
submitLong = `Submit a job.
Available Commands:
tfjob,tf Submit a TFJob.
pytorchjob,pytorch Submit a PyTorchJob.
mpijob,mpi Submit a MPIJob.
etjob,et Submit a ETJob.
horovod,hj Submit a Horovod Job.
volcanojob,vj Submit a VolcanoJob.
`
)
func NewSubmitCommand() *cobra.Command {
var command = &cobra.Command{
Use: "submit",
Short: "Submit a training job.",
Long: submitLong,
Run: func(cmd *cobra.Command, args []string) {
cmd.HelpFunc()(cmd, args)
},
}
command.AddCommand(NewSubmitTFJobCommand())
command.AddCommand(NewSubmitMPIJobCommand())
command.AddCommand(NewSubmitPytorchJobCommand())
command.AddCommand(NewSubmitHorovodJobCommand())
// Warning: Spark is not work,skip it
command.AddCommand(NewSubmitSparkJobCommand())
command.AddCommand(NewVolcanoJobCommand())
command.AddCommand(NewSubmitETJobCommand())
command.AddCommand(NewSubmitDeepSpeedJobCommand())
return command
}