From d7007c9bb858a7a410748907794c356fd423805f Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Mon, 29 Aug 2022 11:00:36 +0800 Subject: [PATCH 01/29] fix-2788 --- models/dataset.go | 25 +++++++++++++++---------- routers/repo/dataset.go | 4 ++++ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/models/dataset.go b/models/dataset.go index e91adb7d2..0c26f5446 100755 --- a/models/dataset.go +++ b/models/dataset.go @@ -171,16 +171,17 @@ func (datasets DatasetList) loadAttachmentAttributes(opts *SearchDatasetOptions) } type SearchDatasetOptions struct { - Keyword string - OwnerID int64 - User *User - RepoID int64 - IncludePublic bool - RecommendOnly bool - Category string - Task string - License string - DatasetIDs []int64 + Keyword string + OwnerID int64 + User *User + RepoID int64 + IncludePublic bool + RecommendOnly bool + Category string + Task string + License string + DatasetIDs []int64 + ExcludeDatasetId int64 ListOptions SearchOrderBy IsOwner bool @@ -240,6 +241,10 @@ func SearchDatasetCondition(opts *SearchDatasetOptions) builder.Cond { cond = cond.And(builder.Eq{"dataset.repo_id": opts.RepoID}) } + if opts.ExcludeDatasetId > 0 { + cond = cond.And(builder.Neq{"dataset.id": opts.ExcludeDatasetId}) + } + if opts.PublicOnly { cond = cond.And(builder.Eq{"dataset.status": DatasetStatusPublic}) cond = cond.And(builder.Eq{"attachment.is_private": false}) diff --git a/routers/repo/dataset.go b/routers/repo/dataset.go index f047cdaa9..d65a9f2aa 100755 --- a/routers/repo/dataset.go +++ b/routers/repo/dataset.go @@ -529,6 +529,10 @@ func ReferenceDatasetAvailable(ctx *context.Context) { NeedAttachment: false, CloudBrainType: models.TypeCloudBrainAll, } + dataset, _ := models.GetDatasetByRepo(&models.Repository{ID: ctx.Repo.Repository.ID}) + if dataset != nil { + opts.ExcludeDatasetId = dataset.ID + } datasetMultiple(ctx, opts) } From f5803bc06f259394d69206be4c2dd18fd334c3e6 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Mon, 29 Aug 2022 11:01:40 +0800 Subject: [PATCH 02/29] fix issue --- options/locale/locale_en-US.ini | 4 +- templates/repo/datasets/index.tmpl | 2 +- .../js/components/dataset/selectDataset.vue | 40 +++++++++++-------- web_src/js/features/i18nVue.js | 4 +- 4 files changed, 28 insertions(+), 22 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 03ab37143..a5545be55 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -922,9 +922,9 @@ select_category = Select Category select_task = Select Research Direction/Application Area dataset_name_tooltips = Please enter letters, numbers, _ and - up to 100 characters. dataset_no_create = No dataset has been created yet -dataset_explain = Dataset: CloudBrain I provides CPU/GPU resources, Cloudbrain II provides Ascend NPU resources, and the data set used for debugging also needs to be uploaded to the corresponding environment; +dataset_explain = Dataset: CloudBrain I provides CPU/GPU resources, Cloudbrain II provides Ascend NPU resources, and the data set used for debugging also needs to be uploaded to the corresponding environment. dataset_instructions_for_use = Instructions for use: You can refer to Openi AI Collaboration Platform -dataset_camp_course = Newcomer Training Camp Course; +dataset_camp_course = Newcomer Training Camp Course. dataset_upload = Upload dataset_upload_status= Upload Status dataset_file_name = File Name diff --git a/templates/repo/datasets/index.tmpl b/templates/repo/datasets/index.tmpl index 405758f50..eb7bcec21 100755 --- a/templates/repo/datasets/index.tmpl +++ b/templates/repo/datasets/index.tmpl @@ -417,7 +417,7 @@
{{.i18n.Tr "dataset.dataset_explain"}}
{{.i18n.Tr "dataset.dataset_instructions_for_use"}}{{.i18n.Tr "dataset.dataset_camp_course"}}
+ href="https://git.openi.org.cn/zeizei/OpenI_Learning"> {{.i18n.Tr "dataset.dataset_camp_course"}}
diff --git a/web_src/js/components/dataset/selectDataset.vue b/web_src/js/components/dataset/selectDataset.vue index dbfa39340..ecce6b02f 100755 --- a/web_src/js/components/dataset/selectDataset.vue +++ b/web_src/js/components/dataset/selectDataset.vue @@ -11,9 +11,9 @@ v-if="benchmarkNew" class="label-fix-width" style="font-weight: normal" - >{{i18n.dataset_label}}{{ i18n.dataset_label }} - + {{i18n.dataset_select}} + >{{ i18n.dataset_select }} - + - {{i18n.dataset_unziping}} + {{ i18n.dataset_unziping }} - {{i18n.dataset_unzip_failed}} + {{ i18n.dataset_unzip_failed }} @@ -201,7 +205,11 @@ - + - {{i18n.dataset_unziping}} + {{ i18n.dataset_unziping }} - {{i18n.dataset_unzip_failed}} + {{ i18n.dataset_unzip_failed }} @@ -380,13 +388,13 @@ class="zip-loading" v-if="data.DecompressState === 2" > - {{i18n.dataset_unziping}} + {{ i18n.dataset_unziping }} - {{i18n.dataset_unzip_failed}} + {{ i18n.dataset_unzip_failed }} @@ -486,13 +494,13 @@ class="zip-loading" v-if="data.DecompressState === 2" > - {{i18n.dataset_unziping}} + {{ i18n.dataset_unziping }} - {{i18n.dataset_unzip_failed}} + {{ i18n.dataset_unzip_failed }} @@ -536,7 +544,7 @@ line-height: 40px; " > - {{i18n.dataset_selected}} + {{ i18n.dataset_selected }}
@@ -558,7 +566,7 @@ color: #fff; border: 1px solid #389e0d; " - >{{i18n.dataset_ok}}{{ i18n.dataset_ok }}
@@ -732,7 +740,6 @@ export default { .then((res) => { this.loadingCurrent = false; let data = JSON.parse(res.data.data); - console.log(data); this.currentDatasetList = this.transformeTreeData( data, "currentTree", @@ -996,7 +1003,6 @@ export default { location.href.indexOf("train-job") !== -1 || location.href.indexOf("inference") !== -1 ) { - console.log("this.benchmarkNew"); this.benchmarkNew = true; } if ( diff --git a/web_src/js/features/i18nVue.js b/web_src/js/features/i18nVue.js index 4740f01cb..d5154a74a 100644 --- a/web_src/js/features/i18nVue.js +++ b/web_src/js/features/i18nVue.js @@ -148,10 +148,10 @@ export const i18nVue = { downloads: "Downloads", not_link_dataset: "No datasets have been linked yet", no_link_dataset_tips1: - "You can display public datasets on the platform here by clicking the New Linked Dataset button.", + "You can display public datasets on the platform here by clicking the Linked Datasets button.", dataset_instructions_for_use: - "Instructions for use: You can refer to Openi AI Collaboration Platform ", + "Instructions for use: You can refer to OpenI AI Collaboration Platform ", dataset_camp_course: " Newcomer Training Camp Course", dataset_link_success: "Linked dataset succeeded!", dataset_link_failed: "Linked dataset Failed!", From b7fa0c58d9a04dfec0691b5496a873074a04b99e Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Mon, 29 Aug 2022 11:04:19 +0800 Subject: [PATCH 03/29] fix issue --- options/locale/locale_en-US.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index a5545be55..03ab37143 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -922,9 +922,9 @@ select_category = Select Category select_task = Select Research Direction/Application Area dataset_name_tooltips = Please enter letters, numbers, _ and - up to 100 characters. dataset_no_create = No dataset has been created yet -dataset_explain = Dataset: CloudBrain I provides CPU/GPU resources, Cloudbrain II provides Ascend NPU resources, and the data set used for debugging also needs to be uploaded to the corresponding environment. +dataset_explain = Dataset: CloudBrain I provides CPU/GPU resources, Cloudbrain II provides Ascend NPU resources, and the data set used for debugging also needs to be uploaded to the corresponding environment; dataset_instructions_for_use = Instructions for use: You can refer to Openi AI Collaboration Platform -dataset_camp_course = Newcomer Training Camp Course. +dataset_camp_course = Newcomer Training Camp Course; dataset_upload = Upload dataset_upload_status= Upload Status dataset_file_name = File Name From c0b34f910b1ce579a801fce61bfd6d161241b280 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Mon, 29 Aug 2022 11:16:44 +0800 Subject: [PATCH 04/29] fix issue --- options/locale/locale_en-US.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 03ab37143..b1a208044 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -924,7 +924,7 @@ dataset_name_tooltips = Please enter letters, numbers, _ and - up to 100 charact dataset_no_create = No dataset has been created yet dataset_explain = Dataset: CloudBrain I provides CPU/GPU resources, Cloudbrain II provides Ascend NPU resources, and the data set used for debugging also needs to be uploaded to the corresponding environment; dataset_instructions_for_use = Instructions for use: You can refer to Openi AI Collaboration Platform -dataset_camp_course = Newcomer Training Camp Course; +dataset_camp_course = OpenI_Learning; dataset_upload = Upload dataset_upload_status= Upload Status dataset_file_name = File Name @@ -1221,7 +1221,7 @@ model_Evaluation_not_created = Model evaluation has not been created repo_not_initialized = Code version: You have not initialized the code repository, please initialized first ; debug_task_running_limit =Running time: no more than 4 hours, it will automatically stop if it exceeds 4 hours; dataset_desc = Dataset: Cloud Brain 1 provides CPU/GPU,Cloud Brain 2 provides Ascend NPU.And dataset also needs to be uploaded to the corresponding environment; -platform_instructions = Instructions for use: You can refer to the Xiaobai training camp course of Openi AI collaboration platform. +platform_instructions = Instructions for use: You can refer to the OpenI_Learning course of Openi AI collaboration platform. model_not_exist = Model file: You do not have a model file yet, please generate and export the model through the training task first ; benchmark_leaderboards = Benchmark leaderboards From 7a347946b6594ac5df94a1274df5381971315539 Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 29 Aug 2022 11:25:41 +0800 Subject: [PATCH 05/29] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E7=9B=B8=E5=85=B3=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- options/locale/locale_en-US.ini | 10 +++++----- options/locale/locale_zh-CN.ini | 4 ++-- templates/repo/modelmanage/index.tmpl | 4 ++-- web_src/js/components/Model.vue | 2 +- web_src/js/features/i18nVue.js | 4 ++++ 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index a2e714465..1ea652a0b 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1140,7 +1140,7 @@ modelarts.train_job.compute_node=Compute Node modelarts.create_model = Create Model modelarts.model_label=Model Label modelarts.infer_dataset = Inference Dataset - +modelarts.train_job.label_place=Input labels, multiple labels are separated by spaces modelarts.train_job.basic_info=Basic Info modelarts.train_job.job_status=Job Status @@ -1221,7 +1221,7 @@ model_Evaluation_not_created = Model evaluation has not been created repo_not_initialized = Code version: You have not initialized the code repository, please initialized first ; debug_task_running_limit =Running time: no more than 4 hours, it will automatically stop if it exceeds 4 hours; dataset_desc = Dataset: Cloud Brain 1 provides CPU/GPU,Cloud Brain 2 provides Ascend NPU.And dataset also needs to be uploaded to the corresponding environment; -platform_instructions = Instructions for use: You can refer to the Xiaobai training camp course of Openi AI collaboration platform. +platform_instructions = Instructions for use: You can refer to the "Xiaobai training camp "course of Openi AI collaboration platform. model_not_exist = Model file: You do not have a model file yet, please generate and export the model through the training task first ; benchmark_leaderboards = Benchmark leaderboards @@ -1244,11 +1244,11 @@ model.convert=Model Transformation model.list=Model List model.manage.create_new_convert_task=Create Model Transformation Task -model.manage.notcreatemodel=No model has been created. +model.manage.notcreatemodel=No model has been created model.manage.init1=Code version: You have not initialized the code repository, please model.manage.init2=initialized first ; model.manage.createtrainjob_tip=Training task: you haven't created a training task, please create it first -model.manage.createtrainjob=Training task +model.manage.createtrainjob=Training task. model.manage.delete=Delete Model model.manage.delete_confirm=Are you sure to delete this model? Once this model is deleted, it cannot be restored. model.manage.select.trainjob=Select train task @@ -1261,7 +1261,7 @@ model.manage.modeldesc=Model description model.manage.baseinfo=Base Information modelconvert.notcreate=No model conversion task has been created. modelconvert.importfirst1=Please import first -modelconvert.importfirst2=download model +modelconvert.importfirst2=model modelconvert.importfirst3=, then converts it. modelconvert.download=Download modelconvert.taskname=Task name diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index c6cb6a576..8e09f6948 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -1261,7 +1261,7 @@ model.manage.notcreatemodel=未创建过模型 model.manage.init1=代码版本:您还没有初始化代码仓库,请先 model.manage.init2=创建代码版本; model.manage.createtrainjob_tip=训练任务:您还没创建过训练任务,请先创建 -model.manage.createtrainjob=训练任务 +model.manage.createtrainjob=训练任务。 model.manage.delete=删除模型 model.manage.delete_confirm=你确认删除该模型么?此模型一旦删除不可恢复。 model.manage.select.trainjob=选择训练任务 @@ -1274,7 +1274,7 @@ model.manage.modeldesc=模型描述 model.manage.baseinfo=基本信息 modelconvert.notcreate=未创建过模型转换任务 modelconvert.importfirst1=请您先导入 -modelconvert.importfirst2=模型下载 +modelconvert.importfirst2=模型 modelconvert.importfirst3=,然后再对其进行转换。 modelconvert.download=下载 modelconvert.taskname=任务名称 diff --git a/templates/repo/modelmanage/index.tmpl b/templates/repo/modelmanage/index.tmpl index 76739d80f..e03031abb 100644 --- a/templates/repo/modelmanage/index.tmpl +++ b/templates/repo/modelmanage/index.tmpl @@ -71,7 +71,7 @@ {{end}} {{if eq $.TRAIN_COUNT 0}}
{{$.i18n.Tr "repo.model.manage.createtrainjob_tip"}}{{$.i18n.Tr "repo.model.manage.createtrainjob"}}
+ href="{{.RepoLink}}/modelarts/train-job">{{$.i18n.Tr "repo.model.manage.createtrainjob"}} {{end}}
{{$.i18n.Tr "repo.platform_instructions"}}
@@ -330,7 +330,7 @@ .modal({ centered: false, onShow: function () { - $('#model_header').text("导入新模型") + $('#model_header').text({{.i18n.Tr "repo.model.manage.import_new_model"}}) $('input[name="Version"]').addClass('model_disabled') $('.ui.dimmer').css({ "background-color": "rgb(136, 136, 136,0.7)" }) $("#job-name").empty() diff --git a/web_src/js/components/Model.vue b/web_src/js/components/Model.vue index a76fe324b..0c2de478b 100644 --- a/web_src/js/components/Model.vue +++ b/web_src/js/components/Model.vue @@ -201,7 +201,7 @@ export default { .modal({ centered: false, onShow:function(){ - $('#model_header').text("创建模型新版本") + $('#model_header').text(this.i18n.model_create_version_title) $('input[name="Name"]').addClass('model_disabled') $('input[name="Name"]').attr('readonly','readonly') $('input[name="modelSelectedFile"]').attr('readonly','readonly') diff --git a/web_src/js/features/i18nVue.js b/web_src/js/features/i18nVue.js index 4740f01cb..b556152c0 100644 --- a/web_src/js/features/i18nVue.js +++ b/web_src/js/features/i18nVue.js @@ -95,6 +95,8 @@ export const i18nVue = { model_create_new_ver: "创建新版本", model_download: "下载", model_delete: "删除", + model_create_title: "导入新模型", + model_create_version_title: "创建模型新版本", }, US: { computer_vision: "computer vision", @@ -196,5 +198,7 @@ export const i18nVue = { model_create_new_ver: "New Version", model_download: "Download", model_delete: "Delete", + model_create_title: "Import new model", + model_create_version_title: "Create a new version of the model", }, }; From 9f25a8e92d3bc23aac890766ec113c27c58041ac Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 29 Aug 2022 11:35:19 +0800 Subject: [PATCH 06/29] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E7=9B=B8=E5=85=B3=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- options/locale/locale_en-US.ini | 4 +++- options/locale/locale_zh-CN.ini | 5 ++++- templates/repo/modelmanage/convertIndex.tmpl | 2 +- templates/repo/modelmanage/index.tmpl | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 1ea652a0b..983b5b9c6 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1221,7 +1221,9 @@ model_Evaluation_not_created = Model evaluation has not been created repo_not_initialized = Code version: You have not initialized the code repository, please initialized first ; debug_task_running_limit =Running time: no more than 4 hours, it will automatically stop if it exceeds 4 hours; dataset_desc = Dataset: Cloud Brain 1 provides CPU/GPU,Cloud Brain 2 provides Ascend NPU.And dataset also needs to be uploaded to the corresponding environment; -platform_instructions = Instructions for use: You can refer to the "Xiaobai training camp "course of Openi AI collaboration platform. +platform_instructions1 = Instructions for use: You can refer to the +platform_instructions2 = OpenI_Learning +platform_instructions3 = course of Openi AI collaboration platform. model_not_exist = Model file: You do not have a model file yet, please generate and export the model through the training task first ; benchmark_leaderboards = Benchmark leaderboards diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 8e09f6948..527df52d5 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -1234,7 +1234,10 @@ model_Evaluation_not_created = 未创建过评测任务 repo_not_initialized = 代码版本:您还没有初始化代码仓库,请先创建代码版本; debug_task_running_limit = 运行时长:最长不超过4个小时,超过4个小时将自动停止; dataset_desc = 数据集:云脑1提供 CPU / GPU 资源,云脑2提供 Ascend NPU 资源,调试使用的数据集也需要上传到对应的环境; -platform_instructions = 使用说明:可以参考启智AI协作平台小白训练营课程。 +platform_instructions1 = 使用说明:可以参考启智AI协作平台 +platform_instructions2 = 小白训练营课程 +platform_instructions3 = 。 + model_not_exist = 模型文件:您还没有模型文件,请先通过训练任务产生并 导出模型 ; benchmark_leaderboards = 基准测试排行榜 diff --git a/templates/repo/modelmanage/convertIndex.tmpl b/templates/repo/modelmanage/convertIndex.tmpl index 78806dff7..e093a1012 100644 --- a/templates/repo/modelmanage/convertIndex.tmpl +++ b/templates/repo/modelmanage/convertIndex.tmpl @@ -52,7 +52,7 @@ {{if eq .MODEL_COUNT 0}}
{{$.i18n.Tr "repo.modelconvert.importfirst1"}}{{$.i18n.Tr "repo.modelconvert.importfirst2"}}{{$.i18n.Tr "repo.modelconvert.importfirst3"}}
{{end}} -
{{$.i18n.Tr "repo.platform_instructions"}}
+
{{$.i18n.Tr "repo.platform_instructions1"}}{{$.i18n.Tr "repo.platform_instructions2"}}{{$.i18n.Tr "repo.platform_instructions3"}}
diff --git a/templates/repo/modelmanage/index.tmpl b/templates/repo/modelmanage/index.tmpl index e03031abb..fa1720904 100644 --- a/templates/repo/modelmanage/index.tmpl +++ b/templates/repo/modelmanage/index.tmpl @@ -73,7 +73,7 @@
{{$.i18n.Tr "repo.model.manage.createtrainjob_tip"}}{{$.i18n.Tr "repo.model.manage.createtrainjob"}}
{{end}} -
{{$.i18n.Tr "repo.platform_instructions"}}
+
{{$.i18n.Tr "repo.platform_instructions1"}}{{$.i18n.Tr "repo.platform_instructions2"}}{{$.i18n.Tr "repo.platform_instructions3"}}
From a0f2f7f5b693a11564b52091f468a54da2452853 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Mon, 29 Aug 2022 11:39:26 +0800 Subject: [PATCH 07/29] fix-2751 --- modules/cloudbrain/resty.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cloudbrain/resty.go b/modules/cloudbrain/resty.go index 8387d481a..170154643 100755 --- a/modules/cloudbrain/resty.go +++ b/modules/cloudbrain/resty.go @@ -93,7 +93,7 @@ sendjob: return nil, fmt.Errorf("resty get queues detail failed: %s", err) } - if jobResult.Code == errInvalidToken && retry < 1 { + if (res.StatusCode() == http.StatusUnauthorized || jobResult.Code == errInvalidToken) && retry < 1 { retry++ _ = loginCloudbrain() goto sendjob From 08c847d3deb9b7a5d27e46f1ed49ea0c5e8efafc Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 29 Aug 2022 14:11:35 +0800 Subject: [PATCH 08/29] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E7=9B=B8=E5=85=B3=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- web_src/js/components/Model.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web_src/js/components/Model.vue b/web_src/js/components/Model.vue index 0c2de478b..0a555588a 100644 --- a/web_src/js/components/Model.vue +++ b/web_src/js/components/Model.vue @@ -197,11 +197,12 @@ export default { this.getModelList() }, showcreateVue(name,version,label){ + let title= this.i18n.model_create_version_title; $('.ui.modal.second') .modal({ centered: false, onShow:function(){ - $('#model_header').text(this.i18n.model_create_version_title) + $('#model_header').text(title) $('input[name="Name"]').addClass('model_disabled') $('input[name="Name"]').attr('readonly','readonly') $('input[name="modelSelectedFile"]').attr('readonly','readonly') From c20e0d02eb18fb693a6d3475cb88c23086213022 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Mon, 29 Aug 2022 14:39:58 +0800 Subject: [PATCH 09/29] fix issue --- web_src/js/features/i18nVue.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/js/features/i18nVue.js b/web_src/js/features/i18nVue.js index d5154a74a..46f69928b 100644 --- a/web_src/js/features/i18nVue.js +++ b/web_src/js/features/i18nVue.js @@ -152,7 +152,7 @@ export const i18nVue = { dataset_instructions_for_use: "Instructions for use: You can refer to OpenI AI Collaboration Platform ", - dataset_camp_course: " Newcomer Training Camp Course", + dataset_camp_course: " OpenI_Learning", dataset_link_success: "Linked dataset succeeded!", dataset_link_failed: "Linked dataset Failed!", dataset_over_nums: "Linked over ? datasets!", From 6de04e8b1f8d044910c84d910159a769ef62dd5e Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 29 Aug 2022 14:45:12 +0800 Subject: [PATCH 10/29] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E7=9B=B8=E5=85=B3=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- options/locale/locale_en-US.ini | 6 +++--- templates/repo/modelmanage/convertIndex.tmpl | 4 ++-- templates/repo/modelmanage/index.tmpl | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 983b5b9c6..42f0e938a 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1221,7 +1221,7 @@ model_Evaluation_not_created = Model evaluation has not been created repo_not_initialized = Code version: You have not initialized the code repository, please initialized first ; debug_task_running_limit =Running time: no more than 4 hours, it will automatically stop if it exceeds 4 hours; dataset_desc = Dataset: Cloud Brain 1 provides CPU/GPU,Cloud Brain 2 provides Ascend NPU.And dataset also needs to be uploaded to the corresponding environment; -platform_instructions1 = Instructions for use: You can refer to the +platform_instructions1 = Instructions for use: You can refer to the platform_instructions2 = OpenI_Learning platform_instructions3 = course of Openi AI collaboration platform. model_not_exist = Model file: You do not have a model file yet, please generate and export the model through the training task first ; @@ -1262,9 +1262,9 @@ model.manage.modellabel=Model label model.manage.modeldesc=Model description model.manage.baseinfo=Base Information modelconvert.notcreate=No model conversion task has been created. -modelconvert.importfirst1=Please import first +modelconvert.importfirst1=Please import the modelconvert.importfirst2=model -modelconvert.importfirst3=, then converts it. +modelconvert.importfirst3=first, then converts it. modelconvert.download=Download modelconvert.taskname=Task name modelconvert.modelname=Model name diff --git a/templates/repo/modelmanage/convertIndex.tmpl b/templates/repo/modelmanage/convertIndex.tmpl index e093a1012..2f5ee6c35 100644 --- a/templates/repo/modelmanage/convertIndex.tmpl +++ b/templates/repo/modelmanage/convertIndex.tmpl @@ -50,9 +50,9 @@
{{$.i18n.Tr "repo.modelconvert.notcreate"}}
{{if eq .MODEL_COUNT 0}} -
{{$.i18n.Tr "repo.modelconvert.importfirst1"}}{{$.i18n.Tr "repo.modelconvert.importfirst2"}}{{$.i18n.Tr "repo.modelconvert.importfirst3"}}
+
{{$.i18n.Tr "repo.modelconvert.importfirst1"}} {{$.i18n.Tr "repo.modelconvert.importfirst2"}} {{$.i18n.Tr "repo.modelconvert.importfirst3"}}
{{end}} -
{{$.i18n.Tr "repo.platform_instructions1"}}{{$.i18n.Tr "repo.platform_instructions2"}}{{$.i18n.Tr "repo.platform_instructions3"}}
+
{{$.i18n.Tr "repo.platform_instructions1"}} {{$.i18n.Tr "repo.platform_instructions2"}} {{$.i18n.Tr "repo.platform_instructions3"}}
diff --git a/templates/repo/modelmanage/index.tmpl b/templates/repo/modelmanage/index.tmpl index fa1720904..3a5240768 100644 --- a/templates/repo/modelmanage/index.tmpl +++ b/templates/repo/modelmanage/index.tmpl @@ -71,9 +71,9 @@ {{end}} {{if eq $.TRAIN_COUNT 0}}
{{$.i18n.Tr "repo.model.manage.createtrainjob_tip"}}{{$.i18n.Tr "repo.model.manage.createtrainjob"}}
+ href="{{.RepoLink}}/modelarts/train-job"> {{$.i18n.Tr "repo.model.manage.createtrainjob"}} {{end}} -
{{$.i18n.Tr "repo.platform_instructions1"}}{{$.i18n.Tr "repo.platform_instructions2"}}{{$.i18n.Tr "repo.platform_instructions3"}}
+
{{$.i18n.Tr "repo.platform_instructions1"}} {{$.i18n.Tr "repo.platform_instructions2"}} {{$.i18n.Tr "repo.platform_instructions3"}}
From 9aa0c172d3fa0a644b6c391c0acb7f321c87ecae Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 29 Aug 2022 15:21:26 +0800 Subject: [PATCH 11/29] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E7=9B=B8=E5=85=B3=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- options/locale/locale_en-US.ini | 2 ++ options/locale/locale_zh-CN.ini | 2 ++ routers/repo/cloudbrain.go | 2 +- routers/repo/grampus.go | 2 +- routers/repo/modelarts.go | 42 +++++++++++++++++++-------------- 5 files changed, 30 insertions(+), 20 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index bb9edf61e..5eac4cf2e 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -959,6 +959,7 @@ unfavorite=Unlike favorite=Like disassociate=Disassociate benchmark_dataset_tip=Note: first use the dataset function to upload the model, and then select the model from the dataset list. +file_deleted=The file has been deleted [repo] owner = Owner @@ -1221,6 +1222,7 @@ model_Evaluation_not_created = Model evaluation has not been created repo_not_initialized = Code version: You have not initialized the code repository, please initialized first ; debug_task_running_limit =Running time: no more than 4 hours, it will automatically stop if it exceeds 4 hours; dataset_desc = Dataset: Cloud Brain 1 provides CPU/GPU,Cloud Brain 2 provides Ascend NPU.And dataset also needs to be uploaded to the corresponding environment; +platform_instructions = Instructions for use: You can refer to the OpenI_Learning course of Qizhi AI collaboration platform. platform_instructions1 = Instructions for use: You can refer to the platform_instructions2 = OpenI_Learning platform_instructions3 = course of Openi AI collaboration platform. diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 527df52d5..2fbd3ab52 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -965,6 +965,7 @@ unfavorite=取消收藏 favorite=收藏 disassociate=取消关联 benchmark_dataset_tip=说明:先使用数据集功能上传模型,然后从数据集列表选模型。 +file_deleted=文件已经被删除 [repo] owner=拥有者 @@ -1234,6 +1235,7 @@ model_Evaluation_not_created = 未创建过评测任务 repo_not_initialized = 代码版本:您还没有初始化代码仓库,请先创建代码版本; debug_task_running_limit = 运行时长:最长不超过4个小时,超过4个小时将自动停止; dataset_desc = 数据集:云脑1提供 CPU / GPU 资源,云脑2提供 Ascend NPU 资源,调试使用的数据集也需要上传到对应的环境; +platform_instructions = 使用说明:可以参考启智AI协作平台小白训练营课程。 platform_instructions1 = 使用说明:可以参考启智AI协作平台 platform_instructions2 = 小白训练营课程 platform_instructions3 = 。 diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index c1e89dde5..181ad6302 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -928,7 +928,7 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName, jobType models.Jo } } - ctx.Data["datasetDownload"] = GetCloudBrainDataSetInfo(task.Uuid, false) + ctx.Data["datasetDownload"] = GetCloudBrainDataSetInfo(task.Uuid, task.DatasetName, false, ctx) ctx.Data["task"] = task labelName := strings.Fields(task.LabelName) ctx.Data["LabelName"] = labelName diff --git a/routers/repo/grampus.go b/routers/repo/grampus.go index 33e111df2..3b19d9344 100755 --- a/routers/repo/grampus.go +++ b/routers/repo/grampus.go @@ -713,7 +713,7 @@ func GrampusTrainJobShow(ctx *context.Context) { taskList := make([]*models.Cloudbrain, 0) taskList = append(taskList, task) ctx.Data["version_list_task"] = taskList - ctx.Data["datasetDownload"] = GetCloudBrainDataSetInfo(task.Uuid, false) + ctx.Data["datasetDownload"] = GetCloudBrainDataSetInfo(task.Uuid, task.DatasetName, false, ctx) ctx.Data["canDownload"] = cloudbrain.CanModifyJob(ctx, task) ctx.Data["displayJobName"] = task.DisplayJobName diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index 40e8076fb..a4ce70b58 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -285,7 +285,7 @@ func NotebookShow(ctx *context.Context) { datasetDownload := make([]models.DatasetDownload, 0) if ctx.IsSigned { if task.Uuid != "" && task.UserID == ctx.User.ID { - datasetDownload = GetCloudBrainDataSetInfo(task.Uuid, true) + datasetDownload = GetCloudBrainDataSetInfo(task.Uuid, task.DatasetName, true, ctx) } } user, err := models.GetUserByID(task.UserID) @@ -331,34 +331,40 @@ func NotebookShow(ctx *context.Context) { ctx.HTML(200, tplModelArtsNotebookShow) } -func GetCloudBrainDataSetInfo(uuid string, isNeedDown bool) []models.DatasetDownload { +func GetCloudBrainDataSetInfo(uuid string, datasetname string, isNeedDown bool, ctx *context.Context) []models.DatasetDownload { datasetDownload := make([]models.DatasetDownload, 0) uuidList := strings.Split(uuid, ";") - for _, uuidStr := range uuidList { + datasetnameList := strings.Split(datasetname, ";") + for i, uuidStr := range uuidList { + name := "" + link := "" attachment, err := models.GetAttachmentByUUID(uuidStr) if err != nil { log.Error("GetAttachmentByUUID failed:%v", err.Error()) - return datasetDownload - } - dataset, err := models.GetDatasetByID(attachment.DatasetID) - if err != nil { - log.Error("GetDatasetByID failed:%v", err.Error()) - return datasetDownload - } - repo, err := models.GetRepositoryByID(dataset.RepoID) - if err != nil { - log.Error("GetRepositoryByID failed:%v", err.Error()) - return datasetDownload + name = datasetnameList[i] + "(" + ctx.Tr("dataset.file_deleted") + ")" + } else { + name = attachment.Name + dataset, err := models.GetDatasetByID(attachment.DatasetID) + if err != nil { + log.Error("GetDatasetByID failed:%v", err.Error()) + } else { + repo, err := models.GetRepositoryByID(dataset.RepoID) + if err != nil { + log.Error("GetRepositoryByID failed:%v", err.Error()) + } else { + link = repo.Link() + "/datasets" + } + } } url := "" if isNeedDown { url = attachment.S3DownloadURL() } datasetDownload = append(datasetDownload, models.DatasetDownload{ - DatasetName: attachment.Name, + DatasetName: name, DatasetDownloadLink: url, - RepositoryLink: repo.Link() + "/datasets", + RepositoryLink: link, }) } return datasetDownload @@ -1810,7 +1816,7 @@ func TrainJobShow(ctx *context.Context) { } else { VersionListTasks[i].Parameters = "" } - datasetList = append(datasetList, GetCloudBrainDataSetInfo(task.Uuid, false)) + datasetList = append(datasetList, GetCloudBrainDataSetInfo(task.Uuid, task.DatasetName, false, ctx)) VersionListTasks[i].CanDel = cloudbrain.CanDeleteJob(ctx, &task.Cloudbrain) VersionListTasks[i].CanModify = cloudbrain.CanModifyJob(ctx, &task.Cloudbrain) } @@ -2526,7 +2532,7 @@ func InferenceJobShow(ctx *context.Context) { ctx.Data["displayJobName"] = task.DisplayJobName ctx.Data["task"] = task ctx.Data["canDownload"] = cloudbrain.CanModifyJob(ctx, task) - ctx.Data["datasetDownload"] = GetCloudBrainDataSetInfo(task.Uuid, false) + ctx.Data["datasetDownload"] = GetCloudBrainDataSetInfo(task.Uuid, task.DatasetName, false, ctx) tempUids := []int64{} tempUids = append(tempUids, task.UserID) JobCreater, err := models.GetUserNamesByIDs(tempUids) From 7d9783847fd76be6af641e349ef2d9e0bc1b0c8c Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 29 Aug 2022 15:46:24 +0800 Subject: [PATCH 12/29] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E7=9B=B8=E5=85=B3=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- models/cloudbrain.go | 1 + routers/repo/cloudbrain.go | 2 +- routers/repo/grampus.go | 2 +- routers/repo/modelarts.go | 13 ++++++++----- templates/repo/cloudbrain/inference/show.tmpl | 8 +++++++- templates/repo/cloudbrain/show.tmpl | 8 +++++++- templates/repo/cloudbrain/trainjob/show.tmpl | 8 +++++++- templates/repo/grampus/trainjob/show.tmpl | 7 ++++++- templates/repo/modelarts/inferencejob/show.tmpl | 9 ++++++++- templates/repo/modelarts/notebook/show.tmpl | 9 ++++++++- 10 files changed, 54 insertions(+), 13 deletions(-) diff --git a/models/cloudbrain.go b/models/cloudbrain.go index a53bf0287..29b55b97e 100755 --- a/models/cloudbrain.go +++ b/models/cloudbrain.go @@ -1092,6 +1092,7 @@ type DatasetDownload struct { DatasetName string `json:"dataset_name"` DatasetDownloadLink string `json:"dataset_download_link"` RepositoryLink string `json:"repository_link"` + IsDelete bool `json:"is_delete"` } type DataSource struct { diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index 181ad6302..2d8bebf4b 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -928,7 +928,7 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName, jobType models.Jo } } - ctx.Data["datasetDownload"] = GetCloudBrainDataSetInfo(task.Uuid, task.DatasetName, false, ctx) + ctx.Data["datasetDownload"] = GetCloudBrainDataSetInfo(task.Uuid, task.DatasetName, false) ctx.Data["task"] = task labelName := strings.Fields(task.LabelName) ctx.Data["LabelName"] = labelName diff --git a/routers/repo/grampus.go b/routers/repo/grampus.go index 3b19d9344..6fc77a454 100755 --- a/routers/repo/grampus.go +++ b/routers/repo/grampus.go @@ -713,7 +713,7 @@ func GrampusTrainJobShow(ctx *context.Context) { taskList := make([]*models.Cloudbrain, 0) taskList = append(taskList, task) ctx.Data["version_list_task"] = taskList - ctx.Data["datasetDownload"] = GetCloudBrainDataSetInfo(task.Uuid, task.DatasetName, false, ctx) + ctx.Data["datasetDownload"] = GetCloudBrainDataSetInfo(task.Uuid, task.DatasetName, false) ctx.Data["canDownload"] = cloudbrain.CanModifyJob(ctx, task) ctx.Data["displayJobName"] = task.DisplayJobName diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index a4ce70b58..4a9b8c56f 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -285,7 +285,7 @@ func NotebookShow(ctx *context.Context) { datasetDownload := make([]models.DatasetDownload, 0) if ctx.IsSigned { if task.Uuid != "" && task.UserID == ctx.User.ID { - datasetDownload = GetCloudBrainDataSetInfo(task.Uuid, task.DatasetName, true, ctx) + datasetDownload = GetCloudBrainDataSetInfo(task.Uuid, task.DatasetName, true) } } user, err := models.GetUserByID(task.UserID) @@ -331,7 +331,7 @@ func NotebookShow(ctx *context.Context) { ctx.HTML(200, tplModelArtsNotebookShow) } -func GetCloudBrainDataSetInfo(uuid string, datasetname string, isNeedDown bool, ctx *context.Context) []models.DatasetDownload { +func GetCloudBrainDataSetInfo(uuid string, datasetname string, isNeedDown bool) []models.DatasetDownload { datasetDownload := make([]models.DatasetDownload, 0) uuidList := strings.Split(uuid, ";") @@ -339,10 +339,12 @@ func GetCloudBrainDataSetInfo(uuid string, datasetname string, isNeedDown bool, for i, uuidStr := range uuidList { name := "" link := "" + isDelete := false attachment, err := models.GetAttachmentByUUID(uuidStr) if err != nil { log.Error("GetAttachmentByUUID failed:%v", err.Error()) - name = datasetnameList[i] + "(" + ctx.Tr("dataset.file_deleted") + ")" + name = datasetnameList[i] + isDelete = true } else { name = attachment.Name dataset, err := models.GetDatasetByID(attachment.DatasetID) @@ -365,6 +367,7 @@ func GetCloudBrainDataSetInfo(uuid string, datasetname string, isNeedDown bool, DatasetName: name, DatasetDownloadLink: url, RepositoryLink: link, + IsDelete: isDelete, }) } return datasetDownload @@ -1816,7 +1819,7 @@ func TrainJobShow(ctx *context.Context) { } else { VersionListTasks[i].Parameters = "" } - datasetList = append(datasetList, GetCloudBrainDataSetInfo(task.Uuid, task.DatasetName, false, ctx)) + datasetList = append(datasetList, GetCloudBrainDataSetInfo(task.Uuid, task.DatasetName, false)) VersionListTasks[i].CanDel = cloudbrain.CanDeleteJob(ctx, &task.Cloudbrain) VersionListTasks[i].CanModify = cloudbrain.CanModifyJob(ctx, &task.Cloudbrain) } @@ -2532,7 +2535,7 @@ func InferenceJobShow(ctx *context.Context) { ctx.Data["displayJobName"] = task.DisplayJobName ctx.Data["task"] = task ctx.Data["canDownload"] = cloudbrain.CanModifyJob(ctx, task) - ctx.Data["datasetDownload"] = GetCloudBrainDataSetInfo(task.Uuid, task.DatasetName, false, ctx) + ctx.Data["datasetDownload"] = GetCloudBrainDataSetInfo(task.Uuid, task.DatasetName, false) tempUids := []int64{} tempUids = append(tempUids, task.UserID) JobCreater, err := models.GetUserNamesByIDs(tempUids) diff --git a/templates/repo/cloudbrain/inference/show.tmpl b/templates/repo/cloudbrain/inference/show.tmpl index 848ccfc20..4d7a3c1b6 100644 --- a/templates/repo/cloudbrain/inference/show.tmpl +++ b/templates/repo/cloudbrain/inference/show.tmpl @@ -500,7 +500,13 @@ {{range $m ,$n := $.datasetDownload}} - {{.DatasetName}} + + {{if .IsDelete}} + {{.DatasetName}}({{$.i18n.Tr "dataset.file_deleted"}}) + {{else}} + {{.DatasetName}} + {{end}} + {{end}} diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl index bdde80772..3c9a34127 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -498,7 +498,13 @@ {{range $m ,$n := $.datasetDownload}} - {{.DatasetName}} + + {{if .IsDelete}} + {{.DatasetName}}({{$.i18n.Tr "dataset.file_deleted"}}) + {{else}} + {{.DatasetName}} + {{end}} + {{end}} diff --git a/templates/repo/cloudbrain/trainjob/show.tmpl b/templates/repo/cloudbrain/trainjob/show.tmpl index 14967c900..233a184cd 100644 --- a/templates/repo/cloudbrain/trainjob/show.tmpl +++ b/templates/repo/cloudbrain/trainjob/show.tmpl @@ -464,7 +464,13 @@ {{range $m ,$n := $.datasetDownload}} - {{.DatasetName}} + + {{if .IsDelete}} + {{.DatasetName}}({{$.i18n.Tr "dataset.file_deleted"}}) + {{else}} + {{.DatasetName}} + {{end}} + {{end}} diff --git a/templates/repo/grampus/trainjob/show.tmpl b/templates/repo/grampus/trainjob/show.tmpl index 148de401c..5162acc84 100755 --- a/templates/repo/grampus/trainjob/show.tmpl +++ b/templates/repo/grampus/trainjob/show.tmpl @@ -419,7 +419,12 @@
{{range $m ,$n := $.datasetDownload}} - {{.DatasetName}} + {{if .IsDelete}} + {{.DatasetName}}({{$.i18n.Tr "dataset.file_deleted"}}) + {{else}} + {{.DatasetName}} + {{end}} + {{end}}
diff --git a/templates/repo/modelarts/inferencejob/show.tmpl b/templates/repo/modelarts/inferencejob/show.tmpl index e578e139c..b6ff20fc4 100644 --- a/templates/repo/modelarts/inferencejob/show.tmpl +++ b/templates/repo/modelarts/inferencejob/show.tmpl @@ -441,7 +441,14 @@ td, th { {{range $m ,$n := $.datasetDownload}} - {{.DatasetName}} + + {{if .IsDelete}} + {{.DatasetName}}({{$.i18n.Tr "dataset.file_deleted"}}) + {{else}} + {{.DatasetName}} + {{end}} + + {{end}} diff --git a/templates/repo/modelarts/notebook/show.tmpl b/templates/repo/modelarts/notebook/show.tmpl index a75fb6f89..516e6aeb0 100755 --- a/templates/repo/modelarts/notebook/show.tmpl +++ b/templates/repo/modelarts/notebook/show.tmpl @@ -439,7 +439,14 @@ {{range $.datasetDownload}} - {{.DatasetName}} + + + {{if .IsDelete}} + {{.DatasetName}}({{$.i18n.Tr "dataset.file_deleted"}}) + {{else}} + {{.DatasetName}} + {{end}} + {{.DatasetDownloadLink}} {{$.i18n.Tr "dataset.download_copy"}} From aa704e441c1a3e7001dff1ed058c919dca28cd0b Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 29 Aug 2022 15:58:43 +0800 Subject: [PATCH 13/29] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E7=9B=B8=E5=85=B3=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/inference/show.tmpl | 2 +- templates/repo/cloudbrain/show.tmpl | 2 +- templates/repo/cloudbrain/trainjob/show.tmpl | 2 +- templates/repo/grampus/trainjob/show.tmpl | 2 +- templates/repo/modelarts/inferencejob/show.tmpl | 2 +- templates/repo/modelarts/notebook/show.tmpl | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/repo/cloudbrain/inference/show.tmpl b/templates/repo/cloudbrain/inference/show.tmpl index 4d7a3c1b6..3ec01417e 100644 --- a/templates/repo/cloudbrain/inference/show.tmpl +++ b/templates/repo/cloudbrain/inference/show.tmpl @@ -501,7 +501,7 @@ {{range $m ,$n := $.datasetDownload}} - {{if .IsDelete}} + {{if eq .IsDelete true}} {{.DatasetName}}({{$.i18n.Tr "dataset.file_deleted"}}) {{else}} {{.DatasetName}} diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl index 3c9a34127..76363314d 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -499,7 +499,7 @@ {{range $m ,$n := $.datasetDownload}} - {{if .IsDelete}} + {{if eq .IsDelete true}} {{.DatasetName}}({{$.i18n.Tr "dataset.file_deleted"}}) {{else}} {{.DatasetName}} diff --git a/templates/repo/cloudbrain/trainjob/show.tmpl b/templates/repo/cloudbrain/trainjob/show.tmpl index 233a184cd..96f7c7380 100644 --- a/templates/repo/cloudbrain/trainjob/show.tmpl +++ b/templates/repo/cloudbrain/trainjob/show.tmpl @@ -465,7 +465,7 @@ {{range $m ,$n := $.datasetDownload}} - {{if .IsDelete}} + {{if eq .IsDelete true}} {{.DatasetName}}({{$.i18n.Tr "dataset.file_deleted"}}) {{else}} {{.DatasetName}} diff --git a/templates/repo/grampus/trainjob/show.tmpl b/templates/repo/grampus/trainjob/show.tmpl index 5162acc84..152d7a67f 100755 --- a/templates/repo/grampus/trainjob/show.tmpl +++ b/templates/repo/grampus/trainjob/show.tmpl @@ -419,7 +419,7 @@
{{range $m ,$n := $.datasetDownload}} - {{if .IsDelete}} + {{if eq .IsDelete true}} {{.DatasetName}}({{$.i18n.Tr "dataset.file_deleted"}}) {{else}} {{.DatasetName}} diff --git a/templates/repo/modelarts/inferencejob/show.tmpl b/templates/repo/modelarts/inferencejob/show.tmpl index b6ff20fc4..c3855cafd 100644 --- a/templates/repo/modelarts/inferencejob/show.tmpl +++ b/templates/repo/modelarts/inferencejob/show.tmpl @@ -442,7 +442,7 @@ td, th { {{range $m ,$n := $.datasetDownload}} - {{if .IsDelete}} + {{if eq .IsDelete true}} {{.DatasetName}}({{$.i18n.Tr "dataset.file_deleted"}}) {{else}} {{.DatasetName}} diff --git a/templates/repo/modelarts/notebook/show.tmpl b/templates/repo/modelarts/notebook/show.tmpl index 516e6aeb0..a86724380 100755 --- a/templates/repo/modelarts/notebook/show.tmpl +++ b/templates/repo/modelarts/notebook/show.tmpl @@ -441,7 +441,7 @@ - {{if .IsDelete}} + {{if eq .IsDelete true}} {{.DatasetName}}({{$.i18n.Tr "dataset.file_deleted"}}) {{else}} {{.DatasetName}} From 81b32161b6faf470d465419073bed562d1d4baed Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 29 Aug 2022 16:03:08 +0800 Subject: [PATCH 14/29] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E7=9B=B8=E5=85=B3=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/modelarts/trainjob/show.tmpl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/templates/repo/modelarts/trainjob/show.tmpl b/templates/repo/modelarts/trainjob/show.tmpl index 9cc7332d6..c1aaba6ad 100755 --- a/templates/repo/modelarts/trainjob/show.tmpl +++ b/templates/repo/modelarts/trainjob/show.tmpl @@ -489,7 +489,13 @@ {{if eq $k $m}} {{range $f ,$g := $n}} - {{.DatasetName}} + + {{if eq .IsDelete true}} + {{.DatasetName}}({{$.i18n.Tr "dataset.file_deleted"}}) + {{else}} + {{.DatasetName}} + {{end}} + {{end}} {{end}} From 4086db8b6c86bfeea19b36df3c65ff15187dff77 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Mon, 29 Aug 2022 17:30:40 +0800 Subject: [PATCH 15/29] fix issue --- templates/custom/wait_count.tmpl | 1 + templates/custom/wait_count_train.tmpl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/custom/wait_count.tmpl b/templates/custom/wait_count.tmpl index 072d1d40d..fde6fa82f 100644 --- a/templates/custom/wait_count.tmpl +++ b/templates/custom/wait_count.tmpl @@ -2,6 +2,7 @@ {{$queue := ""}} {{$gpuQueue := 0}} {{range $k,$v :=.gpu_types}} + {{ $v }} {{if eq $k 0}} {{ $queue = $v.Queue }} {{ end }} diff --git a/templates/custom/wait_count_train.tmpl b/templates/custom/wait_count_train.tmpl index 4b7e2dac3..9249b5676 100644 --- a/templates/custom/wait_count_train.tmpl +++ b/templates/custom/wait_count_train.tmpl @@ -18,7 +18,7 @@ > {{.ctx.i18n.Tr "repo.wait_count_start"}} - {{if .type}} + {{if .ctx.QueuesDetail}} {{ $gpuQueue }} {{else}} {{.ctx.WaitCount}} From b21ab772cb57945efaa81c229296fa0a9ba27c26 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Mon, 29 Aug 2022 17:31:31 +0800 Subject: [PATCH 16/29] fix issue --- templates/custom/wait_count.tmpl | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/custom/wait_count.tmpl b/templates/custom/wait_count.tmpl index fde6fa82f..072d1d40d 100644 --- a/templates/custom/wait_count.tmpl +++ b/templates/custom/wait_count.tmpl @@ -2,7 +2,6 @@ {{$queue := ""}} {{$gpuQueue := 0}} {{range $k,$v :=.gpu_types}} - {{ $v }} {{if eq $k 0}} {{ $queue = $v.Queue }} {{ end }} From 0ba254854ed1fed9ac0f575336a9db36a6cb0f48 Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 29 Aug 2022 17:35:59 +0800 Subject: [PATCH 17/29] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=A2=AB=E5=88=A0=E9=99=A4=E4=B9=8B=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=AD=A3=E5=B8=B8=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/modelarts.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index 4a9b8c56f..bfdcff6a4 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -957,10 +957,10 @@ func trainJobNewVersionDataPrepare(ctx *context.Context) error { return err } _, _, datasetNames, _, err := getDatasUrlListByUUIDS(task.Uuid) - if err != nil { - ctx.ServerError("GetAllUserAttachments failed:", err) - return err - } + // if err != nil { + // ctx.ServerError("GetAllUserAttachments failed:", err) + // return err + // } ctx.Data["branches"] = branches ctx.Data["branch_name"] = task.BranchName ctx.Data["description"] = task.Description From 60eb5c89f05d053340ea0475d00e8a93f8122ae3 Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 29 Aug 2022 17:38:25 +0800 Subject: [PATCH 18/29] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=A2=AB=E5=88=A0=E9=99=A4=E4=B9=8B=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=AD=A3=E5=B8=B8=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/modelarts.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index bfdcff6a4..6f5ffba00 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -957,15 +957,18 @@ func trainJobNewVersionDataPrepare(ctx *context.Context) error { return err } _, _, datasetNames, _, err := getDatasUrlListByUUIDS(task.Uuid) - // if err != nil { - // ctx.ServerError("GetAllUserAttachments failed:", err) - // return err - // } + if err != nil { + log.Info("query dataset error," + err.Error()) + //ctx.ServerError("GetAllUserAttachments failed:", err) + //return err + } else { + ctx.Data["dataset_name"] = datasetNames + } ctx.Data["branches"] = branches ctx.Data["branch_name"] = task.BranchName ctx.Data["description"] = task.Description ctx.Data["boot_file"] = task.BootFile - ctx.Data["dataset_name"] = datasetNames + ctx.Data["work_server_number"] = task.WorkServerNumber ctx.Data["flavor_name"] = task.FlavorName ctx.Data["engine_name"] = task.EngineName From bcc039a310896bb34789684a1ef9268650827063 Mon Sep 17 00:00:00 2001 From: chenshihai Date: Mon, 29 Aug 2022 17:53:43 +0800 Subject: [PATCH 19/29] update styles --- .../repo/modelarts/trainjob/version_new.tmpl | 44 +++++++++++++++++-- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/templates/repo/modelarts/trainjob/version_new.tmpl b/templates/repo/modelarts/trainjob/version_new.tmpl index c135bcd44..7343245df 100644 --- a/templates/repo/modelarts/trainjob/version_new.tmpl +++ b/templates/repo/modelarts/trainjob/version_new.tmpl @@ -73,12 +73,50 @@ - {{template "custom/wait_count_train" Dict "ctx" $}} -
+ +

{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}:

+ +
+ + +
+
+ {{template "custom/wait_count_train" Dict "ctx" $}} +
+
{{.i18n.Tr "cloudbrain.train_dataset_path_rule" | Safe}}
-

{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}:

From 8946d75efb7374a4431c8cbe1fe11e01791d5c29 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Mon, 29 Aug 2022 17:56:08 +0800 Subject: [PATCH 20/29] fix issue --- web_src/js/components/dataset/selectDataset.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web_src/js/components/dataset/selectDataset.vue b/web_src/js/components/dataset/selectDataset.vue index ecce6b02f..d411fd237 100755 --- a/web_src/js/components/dataset/selectDataset.vue +++ b/web_src/js/components/dataset/selectDataset.vue @@ -985,7 +985,10 @@ export default { let hasSelectDatasetName = $(".cloudbrain-type") .data("dataset-name") .split(";"); - if (this.hasSelectDatasetList.length !== 0) { + if ( + this.hasSelectDatasetList.length !== 0 && + hasSelectDatasetName[0] !== "" + ) { this.saveStatusList = this.hasSelectDatasetList; this.checkList = hasSelectDatasetName; this.hasSelectDatasetList.forEach((item, index) => { From fb275fafaccc4afb9c20a900b5a8fd6f42f84fca Mon Sep 17 00:00:00 2001 From: liuzx Date: Tue, 30 Aug 2022 10:02:53 +0800 Subject: [PATCH 21/29] add killing --- models/cloudbrain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/cloudbrain.go b/models/cloudbrain.go index dc11d3459..161e06f3f 100755 --- a/models/cloudbrain.go +++ b/models/cloudbrain.go @@ -1890,7 +1890,7 @@ func GetCloudbrainRunCountByRepoID(repoID int64) (int, error) { count, err := x.In("status", JobWaiting, JobRunning, ModelArtsCreateQueue, ModelArtsCreating, ModelArtsStarting, ModelArtsReadyToStart, ModelArtsResizing, ModelArtsStartQueuing, ModelArtsRunning, ModelArtsRestarting, ModelArtsTrainJobInit, ModelArtsTrainJobImageCreating, ModelArtsTrainJobSubmitTrying, ModelArtsTrainJobWaiting, ModelArtsTrainJobRunning, ModelArtsStopping, ModelArtsResizing, - ModelArtsTrainJobScaling, ModelArtsTrainJobCheckInit, ModelArtsTrainJobCheckRunning, ModelArtsTrainJobCheckRunningCompleted).And("repo_id = ?", repoID).Count(new(Cloudbrain)) + ModelArtsTrainJobScaling, ModelArtsTrainJobCheckInit, ModelArtsTrainJobCheckRunning, ModelArtsTrainJobKilling, ModelArtsTrainJobCheckRunningCompleted).And("repo_id = ?", repoID).Count(new(Cloudbrain)) return int(count), err } From 1d41d33a81a2c4541a09f09ae302e9e10cf69ea8 Mon Sep 17 00:00:00 2001 From: liuzx Date: Tue, 30 Aug 2022 11:54:25 +0800 Subject: [PATCH 22/29] add ModelArtsDeleting status --- models/cloudbrain.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/cloudbrain.go b/models/cloudbrain.go index 17fa2a69f..b22897438 100755 --- a/models/cloudbrain.go +++ b/models/cloudbrain.go @@ -71,6 +71,7 @@ const ( ModelArtsStopping ModelArtsJobStatus = "STOPPING" //停止中 ModelArtsStopped ModelArtsJobStatus = "STOPPED" //停止 ModelArtsUnavailable ModelArtsJobStatus = "UNAVAILABLE" //故障 + ModelArtsDeleting ModelArtsJobStatus = "DELETING" //删除中 ModelArtsDeleted ModelArtsJobStatus = "DELETED" //已删除 ModelArtsResizing ModelArtsJobStatus = "RESIZING" //规格变更中 ModelArtsResizFailed ModelArtsJobStatus = "RESIZE_FAILED" //规格变更失败 @@ -1889,7 +1890,7 @@ func GetCloudbrainCountByUserID(userID int64, jobType string) (int, error) { func GetCloudbrainRunCountByRepoID(repoID int64) (int, error) { count, err := x.In("status", JobWaiting, JobRunning, ModelArtsCreateQueue, ModelArtsCreating, ModelArtsStarting, - ModelArtsReadyToStart, ModelArtsResizing, ModelArtsStartQueuing, ModelArtsRunning, ModelArtsRestarting, ModelArtsTrainJobInit, + ModelArtsReadyToStart, ModelArtsResizing, ModelArtsStartQueuing, ModelArtsRunning, ModelArtsDeleting, ModelArtsRestarting, ModelArtsTrainJobInit, ModelArtsTrainJobImageCreating, ModelArtsTrainJobSubmitTrying, ModelArtsTrainJobWaiting, ModelArtsTrainJobRunning, ModelArtsStopping, ModelArtsResizing, ModelArtsTrainJobScaling, ModelArtsTrainJobCheckInit, ModelArtsTrainJobCheckRunning, ModelArtsTrainJobKilling, ModelArtsTrainJobCheckRunningCompleted).And("repo_id = ?", repoID).Count(new(Cloudbrain)) return int(count), err From 7e30906006e7590274b2602aabdc709c719f37d3 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 31 Aug 2022 09:28:19 +0800 Subject: [PATCH 23/29] =?UTF-8?q?=E8=A7=A3=E5=86=B3Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/modelarts.go | 4 +++- templates/repo/cloudbrain/trainjob/show.tmpl | 2 +- templates/repo/grampus/trainjob/show.tmpl | 2 +- templates/repo/modelarts/trainjob/show.tmpl | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index 6f5ffba00..32ef43a02 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -333,7 +333,9 @@ func NotebookShow(ctx *context.Context) { func GetCloudBrainDataSetInfo(uuid string, datasetname string, isNeedDown bool) []models.DatasetDownload { datasetDownload := make([]models.DatasetDownload, 0) - + if len(uuid) == 0 { + return datasetDownload + } uuidList := strings.Split(uuid, ";") datasetnameList := strings.Split(datasetname, ";") for i, uuidStr := range uuidList { diff --git a/templates/repo/cloudbrain/trainjob/show.tmpl b/templates/repo/cloudbrain/trainjob/show.tmpl index 96f7c7380..ba886cd2f 100644 --- a/templates/repo/cloudbrain/trainjob/show.tmpl +++ b/templates/repo/cloudbrain/trainjob/show.tmpl @@ -600,7 +600,7 @@
- + diff --git a/templates/repo/grampus/trainjob/show.tmpl b/templates/repo/grampus/trainjob/show.tmpl index 152d7a67f..1b6dfc901 100755 --- a/templates/repo/grampus/trainjob/show.tmpl +++ b/templates/repo/grampus/trainjob/show.tmpl @@ -556,7 +556,7 @@
- + diff --git a/templates/repo/modelarts/trainjob/show.tmpl b/templates/repo/modelarts/trainjob/show.tmpl index c1aaba6ad..73b8ac61a 100755 --- a/templates/repo/modelarts/trainjob/show.tmpl +++ b/templates/repo/modelarts/trainjob/show.tmpl @@ -610,7 +610,7 @@
- + From 2c95d6421e8d80bc5621d99ffd5ee45ef7750090 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Wed, 31 Aug 2022 09:46:54 +0800 Subject: [PATCH 24/29] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=B3=E8=81=94?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E6=9D=83=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/dataset.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/models/dataset.go b/models/dataset.go index 0c26f5446..22a20e328 100755 --- a/models/dataset.go +++ b/models/dataset.go @@ -121,8 +121,10 @@ func (datasets DatasetList) loadAttachmentAttributes(opts *SearchDatasetOptions) for i := range datasets { if attachment.DatasetID == datasets[i].ID { - if opts.StarByMe { + if !attachment.IsPrivate{ + datasets[i].Attachments = append(datasets[i].Attachments, attachment) + }else{ permission, ok := permissionMap[datasets[i].ID] if !ok { @@ -136,7 +138,7 @@ func (datasets DatasetList) loadAttachmentAttributes(opts *SearchDatasetOptions) } if !permission { isCollaborator, _ := datasets[i].Repo.IsCollaborator(opts.User.ID) - if isCollaborator { + if isCollaborator ||datasets[i].Repo.IsOwnedBy(opts.User.ID){ log.Info("Collaborator user may visit the attach.") permission = true } @@ -147,11 +149,7 @@ func (datasets DatasetList) loadAttachmentAttributes(opts *SearchDatasetOptions) if permission { datasets[i].Attachments = append(datasets[i].Attachments, attachment) - } else if !attachment.IsPrivate { - datasets[i].Attachments = append(datasets[i].Attachments, attachment) } - } else { - datasets[i].Attachments = append(datasets[i].Attachments, attachment) } } From 94b2b0c7a73ce29d4dd6208f01d0424c08c8299d Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 31 Aug 2022 10:15:29 +0800 Subject: [PATCH 25/29] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/modelarts.go | 9 +++++---- templates/repo/modelmanage/showinfo.tmpl | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index 32ef43a02..ee957db66 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -341,6 +341,7 @@ func GetCloudBrainDataSetInfo(uuid string, datasetname string, isNeedDown bool) for i, uuidStr := range uuidList { name := "" link := "" + url := "" isDelete := false attachment, err := models.GetAttachmentByUUID(uuidStr) if err != nil { @@ -360,11 +361,11 @@ func GetCloudBrainDataSetInfo(uuid string, datasetname string, isNeedDown bool) link = repo.Link() + "/datasets" } } + if isNeedDown { + url = attachment.S3DownloadURL() + } } - url := "" - if isNeedDown { - url = attachment.S3DownloadURL() - } + datasetDownload = append(datasetDownload, models.DatasetDownload{ DatasetName: name, DatasetDownloadLink: url, diff --git a/templates/repo/modelmanage/showinfo.tmpl b/templates/repo/modelmanage/showinfo.tmpl index 4acf394f2..e18c6bd99 100644 --- a/templates/repo/modelmanage/showinfo.tmpl +++ b/templates/repo/modelmanage/showinfo.tmpl @@ -125,7 +125,7 @@ - {{$.i18n.Tr "repo.model.manage.createtrainjob"}} + {{$.i18n.Tr "repo.modelarts.train_job"}} From 5d53836348c8cfcddfb831104d30349a8f4894e3 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 31 Aug 2022 10:29:28 +0800 Subject: [PATCH 26/29] =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E8=A7=A3=E5=86=B3Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/modelarts.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index ee957db66..083bce92d 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -346,6 +346,9 @@ func GetCloudBrainDataSetInfo(uuid string, datasetname string, isNeedDown bool) attachment, err := models.GetAttachmentByUUID(uuidStr) if err != nil { log.Error("GetAttachmentByUUID failed:%v", err.Error()) + if len(datasetnameList) <= i { + continue + } name = datasetnameList[i] isDelete = true } else { From efc5d33b5a43217b44b7bf4d1a1c3bd3ebff190f Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 31 Aug 2022 11:14:22 +0800 Subject: [PATCH 27/29] =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E8=A7=A3=E5=86=B3Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/modelarts.go | 1 + 1 file changed, 1 insertion(+) diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index 083bce92d..1885295f8 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -376,6 +376,7 @@ func GetCloudBrainDataSetInfo(uuid string, datasetname string, isNeedDown bool) IsDelete: isDelete, }) } + log.Info("dataset length=" + fmt.Sprint(len(datasetDownload))) return datasetDownload } From 8b8b439b5501761663091137194e30879a4f2769 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 31 Aug 2022 11:17:06 +0800 Subject: [PATCH 28/29] =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E8=A7=A3=E5=86=B3Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/modelarts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index 1885295f8..847e831f6 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -346,7 +346,7 @@ func GetCloudBrainDataSetInfo(uuid string, datasetname string, isNeedDown bool) attachment, err := models.GetAttachmentByUUID(uuidStr) if err != nil { log.Error("GetAttachmentByUUID failed:%v", err.Error()) - if len(datasetnameList) <= i { + if len(datasetnameList) <= i || len(datasetname) == 0 { continue } name = datasetnameList[i] From 34e3c72c74b88312f8c5d66d3e87cab5473a250f Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Wed, 31 Aug 2022 12:16:12 +0800 Subject: [PATCH 29/29] fix issue --- web_src/js/components/dataset/referenceDataset.vue | 2 +- web_src/js/components/dataset/selectDataset.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web_src/js/components/dataset/referenceDataset.vue b/web_src/js/components/dataset/referenceDataset.vue index e2c7d5b9c..b01c3dfe5 100644 --- a/web_src/js/components/dataset/referenceDataset.vue +++ b/web_src/js/components/dataset/referenceDataset.vue @@ -248,7 +248,7 @@ > - + {{ i18n.dataset_selected }}
-
+