diff --git a/modules/cloudbrain/cloudbrain.go b/modules/cloudbrain/cloudbrain.go index 2a42d1a97..8de936485 100755 --- a/modules/cloudbrain/cloudbrain.go +++ b/modules/cloudbrain/cloudbrain.go @@ -21,6 +21,7 @@ const ( CodeMountPath = "/code" DataSetMountPath = "/dataset" ModelMountPath = "/model" + LogFile = "log.txt" BenchMarkMountPath = "/benchmark" BenchMarkResourceID = 1 Snn4imagenetMountPath = "/snn4imagenet" diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index ce4889042..8d1f071eb 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -1439,6 +1439,7 @@ func getTrainJobCommand(form auth.CreateCloudBrainForm) (string, error) { } var parameters models.Parameters + var param string if len(params) != 0 { err := json.Unmarshal([]byte(params), ¶meters) if err != nil { @@ -1447,11 +1448,11 @@ func getTrainJobCommand(form auth.CreateCloudBrainForm) (string, error) { } for _, parameter := range parameters.Parameter { - command += "export " + parameter.Label + "=" + parameter.Value + ";" + param += " --" + parameter.Label + "=" + parameter.Value } } - command += "python /code/" + bootFile + command += "python /code/" + bootFile + param + " > " + cloudbrain.ModelMountPath + "/" + cloudbrain.LogFile return command, nil }