| @@ -73,8 +73,6 @@ func GenerateTrainJob(ctx *context.Context, req *GenerateTrainJobReq) (err error | |||||
| ImageId: req.ImageId, | ImageId: req.ImageId, | ||||
| ImageUrl: req.ImageUrl, | ImageUrl: req.ImageUrl, | ||||
| ReplicaNum: 1, | ReplicaNum: 1, | ||||
| CenterName: []string{"成都智算"}, | |||||
| CenterID: []string{"chengdu"}, | |||||
| }, | }, | ||||
| }, | }, | ||||
| }) | }) | ||||
| @@ -1177,7 +1177,7 @@ model.manage.model_manage = ModelManage | |||||
| model.manage.model_accuracy = Model Accuracy | model.manage.model_accuracy = Model Accuracy | ||||
| grampus.train_job.ai_center = AI Center | 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.items = Template Items | ||||
| template.git_content = Git Content (Default Branch) | template.git_content = Git Content (Default Branch) | ||||
| @@ -1191,7 +1191,7 @@ model.manage.model_manage = 模型管理 | |||||
| model.manage.model_accuracy = 模型精度 | model.manage.model_accuracy = 模型精度 | ||||
| grampus.train_job.ai_center=智算中心 | 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.items=模板选项 | ||||
| template.git_content=Git数据(默认分支) | template.git_content=Git数据(默认分支) | ||||
| @@ -610,14 +610,24 @@ func generateCommand(repoName, processorType, codeRemotePath, dataRemotePath, bo | |||||
| command += commandDownload | command += commandDownload | ||||
| } | } | ||||
| //check download result | |||||
| commandCheckRes := "bash -c \"[[ $? -eq 0 ]] && exit 0 || exit -1;\"" | |||||
| command += commandCheckRes | |||||
| //unzip code & dataset | //unzip code & dataset | ||||
| toolUnzip := "unzip -q " | toolUnzip := "unzip -q " | ||||
| if strings.HasSuffix(datasetName, ".tar.gz") { | if strings.HasSuffix(datasetName, ".tar.gz") { | ||||
| toolUnzip = "tar -zxvf " | 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 | 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 | //exec code | ||||
| var parameters models.Parameters | var parameters models.Parameters | ||||
| var paramCode string | var paramCode string | ||||
| @@ -655,7 +665,7 @@ func generateCommand(repoName, processorType, codeRemotePath, dataRemotePath, bo | |||||
| } | } | ||||
| //check exec result | //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 | command += commandCheckRes | ||||
| return command, nil | return command, nil | ||||