From dfdec30bbb1a86e9a89c0c2c85acae76e6558d89 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Tue, 19 Jul 2022 11:29:36 +0800 Subject: [PATCH 1/2] fix issue --- templates/custom/wait_count_train.tmpl | 12 ++++++------ templates/repo/cloudbrain/benchmark/new.tmpl | 5 +++-- templates/repo/cloudbrain/inference/new.tmpl | 2 +- templates/repo/cloudbrain/trainjob/new.tmpl | 2 +- templates/repo/grampus/trainjob/gpu/new.tmpl | 2 +- templates/repo/grampus/trainjob/npu/new.tmpl | 2 +- templates/repo/modelarts/inferencejob/new.tmpl | 2 +- templates/repo/modelarts/trainjob/new.tmpl | 2 +- 8 files changed, 15 insertions(+), 14 deletions(-) diff --git a/templates/custom/wait_count_train.tmpl b/templates/custom/wait_count_train.tmpl index a0e130c61..c31e85fae 100644 --- a/templates/custom/wait_count_train.tmpl +++ b/templates/custom/wait_count_train.tmpl @@ -1,13 +1,13 @@
{{$queue := ""}} {{$gpuQueue := 0}} - {{range $k,$v :=.gpu_types}} + {{range $k,$v :=.type}} {{if eq $k 0}} {{ $queue = $v.Queue }} {{ end }} {{ end }} - {{ range $k,$v :=.QueuesDetail }} + {{ range $k,$v :=.ctx.QueuesDetail }} {{if eq $k $queue}} {{$gpuQueue =$v}} {{ end }} @@ -17,12 +17,12 @@ style="margin-right: 0.5rem; font-size: 16px" > {{.i18n.Tr "repo.wait_count_start"}} - {{if .QueuesDetail}} + >{{.ctx.i18n.Tr "repo.wait_count_start"}} + {{if .type}} {{ $gpuQueue }} {{else}} - {{.WaitCount}} + {{.ctx.WaitCount}} {{ end }} - {{.i18n.Tr "repo.wait_count_end"}}
diff --git a/templates/repo/cloudbrain/benchmark/new.tmpl b/templates/repo/cloudbrain/benchmark/new.tmpl index 0509ce5bc..e964112e0 100755 --- a/templates/repo/cloudbrain/benchmark/new.tmpl +++ b/templates/repo/cloudbrain/benchmark/new.tmpl @@ -62,7 +62,7 @@ {{.i18n.Tr "repo.cloudbrain.benchmark.model"}} - {{template "custom/wait_count_train" .}} + {{template "custom/wait_count_train" Dict "ctx" $ "type" .benchmark_gpu_types}}
- {{template "custom/wait_count_train" .}} + {{template "custom/wait_count_train" Dict "ctx" $ "type" .benchmark_gpu_types}}
@@ -351,4 +351,5 @@ $('.ui.create_train_job.green.button').click(function (e) { validate() }) + console.log({{$.QueuesDetail}}) \ No newline at end of file diff --git a/templates/repo/cloudbrain/inference/new.tmpl b/templates/repo/cloudbrain/inference/new.tmpl index e42c7240a..223fcfe1c 100644 --- a/templates/repo/cloudbrain/inference/new.tmpl +++ b/templates/repo/cloudbrain/inference/new.tmpl @@ -92,7 +92,7 @@ Ascend NPU
- {{template "custom/wait_count_train" .}} + {{template "custom/wait_count_train" Dict "ctx" $ "type" .inference_gpu_types}}
diff --git a/templates/repo/cloudbrain/trainjob/new.tmpl b/templates/repo/cloudbrain/trainjob/new.tmpl index 22465492b..c410889b2 100755 --- a/templates/repo/cloudbrain/trainjob/new.tmpl +++ b/templates/repo/cloudbrain/trainjob/new.tmpl @@ -126,7 +126,7 @@ Ascend NPU
- {{template "custom/wait_count_train" .}} + {{template "custom/wait_count_train" Dict "ctx" $ "type" .train_gpu_types}}
diff --git a/templates/repo/grampus/trainjob/gpu/new.tmpl b/templates/repo/grampus/trainjob/gpu/new.tmpl index 2e365fdc6..75b8bcff2 100755 --- a/templates/repo/grampus/trainjob/gpu/new.tmpl +++ b/templates/repo/grampus/trainjob/gpu/new.tmpl @@ -113,7 +113,7 @@ Ascend NPU
- {{template "custom/wait_count_train" .}} + {{template "custom/wait_count_train" Dict "ctx" $}}
diff --git a/templates/repo/grampus/trainjob/npu/new.tmpl b/templates/repo/grampus/trainjob/npu/new.tmpl index 1e863ce17..f23942e13 100755 --- a/templates/repo/grampus/trainjob/npu/new.tmpl +++ b/templates/repo/grampus/trainjob/npu/new.tmpl @@ -108,7 +108,7 @@ Ascend NPU
- {{template "custom/wait_count_train" .}} + {{template "custom/wait_count_train" Dict "ctx" $}}
diff --git a/templates/repo/modelarts/inferencejob/new.tmpl b/templates/repo/modelarts/inferencejob/new.tmpl index 116f53a45..89f4180c0 100644 --- a/templates/repo/modelarts/inferencejob/new.tmpl +++ b/templates/repo/modelarts/inferencejob/new.tmpl @@ -90,7 +90,7 @@ Ascend NPU
- {{template "custom/wait_count_train" .}} + {{template "custom/wait_count_train" Dict "ctx" $}}
diff --git a/templates/repo/modelarts/trainjob/new.tmpl b/templates/repo/modelarts/trainjob/new.tmpl index 39f9f30f5..e89482dc2 100755 --- a/templates/repo/modelarts/trainjob/new.tmpl +++ b/templates/repo/modelarts/trainjob/new.tmpl @@ -118,7 +118,7 @@ Ascend NPU
- {{template "custom/wait_count_train" .}} + {{template "custom/wait_count_train" Dict "ctx" $}}
From f3e2aa822f8b0994bcabe6bc7536bca85299feb2 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Tue, 19 Jul 2022 11:30:44 +0800 Subject: [PATCH 2/2] fix issue --- templates/repo/cloudbrain/benchmark/new.tmpl | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/repo/cloudbrain/benchmark/new.tmpl b/templates/repo/cloudbrain/benchmark/new.tmpl index e964112e0..fb1296d27 100755 --- a/templates/repo/cloudbrain/benchmark/new.tmpl +++ b/templates/repo/cloudbrain/benchmark/new.tmpl @@ -351,5 +351,4 @@ $('.ui.create_train_job.green.button').click(function (e) { validate() }) - console.log({{$.QueuesDetail}}) \ No newline at end of file