diff --git a/modules/grampus/grampus.go b/modules/grampus/grampus.go index bc9a35861..321abba9c 100755 --- a/modules/grampus/grampus.go +++ b/modules/grampus/grampus.go @@ -189,16 +189,6 @@ func GenerateNotebookJob(ctx *context.Context, req *GenerateNotebookJobReq) (job ContainerPath: cloudbrain.PretrainModelMountPath, }) } - - datasetGrampus = append(datasetGrampus, models.GrampusDataset{ - Name: "modelOutput", - Bucket: setting.Attachment.Minio.Bucket, - EndPoint: setting.Attachment.Minio.Endpoint, - ReadOnly: false, - ObjectKey: req.ModelPath, - ContainerPath: cloudbrain.ModelMountPath, - }) - codeGrampus = models.GrampusDataset{ Name: req.CodeName, Bucket: setting.Attachment.Minio.Bucket, diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index d9e8a966e..32144a14d 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -3303,6 +3303,7 @@ load_code_failed=Fail to load code, please check if the right branch is selected error.dataset_select = dataset select error:the count exceed the limit or has same name new_train_gpu_tooltips = The code is storaged in %s, the dataset is storaged in %s, the pre-trained model is storaged in the run parameter %s, and please put your model into %s then you can download it online new_debug_gpu_tooltips = The code is storaged in %s, the dataset is storaged in %s, the pre-trained model is storaged in the %s, and please put your model into %s then you can download it online +new_debug_gpu_tooltips1 = The code is storaged in %s, the dataset is storaged in %s, the pre-trained model is storaged in the %s. new_train_npu_tooltips = The code is storaged in %s, the pre-trained model is storaged in the run parameter %s, and please put your model into %s then you can download it online new_infer_gpu_tooltips = The dataset is stored in %s, the model file is stored in %s, please store the inference output in %s for subsequent downloads. code_obs_address = Code OBS address diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index d5b96b345..f1618449d 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -3324,6 +3324,7 @@ load_code_failed=代码加载失败,请确认选择了正确的分支。 error.dataset_select = 数据集选择错误:数量超过限制或者有同名数据集 new_train_gpu_tooltips = 训练脚本存储在 %s 中,数据集存储在 %s 中,预训练模型存放在运行参数 %s 中,训练输出请存储在 %s 中以供后续下载。 new_debug_gpu_tooltips = 项目代码存储在 %s 中,数据集存储在 %s 中,选择的模型存储在 %s 中,调试输出请存储在 %s 中以供后续下载。 +new_debug_gpu_tooltips1 = 项目代码存储在 %s 中,数据集存储在 %s 中,选择的模型存储在 %s 中。 new_train_npu_tooltips = 训练脚本存储在 %s 中,预训练模型存放在运行参数 %s 中,训练输出请存储在 %s 中以供后续下载。 new_infer_gpu_tooltips = 数据集存储在 %s 中,模型文件存储在 %s 中,推理输出请存储在 %s 中以供后续下载。 code_obs_address = 代码obs地址 diff --git a/routers/repo/grampus.go b/routers/repo/grampus.go index fb47ccf1d..d029a6278 100755 --- a/routers/repo/grampus.go +++ b/routers/repo/grampus.go @@ -112,7 +112,6 @@ func GrampusNotebookCreate(ctx *context.Context, form auth.CreateGrampusNotebook image := strings.TrimSpace(form.Image) codeStoragePath := setting.CBCodePathPrefix + jobName + cloudbrain.CodeMountPath + "/" - modelStoragePath := setting.CBCodePathPrefix + jobName + cloudbrain.ModelMountPath + "/" tpl := tplGrampusNotebookGPUNew processType := grampus.ProcessorTypeGPU @@ -235,12 +234,6 @@ func GrampusNotebookCreate(ctx *context.Context, form auth.CreateGrampusNotebook ctx.RenderWithErr(ctx.Tr("cloudbrain.load_code_failed"), tpl, &form) return } - errStr := initModelPath(jobName, cloudbrain.ModelMountPath) - if errStr != "" { - grampusNotebookNewDataPrepare(ctx, processType) - ctx.RenderWithErr(ctx.Tr(errStr), tpl, &form) - return - } } else { @@ -270,7 +263,6 @@ func GrampusNotebookCreate(ctx *context.Context, form auth.CreateGrampusNotebook Spec: spec, CodeStoragePath: codeStoragePath, CodeName: strings.ToLower(repo.Name), - ModelPath: modelStoragePath + README, } if form.ModelName != "" { //使用预训练模型训练 @@ -1702,7 +1694,13 @@ func GrampusNotebookRestart(ctx *context.Context) { res, err := grampus.RestartNotebookJob(task.JobID) if err != nil { log.Error("ManageNotebook2(%s) failed:%v", task.DisplayJobName, err.Error(), ctx.Data["MsgID"]) - errorMsg = err.Error() + errorMsg = ctx.Tr("repo.debug_again_fail") + break + } + + if res.GrampusResult.ErrorCode != 0 || res.NewId == "" { + log.Error("ManageNotebook2 failed:" + res.GrampusResult.ErrorMsg) + errorMsg = ctx.Tr("repo.debug_again_fail") break } @@ -1717,6 +1715,8 @@ func GrampusNotebookRestart(ctx *context.Context) { Type: task.Type, Uuid: task.Uuid, Image: task.Image, + BranchName: task.BranchName, + DatasetName: task.DatasetName, ComputeResource: task.ComputeResource, Description: task.Description, CreatedUnix: createTime, diff --git a/templates/repo/grampus/notebook/gpu/new.tmpl b/templates/repo/grampus/notebook/gpu/new.tmpl index abf356339..5652df290 100644 --- a/templates/repo/grampus/notebook/gpu/new.tmpl +++ b/templates/repo/grampus/notebook/gpu/new.tmpl @@ -70,7 +70,7 @@ {{template "custom/task_wait_count" .}}