diff --git a/models/cloudbrain.go b/models/cloudbrain.go
index 61063db7d..6757a51cf 100755
--- a/models/cloudbrain.go
+++ b/models/cloudbrain.go
@@ -1952,7 +1952,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,
- ModelArtsTrainJobImageCreating, ModelArtsTrainJobSubmitTrying, ModelArtsTrainJobWaiting, ModelArtsTrainJobRunning,
+ ModelArtsTrainJobImageCreating, ModelArtsTrainJobSubmitTrying, ModelArtsTrainJobWaiting, ModelArtsTrainJobRunning, ModelArtsStopping, ModelArtsResizing,
ModelArtsTrainJobScaling, ModelArtsTrainJobCheckInit, ModelArtsTrainJobCheckRunning, ModelArtsTrainJobCheckRunningCompleted).And("repo_id = ?", repoID).Count(new(Cloudbrain))
return int(count), err
}
diff --git a/models/dataset.go b/models/dataset.go
index e91adb7d2..0c26f5446 100755
--- a/models/dataset.go
+++ b/models/dataset.go
@@ -171,16 +171,17 @@ func (datasets DatasetList) loadAttachmentAttributes(opts *SearchDatasetOptions)
}
type SearchDatasetOptions struct {
- Keyword string
- OwnerID int64
- User *User
- RepoID int64
- IncludePublic bool
- RecommendOnly bool
- Category string
- Task string
- License string
- DatasetIDs []int64
+ Keyword string
+ OwnerID int64
+ User *User
+ RepoID int64
+ IncludePublic bool
+ RecommendOnly bool
+ Category string
+ Task string
+ License string
+ DatasetIDs []int64
+ ExcludeDatasetId int64
ListOptions
SearchOrderBy
IsOwner bool
@@ -240,6 +241,10 @@ func SearchDatasetCondition(opts *SearchDatasetOptions) builder.Cond {
cond = cond.And(builder.Eq{"dataset.repo_id": opts.RepoID})
}
+ if opts.ExcludeDatasetId > 0 {
+ cond = cond.And(builder.Neq{"dataset.id": opts.ExcludeDatasetId})
+ }
+
if opts.PublicOnly {
cond = cond.And(builder.Eq{"dataset.status": DatasetStatusPublic})
cond = cond.And(builder.Eq{"attachment.is_private": false})
diff --git a/modules/cloudbrain/resty.go b/modules/cloudbrain/resty.go
index 8387d481a..170154643 100755
--- a/modules/cloudbrain/resty.go
+++ b/modules/cloudbrain/resty.go
@@ -93,7 +93,7 @@ sendjob:
return nil, fmt.Errorf("resty get queues detail failed: %s", err)
}
- if jobResult.Code == errInvalidToken && retry < 1 {
+ if (res.StatusCode() == http.StatusUnauthorized || jobResult.Code == errInvalidToken) && retry < 1 {
retry++
_ = loginCloudbrain()
goto sendjob
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index b64382e8e..d32ec0f6f 100755
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -924,7 +924,7 @@ dataset_name_tooltips = Please enter letters, numbers, _ and - up to 100 charact
dataset_no_create = No dataset has been created yet
dataset_explain = Dataset: CloudBrain I provides CPU/GPU resources, Cloudbrain II provides Ascend NPU resources, and the data set used for debugging also needs to be uploaded to the corresponding environment;
dataset_instructions_for_use = Instructions for use: You can refer to Openi AI Collaboration Platform
-dataset_camp_course = Newcomer Training Camp Course;
+dataset_camp_course = OpenI_Learning;
dataset_upload = Upload
dataset_upload_status= Upload Status
dataset_file_name = File Name
@@ -1221,7 +1221,7 @@ model_Evaluation_not_created = Model evaluation has not been created
repo_not_initialized = Code version: You have not initialized the code repository, please initialized first ;
debug_task_running_limit =Running time: no more than 4 hours, it will automatically stop if it exceeds 4 hours;
dataset_desc = Dataset: Cloud Brain 1 provides CPU/GPU,Cloud Brain 2 provides Ascend NPU.And dataset also needs to be uploaded to the corresponding environment;
-platform_instructions = Instructions for use: You can refer to the Xiaobai training camp course of Openi AI collaboration platform.
+platform_instructions = Instructions for use: You can refer to the OpenI_Learning course of Openi AI collaboration platform.
model_not_exist = Model file: You do not have a model file yet, please generate and export the model through the training task first ;
benchmark_leaderboards = Benchmark leaderboards
diff --git a/routers/repo/dataset.go b/routers/repo/dataset.go
index f047cdaa9..d65a9f2aa 100755
--- a/routers/repo/dataset.go
+++ b/routers/repo/dataset.go
@@ -529,6 +529,10 @@ func ReferenceDatasetAvailable(ctx *context.Context) {
NeedAttachment: false,
CloudBrainType: models.TypeCloudBrainAll,
}
+ dataset, _ := models.GetDatasetByRepo(&models.Repository{ID: ctx.Repo.Repository.ID})
+ if dataset != nil {
+ opts.ExcludeDatasetId = dataset.ID
+ }
datasetMultiple(ctx, opts)
}
diff --git a/templates/repo/datasets/index.tmpl b/templates/repo/datasets/index.tmpl
index 405758f50..eb7bcec21 100755
--- a/templates/repo/datasets/index.tmpl
+++ b/templates/repo/datasets/index.tmpl
@@ -417,7 +417,7 @@
{{.i18n.Tr "dataset.dataset_explain"}}
{{.i18n.Tr "dataset.dataset_instructions_for_use"}}
{{.i18n.Tr "dataset.dataset_camp_course"}}
+ href="https://git.openi.org.cn/zeizei/OpenI_Learning"> {{.i18n.Tr "dataset.dataset_camp_course"}}
diff --git a/templates/repo/modelarts/notebook/show.tmpl b/templates/repo/modelarts/notebook/show.tmpl
index a6baeb8f3..ad873fdf1 100755
--- a/templates/repo/modelarts/notebook/show.tmpl
+++ b/templates/repo/modelarts/notebook/show.tmpl
@@ -350,14 +350,14 @@
-
- {{.Image}}
+ {{.Image}}
|
@@ -427,7 +427,7 @@
-
+
@@ -437,11 +437,11 @@
| {{$.i18n.Tr "dataset.download_oper"}} |
- {{range $.datasetDownload}}
+ {{range $.datasetDownload}}
| {{.DatasetName}} |
{{.DatasetDownloadLink}} |
- {{$.i18n.Tr "dataset.download_copy"}} |
+ {{$.i18n.Tr "dataset.download_copy"}} |
{{end}}
@@ -506,4 +506,4 @@
$('td.ti-text-form-content.spec div').text(specStr);
$('td.ti-text-form-content.resorce_type div').text(getListValueWithKey(ACC_CARD_TYPE, SPEC.AccCardType));
})();
-
\ No newline at end of file
+
diff --git a/web_src/js/components/dataset/referenceDataset.vue b/web_src/js/components/dataset/referenceDataset.vue
index 1ca654c0b..e2c7d5b9c 100644
--- a/web_src/js/components/dataset/referenceDataset.vue
+++ b/web_src/js/components/dataset/referenceDataset.vue
@@ -339,19 +339,18 @@
overflow-y: auto;
"
>
-
- changeCheckSelected(checked, item)"
- style="display: flex; margin: 0.5rem 0"
- >{{
- item.Title
- }}
-
+ changeCheckSelected(checked, item)"
+ style="display: flex; margin: 0.5rem 0"
+ >{{
+ item.Title
+ }}
{
- this.selectDatasetArray.push({ ID: item.ID, Title: item.Title });
+ this.selectDatasetArray.push({
+ ID: item.ID,
+ Title: item.Title,
+ isChecked: true,
+ });
return item.ID;
});
this.dialogVisible = true;
@@ -473,7 +476,11 @@ export default {
return;
}
if (checked) {
- this.selectDatasetArray.push({ ID: item.ID, Title: item.Title });
+ this.selectDatasetArray.push({
+ ID: item.ID,
+ Title: item.Title,
+ isChecked: true,
+ });
} else {
let index = this.selectDatasetArray.findIndex((element) => {
return element.ID === item.ID;
@@ -482,12 +489,11 @@ export default {
}
},
changeCheckSelected(checked, item) {
- if (!checked) {
- let index = this.selectDatasetArray.findIndex((element) => {
- return element.ID === item.ID;
- });
- this.selectDatasetArray.splice(index, 1);
- }
+ let index = this.selectDatasetArray.findIndex((element) => {
+ return element.ID === item.ID;
+ });
+ this.selectDatasetArray.splice(index, 1);
+ this.checkList.splice(index, 1);
},
postStar(item, isSigned) {
if (!isSigned) {
diff --git a/web_src/js/components/dataset/selectDataset.vue b/web_src/js/components/dataset/selectDataset.vue
index dbfa39340..ecce6b02f 100755
--- a/web_src/js/components/dataset/selectDataset.vue
+++ b/web_src/js/components/dataset/selectDataset.vue
@@ -11,9 +11,9 @@
v-if="benchmarkNew"
class="label-fix-width"
style="font-weight: normal"
- >{{i18n.dataset_label}}{{ i18n.dataset_label }}
-
+
{{i18n.dataset_select}}
+ >{{ i18n.dataset_select }}
-
+
- {{i18n.dataset_unziping}}
+ {{ i18n.dataset_unziping }}
- {{i18n.dataset_unzip_failed}}
+ {{ i18n.dataset_unzip_failed }}
@@ -201,7 +205,11 @@
-
+
- {{i18n.dataset_unziping}}
+ {{ i18n.dataset_unziping }}
- {{i18n.dataset_unzip_failed}}
+ {{ i18n.dataset_unzip_failed }}
@@ -380,13 +388,13 @@
class="zip-loading"
v-if="data.DecompressState === 2"
>
- {{i18n.dataset_unziping}}
+ {{ i18n.dataset_unziping }}
- {{i18n.dataset_unzip_failed}}
+ {{ i18n.dataset_unzip_failed }}
@@ -486,13 +494,13 @@
class="zip-loading"
v-if="data.DecompressState === 2"
>
- {{i18n.dataset_unziping}}
+ {{ i18n.dataset_unziping }}
- {{i18n.dataset_unzip_failed}}
+ {{ i18n.dataset_unzip_failed }}
@@ -536,7 +544,7 @@
line-height: 40px;
"
>
- {{i18n.dataset_selected}}
+ {{ i18n.dataset_selected }}
@@ -558,7 +566,7 @@
color: #fff;
border: 1px solid #389e0d;
"
- >{{i18n.dataset_ok}}{{ i18n.dataset_ok }}
@@ -732,7 +740,6 @@ export default {
.then((res) => {
this.loadingCurrent = false;
let data = JSON.parse(res.data.data);
- console.log(data);
this.currentDatasetList = this.transformeTreeData(
data,
"currentTree",
@@ -996,7 +1003,6 @@ export default {
location.href.indexOf("train-job") !== -1 ||
location.href.indexOf("inference") !== -1
) {
- console.log("this.benchmarkNew");
this.benchmarkNew = true;
}
if (
diff --git a/web_src/js/features/i18nVue.js b/web_src/js/features/i18nVue.js
index 05932854a..d5154a74a 100644
--- a/web_src/js/features/i18nVue.js
+++ b/web_src/js/features/i18nVue.js
@@ -142,16 +142,16 @@ export const i18nVue = {
disassociate: "Unlink",
public_dataset: "Public Dataset",
selected_data_file: "Selected DataSets",
- sure: "Ok",
+ sure: "OK",
search_dataset: "Search dataset name/description ...",
citations: "Citations",
downloads: "Downloads",
- not_link_dataset: "No datasets have been associated yet",
+ not_link_dataset: "No datasets have been linked yet",
no_link_dataset_tips1:
- "You can display public datasets on the platform here by clicking the New Linked Dataset button.",
+ "You can display public datasets on the platform here by clicking the Linked Datasets button.",
dataset_instructions_for_use:
- "Instructions for use: You can refer to Openi AI Collaboration Platform ",
+ "Instructions for use: You can refer to OpenI AI Collaboration Platform ",
dataset_camp_course: " Newcomer Training Camp Course",
dataset_link_success: "Linked dataset succeeded!",
dataset_link_failed: "Linked dataset Failed!",