From 46a3354d6621db68a8d132f4eac605d03bbe6361 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Thu, 21 Jul 2022 15:41:36 +0800 Subject: [PATCH] fix issue --- templates/repo/cloudbrain/inference/new.tmpl | 65 +++++++++++-------- templates/repo/cloudbrain/trainjob/new.tmpl | 65 +++++++++++-------- templates/repo/grampus/trainjob/gpu/new.tmpl | 34 ++++++---- templates/repo/grampus/trainjob/npu/new.tmpl | 58 +++++++++++++++-- .../repo/modelarts/inferencejob/new.tmpl | 36 +++++++++- templates/repo/modelarts/trainjob/new.tmpl | 38 +++++++++-- .../components/images/selectGrampusImages.vue | 3 + web_src/js/components/images/selectImages.vue | 3 + 8 files changed, 223 insertions(+), 79 deletions(-) diff --git a/templates/repo/cloudbrain/inference/new.tmpl b/templates/repo/cloudbrain/inference/new.tmpl index 223fcfe1c..1126644ec 100644 --- a/templates/repo/cloudbrain/inference/new.tmpl +++ b/templates/repo/cloudbrain/inference/new.tmpl @@ -58,18 +58,7 @@
{{.CsrfTokenHtml}} - - - {{if $.model_version}} - - {{else}} - - {{end}} - {{if $.label_names}} - - {{else}} - - {{end}} +

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

@@ -102,7 +91,11 @@
+ {{if .description}} + + {{else}} + {{end}}
@@ -186,8 +179,21 @@
@@ -196,8 +202,8 @@
- {{if .bootFile}} - + {{if .boot_file}} + {{else}} {{end}} @@ -244,9 +250,22 @@
@@ -397,13 +416,6 @@ msg = JSON.stringify(msg) $('#store_run_para').val(msg) } - function get_name(){ - let name1=$("#engine_name .text").text() - let name2=$("#flaver_name .text").text() - $("input#ai_engine_name").val(name1) - $("input#ai_flaver_name").val(name2) - - } function validate(){ $('.ui.form') .form({ @@ -474,7 +486,6 @@ } $('.ui.create_train_job.green.button').click(function(e) { send_run_para() - get_name() validate() }) diff --git a/templates/repo/cloudbrain/trainjob/new.tmpl b/templates/repo/cloudbrain/trainjob/new.tmpl index c410889b2..756a378ff 100755 --- a/templates/repo/cloudbrain/trainjob/new.tmpl +++ b/templates/repo/cloudbrain/trainjob/new.tmpl @@ -89,8 +89,7 @@ {{.CsrfTokenHtml}} - - +

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

@@ -140,11 +139,11 @@
- + {{if .description}} + + {{else}} + + {{end}}
@@ -179,13 +178,25 @@
-
@@ -195,8 +206,8 @@
- {{if .bootFile}} - {{else}} {{.i18n.Tr "repo.modelarts.train_job.add_run_parameter"}}
- {{if .params}} {{if ne 0 (len .params)}} {{range $k ,$v := .params}}
@@ -238,17 +248,28 @@
{{end}} {{end}} - {{end}}
-
@@ -476,15 +497,7 @@ msg = JSON.stringify(msg) $('#store_run_para').val(msg) } - function get_name() { - let name1 = $("#engine_name .text").text() - let name2 = $("#flaver_name .text").text() - $("input#ai_engine_name").val(name1) - $("input#ai_flaver_name").val(name2) - - } $('.ui.create_train_job.green.button').click(function (e) { - get_name() send_run_para() validate() }) diff --git a/templates/repo/grampus/trainjob/gpu/new.tmpl b/templates/repo/grampus/trainjob/gpu/new.tmpl index 75b8bcff2..3b9d5cea9 100755 --- a/templates/repo/grampus/trainjob/gpu/new.tmpl +++ b/templates/repo/grampus/trainjob/gpu/new.tmpl @@ -80,8 +80,7 @@ {{.CsrfTokenHtml}} - - +

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

@@ -123,7 +122,11 @@
+ {{if .description}} + + {{else}} + {{end}}
@@ -156,8 +159,8 @@
- {{if .bootFile}} - + {{if .boot_file}} + {{else}} {{end}} @@ -199,8 +202,21 @@
@@ -426,15 +442,7 @@ msg = JSON.stringify(msg) $('#store_run_para').val(msg) } - function get_name(){ - let name1=$("#engine_name .text").text() - let name2=$("#flavor_name .text").text() - $("input#ai_engine_name").val(name1) - $("input#ai_flavor_name").val(name2) - - } $('.ui.create_train_job.green.button').click(function(e) { - get_name() send_run_para() validate() }) diff --git a/templates/repo/grampus/trainjob/npu/new.tmpl b/templates/repo/grampus/trainjob/npu/new.tmpl index f23942e13..ebc52b6a1 100755 --- a/templates/repo/grampus/trainjob/npu/new.tmpl +++ b/templates/repo/grampus/trainjob/npu/new.tmpl @@ -119,7 +119,11 @@
+ {{if .description}} + + {{else}} + {{end}}
@@ -150,16 +154,29 @@
- {{if .bootFile}} - + {{if .boot_file}} + {{else}} {{end}} @@ -176,14 +193,45 @@ {{.i18n.Tr "repo.modelarts.train_job.add_run_parameter"}}
+ {{if .params}} + {{if ne 0 (len .params)}} + {{range $k ,$v := .params}} +
+
+ +
+
+ +
+ + + + +
+ {{end}} + {{end}} + {{end}}
diff --git a/templates/repo/modelarts/inferencejob/new.tmpl b/templates/repo/modelarts/inferencejob/new.tmpl index 89f4180c0..2a8ec9207 100644 --- a/templates/repo/modelarts/inferencejob/new.tmpl +++ b/templates/repo/modelarts/inferencejob/new.tmpl @@ -99,8 +99,12 @@
-    + + {{if .description}} + + {{else}} + {{end}}
@@ -169,9 +173,22 @@
@@ -251,8 +268,21 @@
diff --git a/templates/repo/modelarts/trainjob/new.tmpl b/templates/repo/modelarts/trainjob/new.tmpl index e89482dc2..74987a4e2 100755 --- a/templates/repo/modelarts/trainjob/new.tmpl +++ b/templates/repo/modelarts/trainjob/new.tmpl @@ -128,7 +128,11 @@
+ {{if .description}} + + {{else}} + {{end}}
@@ -170,9 +174,22 @@
@@ -220,7 +237,6 @@
- diff --git a/web_src/js/components/images/selectGrampusImages.vue b/web_src/js/components/images/selectGrampusImages.vue index 5bbc3a43e..f702c8cca 100755 --- a/web_src/js/components/images/selectGrampusImages.vue +++ b/web_src/js/components/images/selectGrampusImages.vue @@ -225,6 +225,9 @@ export default { }, }, mounted() { + if (document.getElementById("ai_image_name")) { + this.imageAddress = document.getElementById("ai_image_name").value; + } this.getImageListPublic(); if ( location.href.indexOf("benchmark") !== -1 || diff --git a/web_src/js/components/images/selectImages.vue b/web_src/js/components/images/selectImages.vue index d4eb8d613..844303420 100755 --- a/web_src/js/components/images/selectImages.vue +++ b/web_src/js/components/images/selectImages.vue @@ -498,6 +498,9 @@ export default { }, }, mounted() { + if (document.getElementById("ai_image_name")) { + this.imageAddress = document.getElementById("ai_image_name").value; + } this.getImageListPublic(); if ( location.href.indexOf("train-job") !== -1 ||