From 8745aa211c1b9d3f114d869930af091435d3441b Mon Sep 17 00:00:00 2001 From: liuzx Date: Thu, 18 Aug 2022 11:24:17 +0800 Subject: [PATCH 01/18] check delete task --- routers/api/v1/repo/modelarts.go | 11 ++++++++++- routers/repo/modelarts.go | 10 ++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/routers/api/v1/repo/modelarts.go b/routers/api/v1/repo/modelarts.go index 419c6d6a4..79e35812e 100755 --- a/routers/api/v1/repo/modelarts.go +++ b/routers/api/v1/repo/modelarts.go @@ -6,13 +6,14 @@ package repo import ( - "code.gitea.io/gitea/modules/notification" "encoding/json" "net/http" "path" "strconv" "strings" + "code.gitea.io/gitea/modules/notification" + "code.gitea.io/gitea/modules/grampus" "code.gitea.io/gitea/modules/setting" @@ -352,6 +353,14 @@ func DelTrainJobVersion(ctx *context.APIContext) { return } + if task.Status != string(models.ModelArtsTrainJobImageFailed) && task.Status != string(models.ModelArtsTrainJobSubmitFailed) && task.Status != string(models.ModelArtsTrainJobDeleteFailed) && + task.Status != string(models.ModelArtsTrainJobCompleted) && task.Status != string(models.ModelArtsTrainJobFailed) && + task.Status != string(models.ModelArtsTrainJobKilled) && task.Status != string(models.ModelArtsTrainJobCanceled) && task.Status != string(models.ModelArtsTrainJobLost) { + log.Error("the job(%s) version has not been stopped", task.JobName) + ctx.NotFound(err) + return + } + //删除modelarts上的记录 _, err = modelarts.DelTrainJobVersion(jobID, strconv.FormatInt(task.VersionID, 10)) if err != nil { diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index 763308930..237591635 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -1839,6 +1839,16 @@ func TrainJobDel(ctx *context.Context) { return } + for _, task := range VersionListTasks { + if task.Status != string(models.ModelArtsTrainJobImageFailed) && task.Status != string(models.ModelArtsTrainJobSubmitFailed) && task.Status != string(models.ModelArtsTrainJobDeleteFailed) && + task.Status != string(models.ModelArtsTrainJobCompleted) && task.Status != string(models.ModelArtsTrainJobFailed) && + task.Status != string(models.ModelArtsTrainJobKilled) && task.Status != string(models.ModelArtsTrainJobCanceled) && task.Status != string(models.ModelArtsTrainJobLost) { + log.Error("the job(%s) version has not been stopped", task.JobName) + ctx.RenderWithErr("the job version has not been stopped", tplModelArtsTrainJobIndex, nil) + return + } + } + //删除modelarts上的任务记录 _, err = modelarts.DelTrainJob(jobID) if err != nil { From ff249ec337b65f1d4dee435a5236ab64ca64bc00 Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 22 Aug 2022 15:09:03 +0800 Subject: [PATCH 02/18] =?UTF-8?q?=E8=A7=A3=E5=86=B3#2647?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- models/dataset.go | 24 +++++++++++++++++------- routers/repo/setting.go | 6 ++++++ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/models/dataset.go b/models/dataset.go index 7f049f068..a0f6ba2aa 100755 --- a/models/dataset.go +++ b/models/dataset.go @@ -88,7 +88,7 @@ func (datasets DatasetList) loadAttributes(e Engine) error { if err := e. Where("id > 0"). In("id", keysInt64(set)). - Cols("id", "owner_id", "owner_name", "lower_name", "name", "description", "alias", "lower_alias","is_private"). + Cols("id", "owner_id", "owner_name", "lower_name", "name", "description", "alias", "lower_alias", "is_private"). Find(&repos); err != nil { return fmt.Errorf("find repos: %v", err) } @@ -121,12 +121,12 @@ func (datasets DatasetList) loadAttachmentAttributes(opts *SearchDatasetOptions) if attachment.DatasetID == datasets[i].ID { if opts.StarByMe { - permission,ok := permissionMap[datasets[i].ID]; + permission, ok := permissionMap[datasets[i].ID] if !ok { permission = false datasets[i].Repo.GetOwner() - if datasets[i].Repo.Owner.IsOrganization() { + if datasets[i].Repo.Owner.IsOrganization() { if datasets[i].Repo.Owner.IsUserPartOfOrg(opts.User.ID) { log.Info("user is member of org.") permission = true @@ -140,10 +140,10 @@ func (datasets DatasetList) loadAttachmentAttributes(opts *SearchDatasetOptions) } } - permissionMap[datasets[i].ID]=permission + permissionMap[datasets[i].ID] = permission } - if permission{ + if permission { datasets[i].Attachments = append(datasets[i].Attachments, attachment) } else if !attachment.IsPrivate { datasets[i].Attachments = append(datasets[i].Attachments, attachment) @@ -159,8 +159,8 @@ func (datasets DatasetList) loadAttachmentAttributes(opts *SearchDatasetOptions) } for i := range datasets { - if datasets[i].Attachments==nil{ - datasets[i].Attachments=[]*Attachment{} + if datasets[i].Attachments == nil { + datasets[i].Attachments = []*Attachment{} } datasets[i].Repo.Owner = nil } @@ -585,3 +585,13 @@ func GetTeamDatasetIdsByUserID(userID int64) []int64 { Cols("dataset.id").Find(&datasets) return datasets } + +func UpdateDatasetCreateUser(ID int64, user *User) error { + _, err := x.Where("id = ?", ID).Cols("user_id").Update(&Dataset{ + UserID: user.ID, + }) + if err != nil { + return err + } + return nil +} diff --git a/routers/repo/setting.go b/routers/repo/setting.go index fed89513a..dab98b92d 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -464,6 +464,12 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) { } return } + dataset, err := models.GetDatasetByRepo(repo) + if err == nil { + if dataset != nil { + models.UpdateDatasetCreateUser(dataset.ID, newOwner) + } + } log.Trace("Repository transferred: %s/%s -> %s", ctx.Repo.Owner.Name, repo.Name, newOwner) ctx.Flash.Success(ctx.Tr("repo.settings.transfer_succeed")) From b97d7e48a1dae1f4d2b06c4bc21ff96e5470b51f Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 23 Aug 2022 09:27:17 +0800 Subject: [PATCH 03/18] =?UTF-8?q?=E8=A7=A3=E5=86=B3#2647?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/setting.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routers/repo/setting.go b/routers/repo/setting.go index dab98b92d..b6297677a 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -468,7 +468,11 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) { if err == nil { if dataset != nil { models.UpdateDatasetCreateUser(dataset.ID, newOwner) + } else { + log.Info("not found the dataset") } + } else { + log.Info("error=" + err.Error()) } log.Trace("Repository transferred: %s/%s -> %s", ctx.Repo.Owner.Name, repo.Name, newOwner) From ea1d5b19d970d36ca9267420f4c0a5d6c7850d66 Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Tue, 23 Aug 2022 10:20:50 +0800 Subject: [PATCH 04/18] #2734 --- routers/repo/modelarts.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index 697e6591e..5a60bff94 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -502,9 +502,11 @@ func NotebookRestart(ctx *context.Context) { break } + id = strconv.FormatInt(newTask.ID, 10) + status = res.Status resultCode = "0" - notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, strconv.FormatInt(newTask.ID, 10), newTask.DisplayJobName, models.ActionCreateDebugNPUTask) + notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, id, newTask.DisplayJobName, models.ActionCreateDebugNPUTask) break } From 58f7fbf04c38fefc0e6a17855d702879e77d0c57 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Tue, 23 Aug 2022 10:38:11 +0800 Subject: [PATCH 05/18] fix issue --- options/locale/locale_en-US.ini | 3 ++- options/locale/locale_zh-CN.ini | 3 ++- templates/custom/wait_count.tmpl | 4 ++-- templates/custom/wait_count_train.tmpl | 4 ++-- templates/repo/modelarts/inferencejob/new.tmpl | 2 +- templates/repo/modelarts/trainjob/new.tmpl | 2 +- templates/repo/modelarts/trainjob/version_new.tmpl | 2 +- 7 files changed, 11 insertions(+), 9 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 90d0348bb..5c8016326 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -3119,7 +3119,8 @@ wrong_specification=You cannot use this specification, please choose another ite job_name_rule = Please enter letters, numbers, _ and - up to 64 characters and cannot end with a dash (-). -dataset_path_rule = The dataset location is stored in the environment variable data_url, and the output path is stored in the environment variable train_url. +train_dataset_path_rule = The dataset location is stored in the environment variable data_url, and the output path is stored in the environment variable train_url. +infer_dataset_path_rule = The dataset location is stored in the environment variable data_url, and the output path is stored in the environment variable train_url. view_sample = View sample inference_output_path_rule = The inference output path is stored in the environment variable result_url. model_file_path_rule=The model file location is stored in the environment variable ckpt_url diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 4c38aefcc..80c5d347e 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -3134,7 +3134,8 @@ card_type = 卡类型 wrong_specification=您目前不能使用这个资源规格,请选择其他资源规格。 job_name_rule = 请输入字母、数字、_和-,最长64个字符,且不能以中划线(-)结尾。 -dataset_path_rule = 数据集位置存储在环境变量data_url中,输出路径存储在环境变量train_url中。 +train_dataset_path_rule = 数据集位置存储在环境变量data_url中,训练输出路径存储在环境变量train_url中。 +infer_dataset_path_rule = 数据集位置存储在环境变量data_url中,推理输出路径存储在环境变量train_url中。 view_sample = 查看样例 inference_output_path_rule = 推理输出路径存储在环境变量result_url中。 model_file_path_rule = 模型文件位置存储在环境变量ckpt_url中。 diff --git a/templates/custom/wait_count.tmpl b/templates/custom/wait_count.tmpl index bef8f1327..072d1d40d 100644 --- a/templates/custom/wait_count.tmpl +++ b/templates/custom/wait_count.tmpl @@ -13,9 +13,9 @@ {{ end }} - {{.i18n.Tr "repo.wait_count_start"}} {{if .QueuesDetail}} {{ $gpuQueue }} diff --git a/templates/custom/wait_count_train.tmpl b/templates/custom/wait_count_train.tmpl index fcfadc5be..4b7e2dac3 100644 --- a/templates/custom/wait_count_train.tmpl +++ b/templates/custom/wait_count_train.tmpl @@ -14,9 +14,9 @@ {{ end }} - {{.ctx.i18n.Tr "repo.wait_count_start"}} {{if .type}} {{ $gpuQueue }} diff --git a/templates/repo/modelarts/inferencejob/new.tmpl b/templates/repo/modelarts/inferencejob/new.tmpl index fa82ad5d8..cb848f102 100644 --- a/templates/repo/modelarts/inferencejob/new.tmpl +++ b/templates/repo/modelarts/inferencejob/new.tmpl @@ -86,7 +86,7 @@ {{template "custom/wait_count_train" Dict "ctx" $}}
- {{.i18n.Tr "cloudbrain.dataset_path_rule" | Safe}} + {{.i18n.Tr "cloudbrain.infer_dataset_path_rule" | Safe}}
diff --git a/templates/repo/modelarts/trainjob/new.tmpl b/templates/repo/modelarts/trainjob/new.tmpl index cf3ea76c4..f3c03584b 100755 --- a/templates/repo/modelarts/trainjob/new.tmpl +++ b/templates/repo/modelarts/trainjob/new.tmpl @@ -113,7 +113,7 @@ {{template "custom/wait_count_train" Dict "ctx" $}}
- {{.i18n.Tr "cloudbrain.dataset_path_rule" | Safe}} + {{.i18n.Tr "cloudbrain.train_dataset_path_rule" | Safe}}
diff --git a/templates/repo/modelarts/trainjob/version_new.tmpl b/templates/repo/modelarts/trainjob/version_new.tmpl index cf32409ed..f0bab8e82 100644 --- a/templates/repo/modelarts/trainjob/version_new.tmpl +++ b/templates/repo/modelarts/trainjob/version_new.tmpl @@ -171,7 +171,7 @@
- {{.i18n.Tr "cloudbrain.dataset_path_rule"}} + {{.i18n.Tr "cloudbrain.train_dataset_path_rule"}}
{{.i18n.Tr "repo.modelarts.train_job.add_run_parameter"}} From b5ef006b9eb8c1ce36e1189c08f896f1185cea15 Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 23 Aug 2022 10:38:43 +0800 Subject: [PATCH 06/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E4=BF=A1=E6=81=AF=E3=80=82?= 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 ++-- templates/repo/cloudbrain/inference/show.tmpl | 2 +- templates/repo/cloudbrain/show.tmpl | 2 +- templates/repo/cloudbrain/trainjob/show.tmpl | 2 +- templates/repo/modelarts/inferencejob/show.tmpl | 2 +- templates/repo/modelarts/notebook/show.tmpl | 2 +- templates/repo/modelarts/trainjob/show.tmpl | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 90d0348bb..1ec2a661f 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -253,9 +253,9 @@ page_dev_env_desc2_desc=Associate the model with the code version, you can adjus page_dev_env_desc3_title=Once Configuration, Multiple Reuse page_dev_env_desc3_desc=Provide execution environment sharing, Once Configuration, Multiple Reuse. Lower the threshold of model development, and avoid spending repetitive time configuring complex environments. page_dev_yunlao=OpenI AI Collaboration Platform -page_dev_yunlao_desc1=OpenI AI collaboration platform has cooperated with Pengcheng cloud brain and China computing power network (c ² Net) can be used to complete AI development tasks by using the rich computing resources of Pengcheng cloud brain and China computing network. +page_dev_yunlao_desc1=OpenI AI collaboration platform has cooperated with Pengcheng cloud brain and China computing power network (C ² Net) can be used to complete AI development tasks by using the rich computing resources of Pengcheng cloud brain and China computing network. page_dev_yunlao_desc2=Pengcheng CloudBrain's existing AI computing power is 100p FLOPS@FP16 (billions of half precision floating-point calculations per second), the main hardware infrastructure consists of GPU servers equipped with NVIDIA Tesla V100 and A100, and Atlas 900 AI clusters equipped with Kunpeng and shengteng processors. -page_dev_yunlao_desc3=China computing power network (c ² Net) phase I can realize high-speed network interconnection between different artificial intelligence computing centers, and realize reasonable scheduling of computing power and flexible allocation of resources. At present, 11 intelligent computing centers have been connected, and the total scale of computing power is 1924p OPS@FP16 。 Qizhi AI collaboration platform has been connected to Pengcheng Cloud Computing Institute, Chengdu Intelligent Computing Center, Zhongyuan Intelligent Computing Center, Hefei brain and other nodes. +page_dev_yunlao_desc3=China computing power network (C ² Net) phase I can realize high-speed network interconnection between different artificial intelligence computing centers, and realize reasonable scheduling of computing power and flexible allocation of resources. At present, 11 intelligent computing centers have been connected, and the total scale of computing power is 1924p OPS@FP16. OpenI AI collaboration platform has been connected to Pengcheng Cloud Computing Institute, Chengdu Intelligent Computing Center, Zhongyuan Intelligent Computing Center, Hefei brain and other nodes. page_dev_yunlao_desc4=Developers can freely select the corresponding computing resources according to the use needs, and can test the adaptability, performance, stability, etc. of the model in different hardware environments. page_dev_yunlao_desc5=If your model requires more computing resources, you can also apply for it separately. page_dev_yunlao_apply=Apply Separately diff --git a/templates/repo/cloudbrain/inference/show.tmpl b/templates/repo/cloudbrain/inference/show.tmpl index 97a0b4936..848ccfc20 100644 --- a/templates/repo/cloudbrain/inference/show.tmpl +++ b/templates/repo/cloudbrain/inference/show.tmpl @@ -495,7 +495,7 @@
- + {{range $m ,$n := $.datasetDownload}} diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl index ccd8e2835..bdde80772 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -493,7 +493,7 @@
数据集文件
{{$.i18n.Tr "dataset.file"}}
- + {{range $m ,$n := $.datasetDownload}} diff --git a/templates/repo/cloudbrain/trainjob/show.tmpl b/templates/repo/cloudbrain/trainjob/show.tmpl index 9d110e8fd..23fc92d62 100644 --- a/templates/repo/cloudbrain/trainjob/show.tmpl +++ b/templates/repo/cloudbrain/trainjob/show.tmpl @@ -459,7 +459,7 @@
数据集文件
{{$.i18n.Tr "dataset.file"}}
- + {{range $m ,$n := $.datasetDownload}} diff --git a/templates/repo/modelarts/inferencejob/show.tmpl b/templates/repo/modelarts/inferencejob/show.tmpl index 628615879..50022374c 100644 --- a/templates/repo/modelarts/inferencejob/show.tmpl +++ b/templates/repo/modelarts/inferencejob/show.tmpl @@ -436,7 +436,7 @@ td, th {
数据集文件
{{$.i18n.Tr "dataset.file"}}
- + {{range $m ,$n := $.datasetDownload}} diff --git a/templates/repo/modelarts/notebook/show.tmpl b/templates/repo/modelarts/notebook/show.tmpl index 91eba9932..a793cd458 100755 --- a/templates/repo/modelarts/notebook/show.tmpl +++ b/templates/repo/modelarts/notebook/show.tmpl @@ -432,7 +432,7 @@
数据集文件
{{$.i18n.Tr "dataset.file"}}
- + diff --git a/templates/repo/modelarts/trainjob/show.tmpl b/templates/repo/modelarts/trainjob/show.tmpl index e780b679f..3f2443d97 100755 --- a/templates/repo/modelarts/trainjob/show.tmpl +++ b/templates/repo/modelarts/trainjob/show.tmpl @@ -478,7 +478,7 @@
数据集文件
{{$.i18n.Tr "dataset.file"}} 数据集下载地址 操作
- + {{range $m ,$n := $.datasetList}} From 92da33522aa1e710a1bd745dc6835a5d7168eeda Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 23 Aug 2022 10:50:46 +0800 Subject: [PATCH 07/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E4=BF=A1=E6=81=AF=E3=80=82?= 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 | 9 +++++---- options/locale/locale_zh-CN.ini | 4 ++-- templates/repo/modelarts/notebook/show.tmpl | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 1ec2a661f..25290a3ac 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -253,13 +253,12 @@ page_dev_env_desc2_desc=Associate the model with the code version, you can adjus page_dev_env_desc3_title=Once Configuration, Multiple Reuse page_dev_env_desc3_desc=Provide execution environment sharing, Once Configuration, Multiple Reuse. Lower the threshold of model development, and avoid spending repetitive time configuring complex environments. page_dev_yunlao=OpenI AI Collaboration Platform -page_dev_yunlao_desc1=OpenI AI collaboration platform has cooperated with Pengcheng cloud brain and China computing power network (C ² Net) can be used to complete AI development tasks by using the rich computing resources of Pengcheng cloud brain and China computing network. +page_dev_yunlao_desc1=OpenI AI collaboration platform has cooperated with Pengcheng cloud brain and China computing power network (C²Net) can be used to complete AI development tasks by using the rich computing resources of Pengcheng cloud brain and China computing network. page_dev_yunlao_desc2=Pengcheng CloudBrain's existing AI computing power is 100p FLOPS@FP16 (billions of half precision floating-point calculations per second), the main hardware infrastructure consists of GPU servers equipped with NVIDIA Tesla V100 and A100, and Atlas 900 AI clusters equipped with Kunpeng and shengteng processors. -page_dev_yunlao_desc3=China computing power network (C ² Net) phase I can realize high-speed network interconnection between different artificial intelligence computing centers, and realize reasonable scheduling of computing power and flexible allocation of resources. At present, 11 intelligent computing centers have been connected, and the total scale of computing power is 1924p OPS@FP16. OpenI AI collaboration platform has been connected to Pengcheng Cloud Computing Institute, Chengdu Intelligent Computing Center, Zhongyuan Intelligent Computing Center, Hefei brain and other nodes. +page_dev_yunlao_desc3=China computing power network (C²Net) phase I can realize high-speed network interconnection between different artificial intelligence computing centers, and realize reasonable scheduling of computing power and flexible allocation of resources. At present, 11 intelligent computing centers have been connected, and the total scale of computing power is 1924p OPS@FP16. OpenI AI collaboration platform has been connected to Pengcheng Cloud Computing Institute, Chengdu Intelligent Computing Center, Zhongyuan Intelligent Computing Center, Hefei brain and other nodes. page_dev_yunlao_desc4=Developers can freely select the corresponding computing resources according to the use needs, and can test the adaptability, performance, stability, etc. of the model in different hardware environments. page_dev_yunlao_desc5=If your model requires more computing resources, you can also apply for it separately. page_dev_yunlao_apply=Apply Separately - search=Search search_repo=Repository search_dataset=DataSet @@ -822,6 +821,8 @@ title_format_err=Name can only contain number,letter,'-','_' or '.', and can be description = Description description_format_err=Description's length can be up to %s characters long. create_dataset = Create Dataset +download_url=Download Url +download_oper=Operation create_dataset_fail=Failed to create dataset. query_dataset_fail=Failed to query dataset. edit_attachment_fail=Failed to update description. @@ -3094,7 +3095,7 @@ resource_cluster = Resource Cluster resource_cluster_openi = OpenI Resource Cluster resource_cluster_c2net = China Computing NET resource_cluster_openi_simple = OpenI -resource_cluster_c2net_simple = Computing NET +resource_cluster_c2net_simple = C²Net compute_resource = Computing resources task_name = Task name task_type = Task type diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 4c38aefcc..6b2fa0530 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -261,7 +261,6 @@ page_dev_yunlao_desc3=中国算力网(C²NET)一期可实现不同人工智 page_dev_yunlao_desc4=开发者可以根据使用需求,自由选择相应计算资源,可以测试模型在不同硬件环境下的适配能力、性能、稳定性等。 page_dev_yunlao_desc5=如果您的模型需要更多的计算资源,也可以单独申请。 page_dev_yunlao_apply=单独申请 - search=搜索 search_repo=项目 search_dataset=数据集 @@ -830,7 +829,8 @@ create_dataset=创建数据集 create_dataset_fail=创建数据集失败。 query_dataset_fail=查询数据集失败。 edit_attachment_fail=修改描述失败。 - +download_url=数据集下载地址 +download_oper=操作 show_dataset=数据集 edit_dataset=编辑数据集 update_dataset=更新数据集 diff --git a/templates/repo/modelarts/notebook/show.tmpl b/templates/repo/modelarts/notebook/show.tmpl index a793cd458..b74e22775 100755 --- a/templates/repo/modelarts/notebook/show.tmpl +++ b/templates/repo/modelarts/notebook/show.tmpl @@ -433,8 +433,8 @@
数据集文件
{{$.i18n.Tr "dataset.file"}}
- - + + {{range $.datasetDownload}} From 41bfe85e7bed815d5448913469bbf927f6d96f0d Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 23 Aug 2022 11:21:42 +0800 Subject: [PATCH 08/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E4=BF=A1=E6=81=AF=E3=80=82?= 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 | 9 ++++++--- options/locale/locale_zh-CN.ini | 3 +++ templates/home.tmpl | 6 +++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 25290a3ac..9d6fc48e0 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -253,12 +253,15 @@ page_dev_env_desc2_desc=Associate the model with the code version, you can adjus page_dev_env_desc3_title=Once Configuration, Multiple Reuse page_dev_env_desc3_desc=Provide execution environment sharing, Once Configuration, Multiple Reuse. Lower the threshold of model development, and avoid spending repetitive time configuring complex environments. page_dev_yunlao=OpenI AI Collaboration Platform -page_dev_yunlao_desc1=OpenI AI collaboration platform has cooperated with Pengcheng cloud brain and China computing power network (C²Net) can be used to complete AI development tasks by using the rich computing resources of Pengcheng cloud brain and China computing network. +page_dev_yunlao_desc1=OpenI AI collaboration platform has cooperated with Pengcheng cloud brain and China computing power network (C²NET) can be used to complete AI development tasks by using the rich computing resources of Pengcheng cloud brain and China computing network. page_dev_yunlao_desc2=Pengcheng CloudBrain's existing AI computing power is 100p FLOPS@FP16 (billions of half precision floating-point calculations per second), the main hardware infrastructure consists of GPU servers equipped with NVIDIA Tesla V100 and A100, and Atlas 900 AI clusters equipped with Kunpeng and shengteng processors. -page_dev_yunlao_desc3=China computing power network (C²Net) phase I can realize high-speed network interconnection between different artificial intelligence computing centers, and realize reasonable scheduling of computing power and flexible allocation of resources. At present, 11 intelligent computing centers have been connected, and the total scale of computing power is 1924p OPS@FP16. OpenI AI collaboration platform has been connected to Pengcheng Cloud Computing Institute, Chengdu Intelligent Computing Center, Zhongyuan Intelligent Computing Center, Hefei brain and other nodes. +page_dev_yunlao_desc3=China computing power network (C²NET) phase I can realize high-speed network interconnection between different artificial intelligence computing centers, and realize reasonable scheduling of computing power and flexible allocation of resources. At present, 11 intelligent computing centers have been connected, and the total scale of computing power is 1924p OPS@FP16. OpenI AI collaboration platform has been connected to Pengcheng Cloud Computing Institute, Chengdu Intelligent Computing Center, Zhongyuan Intelligent Computing Center, Hefei brain and other nodes. page_dev_yunlao_desc4=Developers can freely select the corresponding computing resources according to the use needs, and can test the adaptability, performance, stability, etc. of the model in different hardware environments. page_dev_yunlao_desc5=If your model requires more computing resources, you can also apply for it separately. page_dev_yunlao_apply=Apply Separately +c2net_title=C²NET +c2net_desc=The artificial intelligence computing power network promotion alliance has access to 11 intelligent computing centers, with a total scale of 1924p. +c2net_center=Center search=Search search_repo=Repository search_dataset=DataSet @@ -3095,7 +3098,7 @@ resource_cluster = Resource Cluster resource_cluster_openi = OpenI Resource Cluster resource_cluster_c2net = China Computing NET resource_cluster_openi_simple = OpenI -resource_cluster_c2net_simple = C²Net +resource_cluster_c2net_simple = C²NET compute_resource = Computing resources task_name = Task name task_type = Task type diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 6b2fa0530..e1751e5a7 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -261,6 +261,9 @@ page_dev_yunlao_desc3=中国算力网(C²NET)一期可实现不同人工智 page_dev_yunlao_desc4=开发者可以根据使用需求,自由选择相应计算资源,可以测试模型在不同硬件环境下的适配能力、性能、稳定性等。 page_dev_yunlao_desc5=如果您的模型需要更多的计算资源,也可以单独申请。 page_dev_yunlao_apply=单独申请 +c2net_title=智算网络 +c2net_desc=人工智能算力网络推进联盟已接入11家智算中心,算力总规模1924P +c2net_center=中心 search=搜索 search_repo=项目 search_dataset=数据集 diff --git a/templates/home.tmpl b/templates/home.tmpl index 8de647d75..c7485a214 100755 --- a/templates/home.tmpl +++ b/templates/home.tmpl @@ -89,8 +89,8 @@
-

智算网络

-

人工智能算力网络推进联盟已接入11家智算中心,算力总规模1924P

+

{{.i18n.Tr "home.c2net_title"}}

+

{{.i18n.Tr "home.c2net_desc"}}

@@ -98,7 +98,7 @@
- +
From 744d89fca5623439a2ec2bc06130483f2dbe6e3d Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Tue, 23 Aug 2022 11:41:48 +0800 Subject: [PATCH 09/18] fix issue --- templates/repo/modelarts/trainjob/show.tmpl | 38 ++++----------------- web_src/js/features/cloudbrainShow.js | 29 ++++++++++++++++ web_src/js/features/cloudrbanin.js | 13 +++++++ 3 files changed, 49 insertions(+), 31 deletions(-) diff --git a/templates/repo/modelarts/trainjob/show.tmpl b/templates/repo/modelarts/trainjob/show.tmpl index e5873d540..239763de1 100755 --- a/templates/repo/modelarts/trainjob/show.tmpl +++ b/templates/repo/modelarts/trainjob/show.tmpl @@ -274,10 +274,14 @@ {{if .CanDel}} - {{$.i18n.Tr "repo.delete"}} {{else}} - {{$.i18n.Tr "repo.delete"}} {{end}}
@@ -896,35 +900,7 @@ $('#name').val(modelName) $('#version').val("0.0.1") } - function deleteVersion(version_name) { - stopBubbling(arguments.callee.caller.arguments[0]) - let flag = 1; - $('.ui.basic.modal').modal({ - onDeny: function () { - flag = false - }, - onApprove: function () { - $.post(`/api/v1/repos/${userName}/${repoPath}/modelarts/train-job/${jobID}/del_version`, { version_name: version_name }, (data) => { - if (data.VersionListCount === 0) { - location.href = `/${userName}/${repoPath}/modelarts/train-job` - } else { - $('#accordion' + version_name).remove() - } - - }).fail(function (err) { - console.log(err); - }); - flag = true - }, - onHidden: function () { - if (flag == false) { - $('.alert').html('您已取消操作').removeClass('alert-success').addClass('alert-danger').show().delay(1500).fadeOut(); - } - } - }) - .modal('show') - - } + diff --git a/web_src/js/features/cloudbrainShow.js b/web_src/js/features/cloudbrainShow.js index 691ac57c4..9c68722a7 100644 --- a/web_src/js/features/cloudbrainShow.js +++ b/web_src/js/features/cloudbrainShow.js @@ -213,6 +213,35 @@ export default async function initCloudrainSow() { }); e.stopPropagation(); }); + $(".delete-show-version").click(function (e) { + const ID = this.dataset.jobid; + const repoPath = this.dataset.repopath; + const version_name = this.dataset.version; + const url = `/api/v1/repos/${repoPath}/${ID}/del_version`; + $(".ui.basic.modal") + .modal({ + onApprove: function () { + $.post(url, { version_name: version_name }, (data) => { + console.log(data); + if (data.StatusOK === 0) { + if (data.VersionListCount === 0) { + location.href = `/${repoPath}`; + } else { + $("#accordion" + version_name).remove(); + } + refreshStatusShow(version_name, ID, repoPath); + } else { + return; + } + }).fail(function (err) { + console.log(err); + }); + }, + }) + .modal("show"); + + e.stopPropagation(); + }); function refreshStatusShow(version_name, ID, repoPath) { $.get( `/api/v1/repos/${repoPath}/${ID}?version_name=${version_name}`, diff --git a/web_src/js/features/cloudrbanin.js b/web_src/js/features/cloudrbanin.js index 445f70be3..2df780233 100644 --- a/web_src/js/features/cloudrbanin.js +++ b/web_src/js/features/cloudrbanin.js @@ -182,6 +182,15 @@ export default async function initCloudrain() { "CREATE_FAILED", "STOPPED", ]; + let deleteArray = [ + "KILLED", + "FAILED", + "START_FAILED", + "COMPLETED", + "SUCCEEDED", + "CREATE_FAILED", + "STOPPED", + ]; $.get( `/api/v1/repos/${repoPath}/${jobID}?version_name=${versionname}`, (data) => { @@ -194,6 +203,10 @@ export default async function initCloudrain() { if (stopArray.includes(data.JobStatus)) { $("#" + versionname + "-stop").addClass("disabled"); } + if (deleteArray.includes(data.JobStatus)) { + $(`#${versionname}-delete`).removeClass("disabled"); + $(`#${versionname}-delete`).addClass("blue"); + } if (data.JobStatus === "COMPLETED") { $("#" + versionname + "-create-model") .removeClass("disabled") From 7931fb64174868055010cc7604391466ec4271ab Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Tue, 23 Aug 2022 11:48:34 +0800 Subject: [PATCH 10/18] fix issue --- .../repo/modelarts/trainjob/version_new.tmpl | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/templates/repo/modelarts/trainjob/version_new.tmpl b/templates/repo/modelarts/trainjob/version_new.tmpl index f0bab8e82..e5d4d954a 100644 --- a/templates/repo/modelarts/trainjob/version_new.tmpl +++ b/templates/repo/modelarts/trainjob/version_new.tmpl @@ -73,6 +73,11 @@ + {{template "custom/wait_count_train" Dict "ctx" $}} +
+ + {{.i18n.Tr "cloudbrain.train_dataset_path_rule" | Safe}} +

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

@@ -152,26 +157,9 @@ {{.i18n.Tr "cloudbrain.view_sample"}}
- -
- {{.i18n.Tr "cloudbrain.train_dataset_path_rule"}}
{{.i18n.Tr "repo.modelarts.train_job.add_run_parameter"}} From a32dfa568b0b5030db885672e4c2db8beae40fcd Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Tue, 23 Aug 2022 11:54:53 +0800 Subject: [PATCH 11/18] fix invalid token --- go.sum | 2 ++ modules/cloudbrain/resty.go | 46 +++++++++++++++++------------------ modules/setting/cloudbrain.go | 2 ++ 3 files changed, 26 insertions(+), 24 deletions(-) diff --git a/go.sum b/go.sum index 6735a1938..e0c11f261 100755 --- a/go.sum +++ b/go.sum @@ -713,12 +713,14 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1 github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w= github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= +github.com/smartystreets/assertions v1.1.0 h1:MkTeG1DMwsrdH7QtLXy5W+fUxWq+vmb6cLmyJ7aRtF0= github.com/smartystreets/assertions v1.1.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 h1:WN9BUFbdyOsSH/XohnWpXOlq9NBD5sGAB2FciQMUEe8= github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= diff --git a/modules/cloudbrain/resty.go b/modules/cloudbrain/resty.go index a7a19ed10..d9db3bbb5 100755 --- a/modules/cloudbrain/resty.go +++ b/modules/cloudbrain/resty.go @@ -24,10 +24,11 @@ var ( ) const ( - JobHasBeenStopped = "S410" - Public = "public" - Custom = "custom" - LogPageSize = 500 + JobHasBeenStopped = "S410" + errInvalidToken = "S401" + Public = "public" + Custom = "custom" + LogPageSize = 500 LogPageTokenExpired = "5m" pageSize = 15 QueuesDetailUrl = "/rest-server/api/v2/queuesdetail" @@ -59,7 +60,7 @@ func loginCloudbrain() error { res, err := client.R(). SetHeader("Content-Type", "application/json"). - SetBody(map[string]interface{}{"username": username, "password": password, "expiration": "604800"}). + SetBody(map[string]interface{}{"username": username, "password": password, "expiration": conf.Expiration}). SetResult(&loginResult). Post(HOST + "/rest-server/api/v1/token") if err != nil { @@ -122,16 +123,12 @@ sendjob: Post(HOST + "/rest-server/api/v1/jobs/") if err != nil { - if res != nil { - var response models.CloudBrainResult - json.Unmarshal(res.Body(), &response) - log.Error("code(%s), msg(%s)", response.Code, response.Msg) - return nil, fmt.Errorf(response.Msg) - } return nil, fmt.Errorf("resty create job: %s", err) } - if jobResult.Code == "S401" && retry < 1 { + var response models.CloudBrainResult + json.Unmarshal(res.Body(), &response) + if response.Code == errInvalidToken && retry < 1 { retry++ _ = loginCloudbrain() goto sendjob @@ -163,7 +160,9 @@ sendjob: return nil, fmt.Errorf("resty GetJob: %v", err) } - if getJobResult.Code == "S401" && retry < 1 { + var response models.CloudBrainResult + json.Unmarshal(res.Body(), &response) + if response.Code == errInvalidToken && retry < 1 { retry++ _ = loginCloudbrain() goto sendjob @@ -196,13 +195,8 @@ sendjob: } var response models.CloudBrainResult - err = json.Unmarshal(res.Body(), &response) - if err != nil { - log.Error("json.Unmarshal failed: %s", err.Error()) - return &getImagesResult, fmt.Errorf("json.Unmarshal failed: %s", err.Error()) - } - - if response.Code == "S401" && retry < 1 { + json.Unmarshal(res.Body(), &response) + if response.Code == errInvalidToken && retry < 1 { retry++ _ = loginCloudbrain() goto sendjob @@ -290,7 +284,9 @@ sendjob: return fmt.Errorf("resty CommitImage: %v", err) } - if result.Code == "S401" && retry < 1 { + var response models.CloudBrainResult + json.Unmarshal(res.Body(), &response) + if response.Code == errInvalidToken && retry < 1 { retry++ _ = loginCloudbrain() goto sendjob @@ -442,7 +438,9 @@ sendjob: return fmt.Errorf("resty StopJob: %v", err) } - if result.Code == "S401" && retry < 1 { + var response models.CloudBrainResult + json.Unmarshal(res.Body(), &response) + if response.Code == errInvalidToken && retry < 1 { retry++ _ = loginCloudbrain() goto sendjob @@ -498,7 +496,7 @@ func GetJobAllLog(scrollID string) (*models.GetJobLogResult, error) { client := getRestyClient() var result models.GetJobLogResult req := models.GetAllJobLogParams{ - Scroll: LogPageTokenExpired, + Scroll: LogPageTokenExpired, ScrollID: scrollID, } @@ -522,7 +520,7 @@ func GetJobAllLog(scrollID string) (*models.GetJobLogResult, error) { return &result, nil } -func DeleteJobLogToken(scrollID string) (error) { +func DeleteJobLogToken(scrollID string) error { checkSetting() client := getRestyClient() var result models.DeleteJobLogTokenResult diff --git a/modules/setting/cloudbrain.go b/modules/setting/cloudbrain.go index 2d80eea25..c06676243 100755 --- a/modules/setting/cloudbrain.go +++ b/modules/setting/cloudbrain.go @@ -5,6 +5,7 @@ type CloudbrainLoginConfig struct { Password string Host string ImageURLPrefix string + Expiration string } var ( @@ -17,5 +18,6 @@ func GetCloudbrainConfig() CloudbrainLoginConfig { Cloudbrain.Password = cloudbrainSec.Key("PASSWORD").MustString("") Cloudbrain.Host = cloudbrainSec.Key("REST_SERVER_HOST").MustString("") Cloudbrain.ImageURLPrefix = cloudbrainSec.Key("IMAGE_URL_PREFIX").MustString("") + Cloudbrain.Expiration = cloudbrainSec.Key("EXPIRATION").MustString("604800") return Cloudbrain } From 27d41546acb8c5d015e523c8f750d96b401ecb9c Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Tue, 23 Aug 2022 12:06:30 +0800 Subject: [PATCH 12/18] fix issue --- web_src/js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/js/index.js b/web_src/js/index.js index 1ec155461..738a31c7d 100755 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -3520,7 +3520,7 @@ function initVueComponents() { `${self.reposFilter}:${self.archivedFilter}:${self.privateFilter}`, count ); - self.finalPage = Math.floor(count / self.searchLimit) + 1; + self.finalPage = Math.ceil(count / self.searchLimit); self.updateHistory(); } }).always(() => { From 2168c5f77003572dd85f51ed55c568ba0dfa9441 Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 23 Aug 2022 14:44:24 +0800 Subject: [PATCH 13/18] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E4=BF=A1=E6=81=AF?= 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 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 9d6fc48e0..e1dcbef3a 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -259,7 +259,7 @@ page_dev_yunlao_desc3=China computing power network (C²NET) phase I can realize page_dev_yunlao_desc4=Developers can freely select the corresponding computing resources according to the use needs, and can test the adaptability, performance, stability, etc. of the model in different hardware environments. page_dev_yunlao_desc5=If your model requires more computing resources, you can also apply for it separately. page_dev_yunlao_apply=Apply Separately -c2net_title=C²NET +c2net_title=China Computing Network c2net_desc=The artificial intelligence computing power network promotion alliance has access to 11 intelligent computing centers, with a total scale of 1924p. c2net_center=Center search=Search From 9e623b1eaf73306166809fca7193b8efe444fd47 Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 23 Aug 2022 16:39:41 +0800 Subject: [PATCH 14/18] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/trainjob/show.tmpl | 2 +- web_src/js/features/datsetCate.js | 149 +++++++++++++++++++ 2 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 web_src/js/features/datsetCate.js diff --git a/templates/repo/cloudbrain/trainjob/show.tmpl b/templates/repo/cloudbrain/trainjob/show.tmpl index 23fc92d62..2be624ddb 100644 --- a/templates/repo/cloudbrain/trainjob/show.tmpl +++ b/templates/repo/cloudbrain/trainjob/show.tmpl @@ -499,7 +499,7 @@
+ href="/api/v1/repos/{{$.RepoRelPath}}/cloudbrain/{{.JobID}}/download_log_file"> {{$.i18n.Tr "repo.modelarts.download_log"}} diff --git a/web_src/js/features/datsetCate.js b/web_src/js/features/datsetCate.js new file mode 100644 index 000000000..ccb344ec1 --- /dev/null +++ b/web_src/js/features/datsetCate.js @@ -0,0 +1,149 @@ +export const i18nVue = { + CN: { + computer_vision: "计算机视觉", + natural_language_processing: "自然语言处理", + speech_processing: "语音处理", + computer_vision_natural_language_processing: "计算机视觉、自然语言处理", + machine_translation: "机器翻译", + question_answering_system: "问答系统", + information_retrieval: "信息检索", + knowledge_graph: "知识图谱", + text_annotation: "文本标注", + text_categorization: "文本分类", + emotion_analysis: "情感分析", + language_modeling: "语言建模", + speech_recognition: "语音识别", + automatic_digest: "自动文摘", + information_extraction: "信息抽取", + description_generation: "说明生成", + image_classification: "图像分类", + face_recognition: "人脸识别", + image_search: "图像搜索", + target_detection: "目标检测", + image_description_generation: "图像描述生成", + vehicle_license_plate_recognition: "车辆车牌识别", + medical_image_analysis: "医学图像分析", + unmanned: "无人驾驶", + unmanned_security: "无人安防", + drone: "无人机", + vr_ar: "VR/AR", + "2_d_vision": "2-D视觉", + "2_5_d_vision": "2.5-D视觉", + "3_d_reconstruction": "3D重构", + image_processing: "图像处理", + video_processing: "视频处理", + visual_input_system: "视觉输入系统", + speech_coding: "语音编码", + speech_enhancement: "语音增强", + speech_recognition: "语音识别", + speech_synthesis: "语音合成", + current_dataset: "当前数据集", + linked_datasets: "关联数据集", + unfavorite: "取消收藏", + favorite: "收藏", + disassociate: "取消关联", + public_dataset: "公开数据集", + selected_data_file: "已选数据文件", + sure: "确定", + search_dataset: "搜数据集名称/描述...", + image_label:"镜像", + image_select_placeholder:"选择镜像或输入镜像地址", + image_select:"选择镜像", + image_search_placeholder:"搜镜像Tag/描述/标签...", + image_public:"公开镜像", + image_use:"使用", + image_my:"我的镜像", + image_commit:"提交中", + image_commit_content:"检测提交镜像是否大小超过20G!", + image_commit_failed:"提交失败", + image_collected:"我收藏的镜像", + dataset_label:"数据集", + dataset_select_placeholder:"选择数据集文件", + dataset_select:"选择数据集", + dataset_search_placeholder:"搜数据集名称/描述...", + dataset_unziping:"正在解压缩", + dataset_unzip_failed:"解压失败", + dataset_my_upload:"我上传的", + dataset_current_repo:"本项目", + dataset_public:"公开数据集", + dataset_collected:"我收藏的", + dataset_selected:"已选数据文件", + dataset_ok:"确定", + dataset_not_equal_file:"不能选择相同名称的数据文件", + dataset_most:"最多不超过五个文件", + }, + US: { + computer_vision: "computer vision", + natural_language_processing: "natural language processing", + speech_processing: "speech processing", + computer_vision_natural_language_processing: + "computer vision and natural language processing", + machine_translation: "machine translation", + question_answering_system: "question answering system", + information_retrieval: "information retrieval", + knowledge_graph: "knowledge graph", + text_annotation: "text annotation", + text_categorization: "text categorization", + emotion_analysis: "emotion analysis", + language_modeling: "language modeling", + speech_recognition: "speech recognition", + automatic_digest: "automatic digest", + information_extraction: "information extraction", + description_generation: "description generation", + image_classification: "image classification", + face_recognition: "face recognition", + image_search: "image search", + target_detection: "target detection", + image_description_generation: "image description generation", + vehicle_license_plate_recognition: "vehicle license plate recognition", + medical_image_analysis: "medical image analysis", + unmanned: "unmanned", + unmanned_security: "unmanned security", + drone: "drone", + vr_ar: "VR/AR", + "2_d_vision": "2.D vision", + "2.5_d_vision": "2.5D vision", + "3_d_reconstruction": "3Dreconstruction", + image_processing: "image processing", + video_processing: "video processing", + visual_input_system: "visual input system", + speech_coding: "speech coding", + speech_enhancement: "speech enhancement", + speech_recognition: "speech recognition", + speech_synthesis: "speech synthesis", + current_dataset: "Current Dataset", + linked_datasets: "Linked Datasets", + unfavorite: "Unfavorite", + favorite: "Favorite", + disassociate: "Disassociate", + public_dataset: "Public Dataset", + selected_data_file: "Selected Data File", + sure: "Sure", + search_dataset: "Search dataset name/description ...", + image_label:"Image", + image_select_placeholder:"Select image or input image url", + image_select:"Select Image", + image_search_placeholder:"Search image tag/description/label...", + image_public:"Public Image", + image_use:"Use", + image_my:"My Images", + image_commit:"Commiting", + image_commit_content:"Check whether the size of the submitted image exceeds 20g.", + image_commit_failed:"Commit failed", + image_collected:"My collected images", + dataset_label:"Dataset", + dataset_select_placeholder:"Select dataset file", + dataset_select:"Select dataset", + dataset_search_placeholder:"Search dataset name/description ...", + dataset_unziping:"Decompressing", + dataset_unzip_failed:"Decompression failed", + dataset_my_upload:"Upload by me", + dataset_current_repo:"Current Repository", + dataset_public:"Public dataset", + dataset_collected:"My collection", + dataset_selected:"Selected dataset file", + dataset_ok:"OK", + dataset_not_equal_file:"Cannot select a data file with the same name.", + dataset_most:"Up to five files.", + }, +}; From 5f0a374688922979450cf9c283ae582d18990b8b Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 23 Aug 2022 16:51:23 +0800 Subject: [PATCH 15/18] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/api/v1/repo/cloudbrain.go | 1 + templates/repo/cloudbrain/trainjob/show.tmpl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/routers/api/v1/repo/cloudbrain.go b/routers/api/v1/repo/cloudbrain.go index a8c5762e4..5abb70e78 100755 --- a/routers/api/v1/repo/cloudbrain.go +++ b/routers/api/v1/repo/cloudbrain.go @@ -378,6 +378,7 @@ func CloudbrainDownloadLogFile(ctx *context.Context) { ctx.ServerError(err.Error(), err) return } + prefix := "/" + setting.CBCodePathPrefix + job.JobName + "/model" files, err := storage.GetOneLevelAllObjectUnderDirMinio(setting.Attachment.Minio.Bucket, prefix, "") if err != nil { diff --git a/templates/repo/cloudbrain/trainjob/show.tmpl b/templates/repo/cloudbrain/trainjob/show.tmpl index 2be624ddb..ba299a7eb 100644 --- a/templates/repo/cloudbrain/trainjob/show.tmpl +++ b/templates/repo/cloudbrain/trainjob/show.tmpl @@ -499,7 +499,7 @@
+ href="/api/v1/repos/{{$.RepoRelPath}}/cloudbrain/{{.ID}}/download_log_file"> {{$.i18n.Tr "repo.modelarts.download_log"}} From fb8113a1eaff70b325936813414fdcdd454f341b Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 23 Aug 2022 16:53:43 +0800 Subject: [PATCH 16/18] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/api/v1/repo/cloudbrain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/api/v1/repo/cloudbrain.go b/routers/api/v1/repo/cloudbrain.go index 5abb70e78..b450b2e26 100755 --- a/routers/api/v1/repo/cloudbrain.go +++ b/routers/api/v1/repo/cloudbrain.go @@ -399,7 +399,7 @@ func CloudbrainDownloadLogFile(ctx *context.Context) { ctx.ServerError("Get minio get SignedUrl failed", err) return } - http.Redirect(ctx.Resp, ctx.Req.Request, url, http.StatusMovedPermanently) + http.Redirect(ctx.Resp, ctx.Req.Request, url, http.StatusTemporaryRedirect) } } From 42f5a8d2c9d2d3a49f334fa8bbd78c1813f18f4d Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 23 Aug 2022 16:56:26 +0800 Subject: [PATCH 17/18] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- web_src/js/features/datsetCate.js | 149 ------------------------------ 1 file changed, 149 deletions(-) delete mode 100644 web_src/js/features/datsetCate.js diff --git a/web_src/js/features/datsetCate.js b/web_src/js/features/datsetCate.js deleted file mode 100644 index ccb344ec1..000000000 --- a/web_src/js/features/datsetCate.js +++ /dev/null @@ -1,149 +0,0 @@ -export const i18nVue = { - CN: { - computer_vision: "计算机视觉", - natural_language_processing: "自然语言处理", - speech_processing: "语音处理", - computer_vision_natural_language_processing: "计算机视觉、自然语言处理", - machine_translation: "机器翻译", - question_answering_system: "问答系统", - information_retrieval: "信息检索", - knowledge_graph: "知识图谱", - text_annotation: "文本标注", - text_categorization: "文本分类", - emotion_analysis: "情感分析", - language_modeling: "语言建模", - speech_recognition: "语音识别", - automatic_digest: "自动文摘", - information_extraction: "信息抽取", - description_generation: "说明生成", - image_classification: "图像分类", - face_recognition: "人脸识别", - image_search: "图像搜索", - target_detection: "目标检测", - image_description_generation: "图像描述生成", - vehicle_license_plate_recognition: "车辆车牌识别", - medical_image_analysis: "医学图像分析", - unmanned: "无人驾驶", - unmanned_security: "无人安防", - drone: "无人机", - vr_ar: "VR/AR", - "2_d_vision": "2-D视觉", - "2_5_d_vision": "2.5-D视觉", - "3_d_reconstruction": "3D重构", - image_processing: "图像处理", - video_processing: "视频处理", - visual_input_system: "视觉输入系统", - speech_coding: "语音编码", - speech_enhancement: "语音增强", - speech_recognition: "语音识别", - speech_synthesis: "语音合成", - current_dataset: "当前数据集", - linked_datasets: "关联数据集", - unfavorite: "取消收藏", - favorite: "收藏", - disassociate: "取消关联", - public_dataset: "公开数据集", - selected_data_file: "已选数据文件", - sure: "确定", - search_dataset: "搜数据集名称/描述...", - image_label:"镜像", - image_select_placeholder:"选择镜像或输入镜像地址", - image_select:"选择镜像", - image_search_placeholder:"搜镜像Tag/描述/标签...", - image_public:"公开镜像", - image_use:"使用", - image_my:"我的镜像", - image_commit:"提交中", - image_commit_content:"检测提交镜像是否大小超过20G!", - image_commit_failed:"提交失败", - image_collected:"我收藏的镜像", - dataset_label:"数据集", - dataset_select_placeholder:"选择数据集文件", - dataset_select:"选择数据集", - dataset_search_placeholder:"搜数据集名称/描述...", - dataset_unziping:"正在解压缩", - dataset_unzip_failed:"解压失败", - dataset_my_upload:"我上传的", - dataset_current_repo:"本项目", - dataset_public:"公开数据集", - dataset_collected:"我收藏的", - dataset_selected:"已选数据文件", - dataset_ok:"确定", - dataset_not_equal_file:"不能选择相同名称的数据文件", - dataset_most:"最多不超过五个文件", - }, - US: { - computer_vision: "computer vision", - natural_language_processing: "natural language processing", - speech_processing: "speech processing", - computer_vision_natural_language_processing: - "computer vision and natural language processing", - machine_translation: "machine translation", - question_answering_system: "question answering system", - information_retrieval: "information retrieval", - knowledge_graph: "knowledge graph", - text_annotation: "text annotation", - text_categorization: "text categorization", - emotion_analysis: "emotion analysis", - language_modeling: "language modeling", - speech_recognition: "speech recognition", - automatic_digest: "automatic digest", - information_extraction: "information extraction", - description_generation: "description generation", - image_classification: "image classification", - face_recognition: "face recognition", - image_search: "image search", - target_detection: "target detection", - image_description_generation: "image description generation", - vehicle_license_plate_recognition: "vehicle license plate recognition", - medical_image_analysis: "medical image analysis", - unmanned: "unmanned", - unmanned_security: "unmanned security", - drone: "drone", - vr_ar: "VR/AR", - "2_d_vision": "2.D vision", - "2.5_d_vision": "2.5D vision", - "3_d_reconstruction": "3Dreconstruction", - image_processing: "image processing", - video_processing: "video processing", - visual_input_system: "visual input system", - speech_coding: "speech coding", - speech_enhancement: "speech enhancement", - speech_recognition: "speech recognition", - speech_synthesis: "speech synthesis", - current_dataset: "Current Dataset", - linked_datasets: "Linked Datasets", - unfavorite: "Unfavorite", - favorite: "Favorite", - disassociate: "Disassociate", - public_dataset: "Public Dataset", - selected_data_file: "Selected Data File", - sure: "Sure", - search_dataset: "Search dataset name/description ...", - image_label:"Image", - image_select_placeholder:"Select image or input image url", - image_select:"Select Image", - image_search_placeholder:"Search image tag/description/label...", - image_public:"Public Image", - image_use:"Use", - image_my:"My Images", - image_commit:"Commiting", - image_commit_content:"Check whether the size of the submitted image exceeds 20g.", - image_commit_failed:"Commit failed", - image_collected:"My collected images", - dataset_label:"Dataset", - dataset_select_placeholder:"Select dataset file", - dataset_select:"Select dataset", - dataset_search_placeholder:"Search dataset name/description ...", - dataset_unziping:"Decompressing", - dataset_unzip_failed:"Decompression failed", - dataset_my_upload:"Upload by me", - dataset_current_repo:"Current Repository", - dataset_public:"Public dataset", - dataset_collected:"My collection", - dataset_selected:"Selected dataset file", - dataset_ok:"OK", - dataset_not_equal_file:"Cannot select a data file with the same name.", - dataset_most:"Up to five files.", - }, -}; From 840ff473622e82a420e40165181601d1fab8563f Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Tue, 23 Aug 2022 17:08:14 +0800 Subject: [PATCH 18/18] fix issue --- templates/repo/modelarts/notebook/show.tmpl | 2 +- templates/repo/modelarts/trainjob/version_new.tmpl | 1 + web_src/js/features/cloudbrainShow.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/repo/modelarts/notebook/show.tmpl b/templates/repo/modelarts/notebook/show.tmpl index b74e22775..65cfb68d9 100755 --- a/templates/repo/modelarts/notebook/show.tmpl +++ b/templates/repo/modelarts/notebook/show.tmpl @@ -441,7 +441,7 @@
- + {{end}} diff --git a/templates/repo/modelarts/trainjob/version_new.tmpl b/templates/repo/modelarts/trainjob/version_new.tmpl index e5d4d954a..b9d24ba7a 100644 --- a/templates/repo/modelarts/trainjob/version_new.tmpl +++ b/templates/repo/modelarts/trainjob/version_new.tmpl @@ -160,6 +160,7 @@
+
{{.i18n.Tr "repo.modelarts.train_job.add_run_parameter"}} diff --git a/web_src/js/features/cloudbrainShow.js b/web_src/js/features/cloudbrainShow.js index 9c68722a7..73a8ed7b6 100644 --- a/web_src/js/features/cloudbrainShow.js +++ b/web_src/js/features/cloudbrainShow.js @@ -419,7 +419,7 @@ export default async function initCloudrainSow() { html += ""; html += ""; html += ""; - html += "
{{$.i18n.Tr "dataset.file"}}数据集下载地址操作{{$.i18n.Tr "dataset.download_url"}}{{$.i18n.Tr "dataset.download_oper"}}
{{.DatasetName}} {{.DatasetDownloadLink}}复制链接复制链接
"; + html += ""; if (data.Dirs[i].IsDir) { html += ""; } else {