From bcc039a310896bb34789684a1ef9268650827063 Mon Sep 17 00:00:00 2001 From: chenshihai Date: Mon, 29 Aug 2022 17:53:43 +0800 Subject: [PATCH 1/4] 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 2/4] 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 3/4] 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 4/4] 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