Browse Source

mod dir

tags/v1.22.6.2
lewis 3 years ago
parent
commit
47b4b6a1bd
4 changed files with 14 additions and 6 deletions
  1. +0
    -2
      modules/grampus/grampus.go
  2. +1
    -1
      options/locale/locale_en-US.ini
  3. +1
    -1
      options/locale/locale_zh-CN.ini
  4. +12
    -2
      routers/repo/grampus.go

+ 0
- 2
modules/grampus/grampus.go View File

@@ -73,8 +73,6 @@ func GenerateTrainJob(ctx *context.Context, req *GenerateTrainJobReq) (err error
ImageId: req.ImageId,
ImageUrl: req.ImageUrl,
ReplicaNum: 1,
CenterName: []string{"成都智算"},
CenterID: []string{"chengdu"},
},
},
})


+ 1
- 1
options/locale/locale_en-US.ini View File

@@ -1177,7 +1177,7 @@ model.manage.model_manage = ModelManage
model.manage.model_accuracy = Model Accuracy

grampus.train_job.ai_center = AI Center
grampus.dataset_path_rule = The code is storaged in /tmp/code;the dataset is storaged in /tmp/dataset;and please put your model into /tmp/output, then you can download it online。
grampus.dataset_path_rule = The code is storaged in /cache/code;the dataset is storaged in /cache/dataset;and please put your model into /cache/output, then you can download it online。

template.items = Template Items
template.git_content = Git Content (Default Branch)


+ 1
- 1
options/locale/locale_zh-CN.ini View File

@@ -1191,7 +1191,7 @@ model.manage.model_manage = 模型管理
model.manage.model_accuracy = 模型精度

grampus.train_job.ai_center=智算中心
grampus.dataset_path_rule = 训练脚本存储在/tmp/code中,数据集存储在/tmp/dataset中,训练输出请存储在/tmp/output中以供后续下载。
grampus.dataset_path_rule = 训练脚本存储在/cache/code中,数据集存储在/cache/dataset中,训练输出请存储在/cache/output中以供后续下载。

template.items=模板选项
template.git_content=Git数据(默认分支)


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

@@ -610,14 +610,24 @@ func generateCommand(repoName, processorType, codeRemotePath, dataRemotePath, bo
command += commandDownload
}

//check download result
commandCheckRes := "bash -c \"[[ $? -eq 0 ]] && exit 0 || exit -1;\""
command += commandCheckRes

//unzip code & dataset
toolUnzip := "unzip -q "
if strings.HasSuffix(datasetName, ".tar.gz") {
toolUnzip = "tar -zxvf "
}
commandUnzip := "cd /cache/dataset;" + toolUnzip + datasetName + ";cd /cache/code;unzip -q master.zip;"
commandUnzip := "cd /cache/code;unzip -q master.zip;echo \"start to unzip dataset\";cd /cache/dataset;" + toolUnzip + datasetName + ";"
command += commandUnzip

//check unzip result
commandCheckRes = "bash -c \"[[ $? -eq 0 ]] && exit 0 || exit -1;\""
command += commandCheckRes

command += "echo \"unzip finished;start to exec code;\""

//exec code
var parameters models.Parameters
var paramCode string
@@ -655,7 +665,7 @@ func generateCommand(repoName, processorType, codeRemotePath, dataRemotePath, bo
}

//check exec result
commandCheckRes := "bash -c \"[[ $result -eq 0 ]] && exit 0 || exit -1;\""
commandCheckRes = "bash -c \"[[ $result -eq 0 ]] && exit 0 || exit -1;\""
command += commandCheckRes

return command, nil


Loading…
Cancel
Save