Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
pull/2480/head
zouap 3 years ago
parent
commit
7206f81f0e
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      routers/repo/ai_model_convert.go

+ 2
- 1
routers/repo/ai_model_convert.go View File

@@ -99,6 +99,7 @@ func createTrainJob(modelConvert *models.AiModelConvert, ctx *context.Context, m
mkModelPath(modelPath)
uploadCodeToMinio(modelPath, modelConvert.ID, ModelMountPath+"/")
command := getModelConvertCommand(modelConvert.ID, modelConvert.ModelPath)
log.Info("command=" + command)
dataActualPath := setting.Attachment.Minio.RealPath + modelRelativePath

if TrainResourceSpecs == nil {
@@ -170,7 +171,7 @@ func createTrainJob(modelConvert *models.AiModelConvert, ctx *context.Context, m
func getModelConvertCommand(name string, modelFile string) string {
var command string
bootFile := "convert_pytorch.py"
command += "python /code/" + bootFile + " --model " + modelFile + " > " + ModelMountPath + "/" + name + "-" + LogFile
command += "python3 /code/" + bootFile + " --model " + modelFile + " > " + ModelMountPath + "/" + name + "-" + LogFile
return command
}



Loading…
Cancel
Save