From 97a710c4e9e6f4f134a177e472be84694a3b73e6 Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 27 Oct 2022 08:51:38 +0800 Subject: [PATCH 1/8] =?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=B9=E4=B8=80=E4=B8=8B=E6=9C=80=E7=BB=88?= =?UTF-8?q?=E7=BB=93=E6=9D=9F=E6=97=B6=E9=97=B4=E5=80=BC=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/aisafety.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/routers/repo/aisafety.go b/routers/repo/aisafety.go index 554147d51..21a3b4d95 100644 --- a/routers/repo/aisafety.go +++ b/routers/repo/aisafety.go @@ -307,6 +307,9 @@ func queryTaskStatusFromModelSafetyTestServer(job *models.Cloudbrain) { if result.Data.Status == 1 { log.Info("The task is running....") } else { + job.EndTime = timeutil.TimeStampNow() + job.Duration = (int64(job.EndTime) - int64(job.StartTime)) / 1000 + job.TrainJobDuration = models.ConvertDurationToStr(job.Duration) if result.Data.Code == 0 { job.ResultJson = result.Data.StandardJson job.Status = string(models.JobSucceeded) From 50726948898a1c9d9ba5b9d03ebfee004a2ede6e Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 27 Oct 2022 08:56:47 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E6=9B=B4=E6=96=B0=E6=9C=80=E5=90=8E=E7=BB=93=E6=9D=9F?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/aisafety.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routers/repo/aisafety.go b/routers/repo/aisafety.go index 21a3b4d95..650848d11 100644 --- a/routers/repo/aisafety.go +++ b/routers/repo/aisafety.go @@ -291,6 +291,7 @@ func queryTaskStatusFromCloudbrain(job *models.Cloudbrain) { } else { // job.Status = string(models.ModelSafetyTesting) + job.EndTime = 0 err = models.UpdateJob(job) if err != nil { log.Error("UpdateJob failed:", err) @@ -443,6 +444,9 @@ func updateJobFailed(job *models.Cloudbrain, msg string) { //update task failed. job.Status = string(models.ModelArtsTrainJobFailed) job.ResultJson = msg + job.EndTime = timeutil.TimeStampNow() + job.Duration = (int64(job.EndTime) - int64(job.StartTime)) / 1000 + job.TrainJobDuration = models.ConvertDurationToStr(job.Duration) err := models.UpdateJob(job) if err != nil { log.Error("UpdateJob failed:", err) From 5cdfc4c0a09d1b9cee259759082e76b1431ed9f4 Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 27 Oct 2022 09:05:09 +0800 Subject: [PATCH 3/8] =?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=AD=A3=E6=9C=80=E5=90=8E=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/aisafety.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/repo/aisafety.go b/routers/repo/aisafety.go index 650848d11..e274f808e 100644 --- a/routers/repo/aisafety.go +++ b/routers/repo/aisafety.go @@ -309,7 +309,7 @@ func queryTaskStatusFromModelSafetyTestServer(job *models.Cloudbrain) { log.Info("The task is running....") } else { job.EndTime = timeutil.TimeStampNow() - job.Duration = (int64(job.EndTime) - int64(job.StartTime)) / 1000 + job.Duration = (job.EndTime.AsTime().Unix() - job.StartTime.AsTime().Unix()) / 1000 job.TrainJobDuration = models.ConvertDurationToStr(job.Duration) if result.Data.Code == 0 { job.ResultJson = result.Data.StandardJson @@ -445,7 +445,7 @@ func updateJobFailed(job *models.Cloudbrain, msg string) { job.Status = string(models.ModelArtsTrainJobFailed) job.ResultJson = msg job.EndTime = timeutil.TimeStampNow() - job.Duration = (int64(job.EndTime) - int64(job.StartTime)) / 1000 + job.Duration = (job.EndTime.AsTime().Unix() - job.StartTime.AsTime().Unix()) / 1000 job.TrainJobDuration = models.ConvertDurationToStr(job.Duration) err := models.UpdateJob(job) if err != nil { From 7f2b35d3321d65455ee22b04299047081a5af543 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Thu, 27 Oct 2022 15:48:42 +0800 Subject: [PATCH 4/8] fix issue --- options/locale/locale_en-US.ini | 3 ++- options/locale/locale_zh-CN.ini | 2 ++ templates/custom/alert_cb.tmpl | 7 +++---- templates/repo/badge.tmpl | 2 +- templates/repo/cloudbrain/benchmark/new.tmpl | 6 +++--- templates/repo/cloudbrain/inference/new.tmpl | 6 ++++-- templates/repo/cloudbrain/new.tmpl | 6 ++++-- templates/repo/cloudbrain/trainjob/new.tmpl | 6 ++++-- templates/repo/grampus/trainjob/gpu/new.tmpl | 6 ++++-- templates/repo/grampus/trainjob/npu/new.tmpl | 6 ++++-- templates/repo/modelarts/inferencejob/new.tmpl | 6 ++++-- templates/repo/modelarts/notebook/new.tmpl | 9 +++++---- templates/repo/modelarts/trainjob/new.tmpl | 6 ++++-- templates/repo/modelsafety/new.tmpl | 6 ++++-- templates/resource_desc.tmpl | 2 +- templates/user/profile.tmpl | 2 +- web_src/less/_user.less | 10 ---------- 17 files changed, 50 insertions(+), 41 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 75314f6ec..f6518b930 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1216,7 +1216,8 @@ cloudbrain.benchmark.evaluate_train=Train Script cloudbrain.benchmark.evaluate_test=Test Script cloudbrain.benchmark.types={"type":[{"id":1,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=detection","first":"Target detection","second":[{"id":1,"value":"None","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"yangzhx","repo_name":"detection_benchmark_script"}]},{"id":2,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=reid","first":"Target re-identification","second":[{"id":1,"value":"Vehicle re-identification","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"},{"id":2,"value":"Image-based person re-identification","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"}]},{"id":3,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=tracking","first":"Multi-target tracking","second":[{"id":1,"value":"None","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"lix07","repo_name":"MOT_benchmark_script"}]}]} cloudbrain.morethanonejob=You already have a running or waiting task, create it after that task is over. - +cloudbrain.morethanonejob1=You have created a similar task that is waiting or running, please wait for the task to finish before creating it. +cloudbrain.morethanonejob2=You can view all your Cloud Brain tasks in Personal Center > Cloud Brain Tasks . modelarts.infer_job_model = Model modelarts.infer_job_model_file = Model File diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index a6a841b76..29dfc31c4 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -1230,6 +1230,8 @@ cloudbrain.benchmark.evaluate_test=测试程序 cloudbrain.benchmark.types={"type":[{"id":1,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=detection","first":"目标检测","second":[{"id":1,"value":"无","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"yangzhx","repo_name":"detection_benchmark_script"}]},{"id":2,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=reid","first":"目标重识别","second":[{"id":1,"value":"车辆重识别","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"},{"id":2,"value":"基于图像的行人重识别","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"}]},{"id":3,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=tracking","first":"多目标跟踪","second":[{"id":1,"value":"无","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"lix07","repo_name":"MOT_benchmark_script"}]}]} cloudbrain.benchmark.model.types={"type":[{"id":1,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=detection","first":"目标检测","second":[{"id":1,"value":"无","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"yangzhx","repo_name":"detection_benchmark_script"}]},{"id":2,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=reid","first":"目标重识别","second":[{"id":1,"value":"车辆重识别","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"},{"id":2,"value":"基于图像的行人重识别","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"}]},{"id":3,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=tracking","first":"多目标跟踪","second":[{"id":1,"value":"无","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"lix07","repo_name":"MOT_benchmark_script"}]}]} cloudbrain.morethanonejob=您已经创建了一个正在等待或运行中的同类任务,请等待任务结束再创建。 +cloudbrain.morethanonejob1=您已经有 同类任务 正在等待或运行中,请等待任务结束再创建; +cloudbrain.morethanonejob2=可以在 “个人中心 > 云脑任务” 查看您所有的云脑任务。 modelarts.infer_job_model = 模型名称 modelarts.infer_job_model_file = 模型文件 diff --git a/templates/custom/alert_cb.tmpl b/templates/custom/alert_cb.tmpl index 3ea03b8e5..c4c8d9998 100644 --- a/templates/custom/alert_cb.tmpl +++ b/templates/custom/alert_cb.tmpl @@ -1,11 +1,10 @@ {{if .NotStopTaskCount}} -
- +
-
您已经有 同类任务 正在等待或运行中,请等待任务结束再创建
-
可以在 “个人中心 > 云脑任务” 查看您所有的云脑任务
+
{{.i18n.Tr "repo.cloudbrain.morethanonejob1" | Safe }}
+
{{.i18n.Tr "repo.cloudbrain.morethanonejob2" | Safe}}
diff --git a/templates/repo/badge.tmpl b/templates/repo/badge.tmpl index 61b542be8..86b482c4a 100644 --- a/templates/repo/badge.tmpl +++ b/templates/repo/badge.tmpl @@ -1,7 +1,7 @@
{{range .AllBadges }}
-
{{.CategoryName}}   (已点亮{{.LightedNum}}个)
+
{{.CategoryName}}   (已点亮 {{.LightedNum}} 个)
diff --git a/templates/repo/cloudbrain/benchmark/new.tmpl b/templates/repo/cloudbrain/benchmark/new.tmpl index a07c4e22d..cec71ae99 100755 --- a/templates/repo/cloudbrain/benchmark/new.tmpl +++ b/templates/repo/cloudbrain/benchmark/new.tmpl @@ -151,7 +151,7 @@
- {{.i18n.Tr "repo.cloudbrain.cancel"}} @@ -283,7 +283,7 @@
- {{.i18n.Tr "repo.cloudbrain.cancel"}} @@ -354,7 +354,7 @@
- {{.i18n.Tr "repo.cloudbrain.cancel"}} diff --git a/templates/repo/cloudbrain/inference/new.tmpl b/templates/repo/cloudbrain/inference/new.tmpl index aacead3fd..df737f995 100644 --- a/templates/repo/cloudbrain/inference/new.tmpl +++ b/templates/repo/cloudbrain/inference/new.tmpl @@ -40,7 +40,9 @@
{{template "repo/header" .}}
- {{template "base/alert" .}} + {{if eq .NotStopTaskCount 0}} + {{template "base/alert" .}} + {{end}} {{template "custom/alert_cb" .}}

@@ -272,7 +274,7 @@
- {{.i18n.Tr "repo.cloudbrain.cancel"}} diff --git a/templates/repo/cloudbrain/new.tmpl b/templates/repo/cloudbrain/new.tmpl index 7fb2bd146..b75e75cdf 100755 --- a/templates/repo/cloudbrain/new.tmpl +++ b/templates/repo/cloudbrain/new.tmpl @@ -24,7 +24,9 @@
- {{template "base/alert" .}} + {{if eq .NotStopTaskCount 0}} + {{template "base/alert" .}} + {{end}} @@ -200,7 +202,7 @@
- - {{template "base/alert" .}} + {{if eq .NotStopTaskCount 0}} + {{template "base/alert" .}} + {{end}} {{template "custom/alert_cb" .}}

{{.i18n.Tr "repo.modelarts.train_job.new"}} @@ -232,7 +234,7 @@
- - {{template "base/alert" .}} + {{if eq .NotStopTaskCount 0}} + {{template "base/alert" .}} + {{end}} {{template "custom/alert_cb" .}}

{{.i18n.Tr "repo.modelarts.train_job.new"}} @@ -205,7 +207,7 @@
- {{.i18n.Tr "repo.cloudbrain.cancel"}} diff --git a/templates/repo/grampus/trainjob/npu/new.tmpl b/templates/repo/grampus/trainjob/npu/new.tmpl index dde6c8592..22cc6dc17 100755 --- a/templates/repo/grampus/trainjob/npu/new.tmpl +++ b/templates/repo/grampus/trainjob/npu/new.tmpl @@ -58,7 +58,9 @@ {{template "repo/header" .}}
- {{template "base/alert" .}} + {{if eq .NotStopTaskCount 0}} + {{template "base/alert" .}} + {{end}} {{template "custom/alert_cb" .}}

{{.i18n.Tr "repo.modelarts.train_job.new"}} @@ -229,7 +231,7 @@
- {{.i18n.Tr "repo.cloudbrain.cancel"}} diff --git a/templates/repo/modelarts/inferencejob/new.tmpl b/templates/repo/modelarts/inferencejob/new.tmpl index 699190f2b..48d64cf56 100644 --- a/templates/repo/modelarts/inferencejob/new.tmpl +++ b/templates/repo/modelarts/inferencejob/new.tmpl @@ -39,7 +39,9 @@
{{template "repo/header" .}}
- {{template "base/alert" .}} + {{if eq .NotStopTaskCount 0}} + {{template "base/alert" .}} + {{end}} {{template "custom/alert_cb" .}}

@@ -300,7 +302,7 @@
- {{.i18n.Tr "repo.cloudbrain.cancel"}} diff --git a/templates/repo/modelarts/notebook/new.tmpl b/templates/repo/modelarts/notebook/new.tmpl index 8b3931c71..e149d6095 100755 --- a/templates/repo/modelarts/notebook/new.tmpl +++ b/templates/repo/modelarts/notebook/new.tmpl @@ -11,11 +11,12 @@
- {{template "base/alert" .}} -
+ {{if eq .NotStopTaskCount 0}} + {{template "base/alert" .}} + {{end}} + - {{template "custom/alert_cb" .}}
{{.CsrfTokenHtml}} @@ -106,7 +107,7 @@
- {{.i18n.Tr "repo.cloudbrain.cancel"}} diff --git a/templates/repo/modelarts/trainjob/new.tmpl b/templates/repo/modelarts/trainjob/new.tmpl index 6323df73f..d52ce26ab 100755 --- a/templates/repo/modelarts/trainjob/new.tmpl +++ b/templates/repo/modelarts/trainjob/new.tmpl @@ -63,7 +63,9 @@ {{template "repo/header" .}}
- {{template "base/alert" .}} + {{if eq .NotStopTaskCount 0}} + {{template "base/alert" .}} + {{end}} {{template "custom/alert_cb" .}}

{{.i18n.Tr "repo.modelarts.train_job.new"}} @@ -291,7 +293,7 @@
- {{.i18n.Tr "repo.cloudbrain.cancel"}} diff --git a/templates/repo/modelsafety/new.tmpl b/templates/repo/modelsafety/new.tmpl index 34e9d53f5..94f52cc1f 100644 --- a/templates/repo/modelsafety/new.tmpl +++ b/templates/repo/modelsafety/new.tmpl @@ -55,7 +55,9 @@
{{$Grampus := (or (eq (index (SubJumpablePath .Link) 1) "create_grampus_gpu") (eq (index (SubJumpablePath .Link) 1) "create_grampus_npu"))}} - {{template "base/alert" .}} + {{if eq .NotStopTaskCount 0}} + {{template "base/alert" .}} + {{end}} {{template "custom/alert_cb" .}}

{{.i18n.Tr "repo.modelarts.evaluate_job.new_job"}} @@ -314,7 +316,7 @@

- {{.i18n.Tr "repo.cloudbrain.cancel"}} diff --git a/templates/resource_desc.tmpl b/templates/resource_desc.tmpl index 30ae3ff14..066f5d090 100644 --- a/templates/resource_desc.tmpl +++ b/templates/resource_desc.tmpl @@ -65,7 +65,7 @@ ${el.dockerDir} - ${el.example_repo} + ${el.example_repo} ${el.note}`; }); html2 = html2.replace( diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index d4e97a961..1310069f6 100755 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -21,7 +21,7 @@
{{range $k,$v :=.RecentBadges}} {{if le $k 3}} -
+
{{else}} {{end}} diff --git a/web_src/less/_user.less b/web_src/less/_user.less index 29ca96255..7afa72383 100644 --- a/web_src/less/_user.less +++ b/web_src/less/_user.less @@ -233,14 +233,4 @@ -webkit-line-clamp: 2; -webkit-box-orient: vertical; } - .badge-section-title:before { - content: ""; - position: absolute; - top: 50%; - left: 0; - transform: translateY(-50%); - width: 3px; - height: 1em; - background-color: #000; - } } From c4554b99eb1c2f871dd1aa5a7386b48e474e0ddc Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Thu, 27 Oct 2022 15:50:46 +0800 Subject: [PATCH 5/8] fix issue --- templates/repo/cloudbrain/benchmark/new.tmpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/repo/cloudbrain/benchmark/new.tmpl b/templates/repo/cloudbrain/benchmark/new.tmpl index cec71ae99..03583779e 100755 --- a/templates/repo/cloudbrain/benchmark/new.tmpl +++ b/templates/repo/cloudbrain/benchmark/new.tmpl @@ -32,7 +32,9 @@
{{template "repo/header" .}}
- {{template "base/alert" .}} + {{if eq .NotStopTaskCount 0}} + {{template "base/alert" .}} + {{end}} {{template "custom/alert_cb" .}}

{{.i18n.Tr "repo.modelarts.evaluate_job.new_job"}} From 0e3da74e06a864b516483f6f9cef094b55d682f6 Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 27 Oct 2022 16:06:09 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=B8=80=E4=BA=9BBug?= =?UTF-8?q?=EF=BC=8C#3076=EF=BC=8C#3077=EF=BC=8C#3069?= 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 +- templates/base/footer_content.tmpl | 2 +- templates/repo/modelmanage/showinfo.tmpl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 75314f6ec..99edcaae6 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -265,7 +265,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=China Computing Network +c2net_title=China Computing Network(C²NET) c2net_desc=Extensive access to intelligent computing centers and supercomputing centers across the country to provide users with free computing resources. c2net_center=Center search=Search diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index a6a841b76..0ebd581b1 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -267,7 +267,7 @@ page_dev_yunlao_desc3=中国算力网(C²NET)一期可实现不同人工智 page_dev_yunlao_desc4=开发者可以根据使用需求,自由选择相应计算资源,可以测试模型在不同硬件环境下的适配能力、性能、稳定性等。 page_dev_yunlao_desc5=如果您的模型需要更多的计算资源,也可以单独申请。 page_dev_yunlao_apply=单独申请 -c2net_title=中国算力网 +c2net_title=中国算力网(C²NET) c2net_desc=广泛接入全国各地智算中心、超算中心,为用户提供免费算力资源 c2net_center=中心 search=搜索 diff --git a/templates/base/footer_content.tmpl b/templates/base/footer_content.tmpl index 8786af653..aae807b4b 100755 --- a/templates/base/footer_content.tmpl +++ b/templates/base/footer_content.tmpl @@ -45,7 +45,7 @@
{{.i18n.Tr "custom.foot.copyright"}} 京ICP备18004880号
- {{.i18n.Tr "Powered_by 鹏城实验室云脑、"}}Trustie确实{{.i18n.Tr "、gitea"}} + {{.i18n.Tr "Powered_by 鹏城实验室云脑、中国算力网(C²NET)、"}}Trustie确实{{.i18n.Tr "、Gitea"}}

diff --git a/templates/repo/modelmanage/showinfo.tmpl b/templates/repo/modelmanage/showinfo.tmpl index 4cc0305ed..6e4aa2b5a 100644 --- a/templates/repo/modelmanage/showinfo.tmpl +++ b/templates/repo/modelmanage/showinfo.tmpl @@ -285,7 +285,7 @@ function transObj(data){ DatasetName:TrainTaskInfo.DatasetName || '--', Parameters:TrainTaskInfo.Parameters || '--', FlavorName:TrainTaskInfo.FlavorName || '--', - WorkServerNumber:TrainTaskInfo.WorkServerNumber || '--', + WorkServerNumber:TrainTaskInfo.WorkServerNumber || '1', Parameters:Parameters, EngineName:EngineName, DisplayJobName:TrainTaskInfo.DisplayJobName || '--', From 0f90c9205f95d2943f495d2963464d48522beab1 Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 27 Oct 2022 16:12:23 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E8=A7=A3=E5=86=B3=E7=9B=B8=E5=85=B3issue?= 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 | 3 ++- options/locale/locale_zh-CN.ini | 1 + templates/base/footer_content.tmpl | 2 +- templates/repo/modelmanage/index.tmpl | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 99edcaae6..4af48d60b 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -265,7 +265,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=China Computing Network(C²NET) +c2net_title=China Computing NET(C²NET) c2net_desc=Extensive access to intelligent computing centers and supercomputing centers across the country to provide users with free computing resources. c2net_center=Center search=Search @@ -289,6 +289,7 @@ provide_resoure = Computing resources of CPU/GPU/NPU are provided freely for var activity = Activity no_events = There are no events related or_t = or +powerdby=Powered_by Pengcheng CloudBrain、China Computing NET(C²NET)、 [explore] repos = Repositories diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 0ebd581b1..a8de7e421 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -292,6 +292,7 @@ create_pro = 创建项目 activity = 活动 no_events = 还没有与您相关的活动 or_t = 或 +powerdby=Powered_by 鹏城实验室云脑、中国算力网(C²NET)、 [explore] diff --git a/templates/base/footer_content.tmpl b/templates/base/footer_content.tmpl index aae807b4b..cb732bbbe 100755 --- a/templates/base/footer_content.tmpl +++ b/templates/base/footer_content.tmpl @@ -45,7 +45,7 @@
{{.i18n.Tr "custom.foot.copyright"}} 京ICP备18004880号
- {{.i18n.Tr "Powered_by 鹏城实验室云脑、中国算力网(C²NET)、"}}Trustie确实{{.i18n.Tr "、Gitea"}} + {{.i18n.Tr "home.powerdby"}}Trustie确实{{.i18n.Tr "、Gitea"}}
diff --git a/templates/repo/modelmanage/index.tmpl b/templates/repo/modelmanage/index.tmpl index b2994f0c2..062e1908f 100644 --- a/templates/repo/modelmanage/index.tmpl +++ b/templates/repo/modelmanage/index.tmpl @@ -565,4 +565,5 @@ $("#choice_Engine").removeClass('disabled'); } } + \ No newline at end of file From d74ac930bb66bbeca7c70f752b057e145a5ccf8e Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 27 Oct 2022 17:17:17 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E8=A1=8C=E6=95=B0=E4=BF=AE=E6=94=B9=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 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/routers/api/v1/repo/cloudbrain.go b/routers/api/v1/repo/cloudbrain.go index ba46ab58c..37a9e0147 100755 --- a/routers/api/v1/repo/cloudbrain.go +++ b/routers/api/v1/repo/cloudbrain.go @@ -572,6 +572,11 @@ func CloudbrainGetLog(ctx *context.APIContext) { startLine = 0 } } + } else { + if startLine > 0 { + startLine += 1 + endLine += 1 + } } result = getLogFromModelDir(job.JobName, startLine, endLine, resultPath) if result == nil { @@ -723,6 +728,7 @@ func getLogFromModelDir(jobName string, startLine int, endLine int, resultPath s re = re + line count++ } + fileEndLine = i + 1 log.Info("read file completed.") break } @@ -732,13 +738,12 @@ func getLogFromModelDir(jobName string, startLine int, endLine int, resultPath s } if error == nil { if i >= startLine { - fileEndLine = i + fileEndLine = i + 1 re = re + line count++ } } } - fileEndLine = fileEndLine + 1 } else { log.Info("error:" + err.Error()) }