From 7b70f61bf7a5559aad45212187fd3cae22d0fa77 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Thu, 8 Dec 2022 15:51:51 +0800 Subject: [PATCH 1/4] fix issue --- web_src/vuepages/pages/notebook/debug/index.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web_src/vuepages/pages/notebook/debug/index.vue b/web_src/vuepages/pages/notebook/debug/index.vue index 77b2a7603..cac76a883 100644 --- a/web_src/vuepages/pages/notebook/debug/index.vue +++ b/web_src/vuepages/pages/notebook/debug/index.vue @@ -343,6 +343,9 @@ export default { if(err.response.status===403 && err.response.data.code===1 ){ location.href=`${AppSubUrl}/authentication/wechat/bind` } + if(err.response.status===401){ + location.href=`${AppSubUrl}/user/login` + } this.btnStatus[index]=0 this.alertCb = false Message.error(err) From 775db3b9a845d2f26803d068b0e2f1155db07c61 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Mon, 12 Dec 2022 17:36:07 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/grampus/grampus.go | 10 ---------- routers/repo/grampus.go | 8 -------- 2 files changed, 18 deletions(-) diff --git a/modules/grampus/grampus.go b/modules/grampus/grampus.go index 5854ba051..06ef09bfb 100755 --- a/modules/grampus/grampus.go +++ b/modules/grampus/grampus.go @@ -188,16 +188,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/routers/repo/grampus.go b/routers/repo/grampus.go index 3011ccd79..3e693a7b1 100755 --- a/routers/repo/grampus.go +++ b/routers/repo/grampus.go @@ -106,7 +106,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 @@ -223,12 +222,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 { @@ -258,7 +251,6 @@ func GrampusNotebookCreate(ctx *context.Context, form auth.CreateGrampusNotebook Spec: spec, CodeStoragePath: codeStoragePath, CodeName: strings.ToLower(repo.Name), - ModelPath: modelStoragePath + README, } if form.ModelName != "" { //使用预训练模型训练 From ac6e4f039e9c762474765e8f72e0dbc32374194a Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Mon, 12 Dec 2022 17:46:19 +0800 Subject: [PATCH 3/4] fix issue --- options/locale/locale_en-US.ini | 1 + options/locale/locale_zh-CN.ini | 1 + templates/repo/grampus/notebook/gpu/new.tmpl | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index aa6df19de..ddc26257d 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -3295,6 +3295,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 319695119..c2518a0cd 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -3316,6 +3316,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/templates/repo/grampus/notebook/gpu/new.tmpl b/templates/repo/grampus/notebook/gpu/new.tmpl index 943bdf60e..da3522471 100644 --- a/templates/repo/grampus/notebook/gpu/new.tmpl +++ b/templates/repo/grampus/notebook/gpu/new.tmpl @@ -62,7 +62,7 @@ {{template "custom/task_wait_count" .}}
- {{.i18n.Tr "cloudbrain.new_debug_gpu_tooltips" "/code" "/dataset" "/pretrainmodel" "/model" | Safe}} + {{.i18n.Tr "cloudbrain.new_debug_gpu_tooltips1" "/code" "/dataset" "/pretrainmodel" | Safe}}
From 9c2db2aebad450b59f252df7b63189c3c57cfe3d Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Tue, 13 Dec 2022 09:35:31 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/repo/grampus.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/routers/repo/grampus.go b/routers/repo/grampus.go index 3e693a7b1..f471f0c4d 100755 --- a/routers/repo/grampus.go +++ b/routers/repo/grampus.go @@ -1675,7 +1675,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 } @@ -1690,6 +1696,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,