#3878 fix-3592

Merged
zouap merged 2 commits from fix-3718 into V20230322 1 year ago
  1. +2
    -2
      routers/repo/cloudbrain.go
  2. +2
    -2
      routers/repo/grampus.go

+ 2
- 2
routers/repo/cloudbrain.go View File

@@ -2886,7 +2886,7 @@ func getInferenceJobCommand(form auth.CreateCloudBrainInferencForm) (string, err
}
}

param += " --modelname" + "=" + form.CkptName
param += " --modelname" + "='" + form.CkptName + "'"

command += "python /code/" + bootFile + param + " > " + cloudbrain.ResultPath + "/" + form.DisplayJobName + "-" + cloudbrain.LogFile

@@ -2917,7 +2917,7 @@ func getTrainJobCommand(form auth.CreateCloudBrainForm) (string, error) {
}
}
if form.CkptName != "" {
param += " --ckpt_url" + "=" + "/pretrainmodel/" + form.CkptName
param += " --ckpt_url" + "=" + "'/pretrainmodel/" + form.CkptName + "'"
}

command += "python /code/" + bootFile + param + " > " + cloudbrain.ModelMountPath + "/" + form.DisplayJobName + "-" + cloudbrain.LogFile


+ 2
- 2
routers/repo/grampus.go View File

@@ -1754,12 +1754,12 @@ func generateCommand(repoName, processorType, bootFile, paramSrc, outputRemotePa
commandCode = "source /home/ma-user/.bashrc;python /home/ma-user/davinci/train/davincirun.py python /home/ma-user/openi.py " + paramCode + ";"
} else if processorType == grampus.ProcessorTypeGPU {
if pretrainModelFileName != "" {
paramCode += " --ckpt_url" + "=" + workDir + "pretrainmodel/" + pretrainModelFileName
paramCode += " --ckpt_url" + "='" + workDir + "pretrainmodel/" + pretrainModelFileName+"'"
}
commandCode = "cd " + workDir + "code/" + strings.ToLower(repoName) + ";python " + bootFile + paramCode + ";"
} else if processorType == grampus.ProcessorTypeGCU {
if pretrainModelFileName != "" {
paramCode += " --ckpt_url" + "=" + workDir + "pretrainmodel/" + pretrainModelFileName
paramCode += " --ckpt_url" + "='" + workDir + "pretrainmodel/" + pretrainModelFileName+"'"
}
commandCode = "cd " + workDir + "code/" + strings.ToLower(repoName) + ";python3 " + bootFile + paramCode + ";"
}


Loading…
Cancel
Save