#4542 fix-4436

Merged
ychao_1983 merged 9 commits from fix-4436 into V20230718 10 months ago
  1. +1
    -1
      models/cloudbrain.go
  2. +3
    -4
      models/task_config.go
  3. +1
    -1
      options/locale/locale_zh-CN.ini
  4. +6
    -1
      services/cloudbrain/cloudbrainTask/sync_status.go
  5. +6
    -6
      templates/admin/cloudbrain/list.tmpl
  6. +1
    -1
      templates/admin/cloudbrain/search.tmpl
  7. +1
    -1
      templates/admin/cloudbrain/search_dashboard.tmpl
  8. +6
    -6
      templates/user/dashboard/cloudbrains.tmpl
  9. +1
    -1
      web_src/js/features/cloudrbanin.js
  10. +1
    -1
      web_src/vuepages/const/index.js
  11. +2
    -2
      web_src/vuepages/langs/config/en-US.js
  12. +3
    -0
      web_src/vuepages/pages/cloudbrain/tools.js
  13. +13
    -9
      web_src/vuepages/pages/reward/point/utils.js
  14. +0
    -1
      web_src/vuepages/pages/reward/point/vp-point.vue
  15. +2
    -6
      web_src/vuepages/pages/supercompute/configs.js
  16. +2
    -2
      web_src/vuepages/pages/supercompute/detail/index.vue
  17. +2
    -2
      web_src/vuepages/pages/supercompute/list/index.vue

+ 1
- 1
models/cloudbrain.go View File

@@ -79,7 +79,7 @@ const (
JobTypeTrain JobType = "TRAIN"
JobTypeInference JobType = "INFERENCE"
JobTypeOnlineInference JobType = "ONLINEINFERENCE"
JobTypeSuperCompute JobType = "SUPERCOMPUTE"
JobTypeSuperCompute JobType = "HPC"

//notebook
ModelArtsCreateQueue ModelArtsJobStatus = "CREATE_QUEUING" //免费资源创建排队中


+ 3
- 4
models/task_config.go View File

@@ -44,11 +44,10 @@ func GetTaskTypeFromAction(a ActionType) TaskType {
ActionCreateGrampusGCUTrainTask,
ActionCreateGrampusMLUDebugTask,
ActionCreateGrampusDCUDebugTask,
ActionCreateSuperComputeTask,
ActionCreateGrampusGPUOnlineInferTask,
ActionCreateGrampusGPUTrainTask:
return TaskCreateCloudbrainTask
case ActionCreateSuperComputeTask:
return TaskCreateSuperComputeTask
case ActionCreateRepo:
return TaskCreatePublicRepo
case ActionCreatePullRequest:
@@ -80,8 +79,8 @@ func GetTaskTypeFromAction(a ActionType) TaskType {
return ""
}

//PointTaskConfig Only add and delete are allowed, edit is not allowed
//so if you want to edit config for some task code,please delete first and add new one
// PointTaskConfig Only add and delete are allowed, edit is not allowed
// so if you want to edit config for some task code,please delete first and add new one
type TaskConfig struct {
ID int64 `xorm:"pk autoincr"`
TaskCode string `xorm:"NOT NULL"`


+ 1
- 1
options/locale/locale_zh-CN.ini View File

@@ -3377,7 +3377,7 @@ TRAIN = 训练任务
INFERENCE = 推理任务
BENCHMARK = 评测任务
ONLINEINFERENCE = 在线推理
SUPERCOMPUTE = 超算任务
HPC = 超算任务
brain_area = 脑区

Delete_failed=任务删除失败,请稍后再试。


+ 6
- 1
services/cloudbrain/cloudbrainTask/sync_status.go View File

@@ -18,7 +18,7 @@ import (
var noteBookOKMap = make(map[int64]int, 20)
var noteBookFailMap = make(map[int64]int, 20)

//if a task notebook url can get successfulCount times, the notebook can browser.
// if a task notebook url can get successfulCount times, the notebook can browser.
const successfulCount = 3
const maxSuccessfulCount = 10

@@ -169,6 +169,11 @@ func StopDebugJob(task *models.Cloudbrain) error {
}

}

if task.JobType == string(models.JobTypeSuperCompute) {
_, err = grampus.StopJob(task.JobID, task.JobType)
}

return err

}

+ 6
- 6
templates/admin/cloudbrain/list.tmpl View File

@@ -89,7 +89,7 @@
<div class="row">
<!-- 任务名 -->
{{$JobID := '0'}}
{{if eq .JobType "DEBUG" "TRAIN" "SUPERCOMPUTE" "SNN4IMAGENET" "BRAINSCORE" "BENCHMARK" "MODELSAFETY" "SNN4ECOSET" "SIM2BRAIN_SNN" "ONLINEINFERENCE"}}
{{if eq .JobType "DEBUG" "TRAIN" "HPC" "SNN4IMAGENET" "BRAINSCORE" "BENCHMARK" "MODELSAFETY" "SNN4ECOSET" "SIM2BRAIN_SNN" "ONLINEINFERENCE"}}
{{$JobID = .Cloudbrain.ID}}
{{else}}
{{$JobID = .JobID}}
@@ -103,7 +103,7 @@
<span class="fitted"
style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span>
</a>
{{else if eq .JobType "SUPERCOMPUTE"}}
{{else if eq .JobType "HPC"}}
<a class="title"
href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/supercompute/job/{{$JobID}}"
title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px">
@@ -155,7 +155,7 @@
<div class="two wide column text center nowrap"
style="width: 6% !important;">
<span class="job-status" id="{{$JobID}}"
data-repopath='{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .JobType "DEBUG" "ONLINEINFERENCE" "SUPERCOMPUTE"}}{{if eq .Cloudbrain.Type 2}}/grampus/notebook{{else}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}{{end}}{{else if eq .JobType "INFERENCE"}}/modelarts/inference-job{{else if eq .JobType "TRAIN"}}/modelarts/train-job{{else if eq .JobType "BENCHMARK" "MODELSAFETY"}}/cloudbrain{{end}}'
data-repopath='{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .JobType "DEBUG" "ONLINEINFERENCE" "HPC"}}{{if eq .Cloudbrain.Type 2}}/grampus/notebook{{else}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}{{end}}{{else if eq .JobType "INFERENCE"}}/modelarts/inference-job{{else if eq .JobType "TRAIN"}}/modelarts/train-job{{else if eq .JobType "BENCHMARK" "MODELSAFETY"}}/cloudbrain{{end}}'
data-jobid="{{$JobID}}" data-version="{{.VersionName}}"
data-cloudbrainid="{{.Cloudbrain.ID}}">
<span><i id="{{$JobID}}-icon" style="vertical-align: middle;"
@@ -278,7 +278,7 @@
</form>
</div>
{{end}}
{{if eq .JobType "SUPERCOMPUTE"}}
{{if eq .JobType "HPC"}}
<div class="ui compact buttons">
<form id="debugAgainForm-{{$JobID}}">
{{$.CsrfTokenHtml}}
@@ -304,7 +304,7 @@
</a>
</form>
{{else}}
{{if eq .JobType "DEBUG" "SUPERCOMPUTE" "BENCHMARK" "SNN4IMAGENET" "BRAINSCORE" "SNN4ECOSET" "SIM2BRAIN_SNN" "ONLINEINFERENCE"}}
{{if eq .JobType "DEBUG" "HPC" "BENCHMARK" "SNN4IMAGENET" "BRAINSCORE" "SNN4ECOSET" "SIM2BRAIN_SNN" "ONLINEINFERENCE"}}
<form id="stopForm-{{$JobID}}" style="margin-left:-1px;">
{{$.CsrfTokenHtml}}
<a style="padding: 0.5rem 1rem;" id="ai-stop-{{$JobID}}"
@@ -349,7 +349,7 @@
</form>
{{else}}
<form class="ui compact buttons" id="delForm-{{$JobID}}"
action='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .JobType "BENCHMARK"}}/cloudbrain/benchmark{{else if or (eq .JobType "SNN4IMAGENET") (eq .JobType "BRAINSCORE") (eq .JobType "SNN4ECOSET") (eq .JobType "SIM2BRAIN_SNN")}}/cloudbrain{{else if eq .JobType "DEBUG" "ONLINEINFERENCE" "SUPERCOMPUTE"}}{{if eq .Cloudbrain.Type 2}}/grampus/notebook{{else}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}{{end}}{{else if eq .JobType "TRAIN"}}{{if eq .Cloudbrain.Type 1}}/modelarts/train-job{{else if eq .Cloudbrain.Type 0}}/cloudbrain/train-job{{else if eq .Cloudbrain.Type 2}}/grampus/train-job{{end}}{{else if eq .JobType "INFERENCE"}}{{if eq .Cloudbrain.Type 0}}/cloudbrain/train-job{{end}}{{end}}/{{$JobID}}/del?isadminpage=true'
action='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .JobType "BENCHMARK"}}/cloudbrain/benchmark{{else if or (eq .JobType "SNN4IMAGENET") (eq .JobType "BRAINSCORE") (eq .JobType "SNN4ECOSET") (eq .JobType "SIM2BRAIN_SNN")}}/cloudbrain{{else if eq .JobType "DEBUG" "ONLINEINFERENCE" "HPC"}}{{if eq .Cloudbrain.Type 2}}/grampus/notebook{{else}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}{{end}}{{else if eq .JobType "TRAIN"}}{{if eq .Cloudbrain.Type 1}}/modelarts/train-job{{else if eq .Cloudbrain.Type 0}}/cloudbrain/train-job{{else if eq .Cloudbrain.Type 2}}/grampus/train-job{{end}}{{else if eq .JobType "INFERENCE"}}{{if eq .Cloudbrain.Type 0}}/cloudbrain/train-job{{end}}{{end}}/{{$JobID}}/del?isadminpage=true'
method="post">
{{$.CsrfTokenHtml}}
<input type="hidden" value="{{.Cloudbrain.ID}}" style="display:none" name="id" />


+ 1
- 1
templates/admin/cloudbrain/search.tmpl View File

@@ -38,7 +38,7 @@
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=MODELSAFETY&listType={{$.ListType}}&jobStatus={{$.JobStatus}}&cluster={{$.cluster}}&aiCenter={{$.aiCenter}}" data-value="MODELSAFETY">MODELSAFETY</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=SNN4ECOSET&listType={{$.ListType}}&jobStatus={{$.JobStatus}}&cluster={{$.cluster}}&aiCenter={{$.aiCenter}}" data-value="SNN4ECOSET">SNN4ECOSET</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=SIM2BRAIN_SNN&listType={{$.ListType}}&jobStatus={{$.JobStatus}}&cluster={{$.cluster}}&aiCenter={{$.aiCenter}}" data-value="SIM2BRAIN_SNN">SIM2BRAIN_SNN</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=SUPERCOMPUTE&listType={{$.ListType}}&jobStatus={{$.JobStatus}}&cluster={{$.cluster}}&aiCenter={{$.aiCenter}}" data-value="SUPERCOMPUTE">SUPERCOMPUTE</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=HPC&listType={{$.ListType}}&jobStatus={{$.JobStatus}}&cluster={{$.cluster}}&aiCenter={{$.aiCenter}}" data-value="HPC">HPC</a>
</div>
</div>
<div class="ui selection dropdown" style="min-width: 10em;min-height:2.6em;border-radius: .28571429rem;margin-right: 1em;padding: .67em 3.2em .7em 1em;">


+ 1
- 1
templates/admin/cloudbrain/search_dashboard.tmpl View File

@@ -49,7 +49,7 @@
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=ONLINEINFERENCE&listType={{$.ListType}}&jobStatus={{$.JobStatus}}&cluster={{$.cluster}}&aiCenter={{$.aiCenter}}" data-value="ONLINEINFERENCE">{{.i18n.Tr "cloudbrain.ONLINEINFERENCE"}}</a>
<!-- <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=SNN4IMAGENET&listType={{$.ListType}}&jobStatus={{$.JobStatus}}&cluster={{$.cluster}}&aiCenter={{$.aiCenter}}" data-value="BENCHMARK">{{.i18n.Tr "cloudbrain.SNN4IMAGENET"}}</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=BRAINSCORE&listType={{$.ListType}}&jobStatus={{$.JobStatus}}&cluster={{$.cluster}}&aiCenter={{$.aiCenter}}" data-value="BENCHMARK">{{.i18n.Tr "cloudbrain.BRAINSCORE"}}</a> -->
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=SUPERCOMPUTE&listType={{$.ListType}}&jobStatus={{$.JobStatus}}&cluster={{$.cluster}}&aiCenter={{$.aiCenter}}" data-value="SUPERCOMPUTE">{{.i18n.Tr "repo.superComputeTask"}}</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=HPC&listType={{$.ListType}}&jobStatus={{$.JobStatus}}&cluster={{$.cluster}}&aiCenter={{$.aiCenter}}" data-value="HPC">{{.i18n.Tr "repo.superComputeTask"}}</a>
</div>
</div>
<div class="ui selection dropdown" style="min-width: 10em;min-height:2.6em;border-radius: .28571429rem;margin-right: 1em;padding: .67em 3.2em .7em 1em;">


+ 6
- 6
templates/user/dashboard/cloudbrains.tmpl View File

@@ -72,7 +72,7 @@
<div class="row">
<!-- 任务名 -->
{{$JobID := '0'}}
{{if eq .JobType "DEBUG" "TRAIN" "SUPERCOMPUTE" "SNN4IMAGENET" "BRAINSCORE" "BENCHMARK" "MODELSAFETY" "SNN4ECOSET" "SIM2BRAIN_SNN" "ONLINEINFERENCE"}}
{{if eq .JobType "DEBUG" "TRAIN" "HPC" "SNN4IMAGENET" "BRAINSCORE" "BENCHMARK" "MODELSAFETY" "SNN4ECOSET" "SIM2BRAIN_SNN" "ONLINEINFERENCE"}}
{{$JobID = .Cloudbrain.ID}}
{{else}}
{{$JobID = .JobID}}
@@ -86,7 +86,7 @@
<span class="fitted"
style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span>
</a>
{{else if eq .JobType "SUPERCOMPUTE"}}
{{else if eq .JobType "HPC"}}
<a class="title"
href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/supercompute/job/{{$JobID}}"
title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px">
@@ -138,7 +138,7 @@
<div class="two wide column text center nowrap"
style="width: 8% !important;">
<span class="job-status" id="{{$JobID}}"
data-repopath='{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .JobType "DEBUG" "ONLINEINFERENCE" "SUPERCOMPUTE"}}{{if eq .Cloudbrain.Type 2}}/grampus/notebook{{else}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}{{end}}{{else if eq .JobType "INFERENCE"}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts{{end}}/inference-job{{else if eq .JobType "TRAIN"}}{{if eq .ComputeResource "NPU"}}/modelarts/train-job{{else}}/cloudbrain/train-job{{end}}{{else if eq .JobType "BENCHMARK" "MODELSAFETY"}}/cloudbrain{{end}}'
data-repopath='{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .JobType "DEBUG" "ONLINEINFERENCE" "HPC"}}{{if eq .Cloudbrain.Type 2}}/grampus/notebook{{else}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}{{end}}{{else if eq .JobType "INFERENCE"}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts{{end}}/inference-job{{else if eq .JobType "TRAIN"}}{{if eq .ComputeResource "NPU"}}/modelarts/train-job{{else}}/cloudbrain/train-job{{end}}{{else if eq .JobType "BENCHMARK" "MODELSAFETY"}}/cloudbrain{{end}}'
data-jobid="{{$JobID}}" data-version="{{.VersionName}}"
data-cloudbrainid="{{.Cloudbrain.ID}}"
data-bootfile="{{.BootFile}}">
@@ -240,7 +240,7 @@
</form>
</div>
{{end}}
{{if eq .JobType "SUPERCOMPUTE"}}
{{if eq .JobType "HPC"}}
<div class="ui compact buttons">
<form id="debugAgainForm-{{$JobID}}">
{{$.CsrfTokenHtml}}
@@ -266,7 +266,7 @@
</a>
</form>
{{else}}
{{if eq .JobType "DEBUG" "SUPERCOMPUTE" "BENCHMARK" "SNN4IMAGENET" "BRAINSCORE" "SNN4ECOSET" "SIM2BRAIN_SNN" "ONLINEINFERENCE"}}
{{if eq .JobType "DEBUG" "HPC" "BENCHMARK" "SNN4IMAGENET" "BRAINSCORE" "SNN4ECOSET" "SIM2BRAIN_SNN" "ONLINEINFERENCE"}}
<form id="stopForm-{{$JobID}}" style="margin-left:-1px;">
{{$.CsrfTokenHtml}}
<a style="padding: 0.5rem 1rem;" id="ai-stop-{{$JobID}}"
@@ -319,7 +319,7 @@
</form>
{{else}}
<form class="ui compact buttons" id="delForm-{{$JobID}}"
action='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .JobType "BENCHMARK"}}/cloudbrain/benchmark{{else if or (eq .JobType "SNN4IMAGENET") (eq .JobType "BRAINSCORE") (eq .JobType "SNN4ECOSET") (eq .JobType "SIM2BRAIN_SNN")}}/cloudbrain{{else if eq .JobType "DEBUG" "ONLINEINFERENCE" "SUPERCOMPUTE"}}{{if eq .Cloudbrain.Type 2}}/grampus/notebook{{else}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}{{end}}{{else if eq .JobType "TRAIN"}}{{if eq .Cloudbrain.Type 1}}/modelarts/train-job{{else if eq .Cloudbrain.Type 0}}/cloudbrain/train-job{{else if eq .Cloudbrain.Type 2}}/grampus/train-job{{end}}{{else if eq .JobType "INFERENCE"}}{{if eq .Cloudbrain.Type 0}}/cloudbrain/train-job{{end}}{{end}}/{{$JobID}}/del?ishomepage=true'
action='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .JobType "BENCHMARK"}}/cloudbrain/benchmark{{else if or (eq .JobType "SNN4IMAGENET") (eq .JobType "BRAINSCORE") (eq .JobType "SNN4ECOSET") (eq .JobType "SIM2BRAIN_SNN")}}/cloudbrain{{else if eq .JobType "DEBUG" "ONLINEINFERENCE" "HPC"}}{{if eq .Cloudbrain.Type 2}}/grampus/notebook{{else}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}{{end}}{{else if eq .JobType "TRAIN"}}{{if eq .Cloudbrain.Type 1}}/modelarts/train-job{{else if eq .Cloudbrain.Type 0}}/cloudbrain/train-job{{else if eq .Cloudbrain.Type 2}}/grampus/train-job{{end}}{{else if eq .JobType "INFERENCE"}}{{if eq .Cloudbrain.Type 0}}/cloudbrain/train-job{{end}}{{end}}/{{$JobID}}/del?ishomepage=true'
method="post">
{{$.CsrfTokenHtml}}
<input type="hidden" value="{{.Cloudbrain.ID}}" style="display:none" name="id" />


+ 1
- 1
web_src/js/features/cloudrbanin.js View File

@@ -551,7 +551,7 @@ function userSearchControll() {
jobType = $(".cloudbrain_debug").data("inference-task");
} else if (params.get("jobType") === "ONLINEINFERENCE") {
jobType = $(".cloudbrain_debug").data("inferonline-task");
} else if (params.get("jobType") === "SUPERCOMPUTE") {
} else if (params.get("jobType") === "HPC") {
jobType = $(".cloudbrain_debug").data("supercompute-task");
} else {
jobType = $(".cloudbrain_debug").data("benchmark-task");


+ 1
- 1
web_src/vuepages/const/index.js View File

@@ -6,7 +6,7 @@ export const POINT_ACTIONS = [
{ k: 'CreatePublicRepo', v: i18n.t('createPublicProject') }, { k: 'CreateIssue', v: i18n.t('dailyPutforwardTasks') }, { k: 'CreatePullRequest', v: i18n.t('dailyPR') }, { k: 'CommentIssue', v: i18n.t('comment') }, { k: 'UploadAttachment', v: i18n.t('uploadDatasetFile') }, { k: 'CreateNewModelTask', v: i18n.t('importNewModel') }, { k: 'BindWechat', v: i18n.t('completeWechatCodeScanningVerification') },
{ k: 'CreateCloudbrainTask', v: i18n.t('dailyRunCloudbrainTasks') }, { k: 'DatasetRecommended', v: i18n.t('datasetRecommendedByThePlatform') }, { k: 'CreateImage', v: i18n.t('submitNewPublicImage') }, { k: 'ImageRecommend', v: i18n.t('imageRecommendedByThePlatform') }, { k: 'ChangeUserAvatar', v: i18n.t('firstChangeofAvatar') }, { k: 'PushCommits', v: i18n.t('dailyCommit') },
];
export const JOB_TYPE = [{ k: 'DEBUG', v: i18n.t('debugTask') }, { k: 'TRAIN', v: i18n.t('trainTask') }, { k: 'INFERENCE', v: i18n.t('inferenceTask') }, { k: 'BENCHMARK', v: i18n.t('benchmarkTask') },{ k: 'ONLINEINFERENCE', v: i18n.t('onlineinfer') }, { k: 'SUPERCOMPUTE', v: i18n.t('superComputeTask') }];
export const JOB_TYPE = [{ k: 'DEBUG', v: i18n.t('debugTask') }, { k: 'TRAIN', v: i18n.t('trainTask') }, { k: 'INFERENCE', v: i18n.t('inferenceTask') }, { k: 'BENCHMARK', v: i18n.t('benchmarkTask') },{ k: 'ONLINEINFERENCE', v: i18n.t('onlineinfer') }, { k: 'HPC', v: i18n.t('superComputeTask') }];

// 资源管理
export const CLUSTERS = [{ k: 'OpenI', v: i18n.t('resourcesManagement.OpenI') }, { k: 'C2Net', v: i18n.t('resourcesManagement.C2Net') }];


+ 2
- 2
web_src/vuepages/langs/config/en-US.js View File

@@ -608,7 +608,7 @@ const en = {
debugTaskEmptyTip3: 'Instructions for use: You can refer to the OpenI AI collaboration platform<a href="{url}"> Help Center </a>.',
onlineInferTaskEmptyTitle: 'Online Inference task has not been created',
onlineInferEmptyTip2: 'Dataset: Cloud Brain 1 provides CPU/GPU,Cloud Brain 2 provides Ascend NPU.And dataset also needs to be uploaded to the corresponding environment;',
superTaskEmptyTitle: 'Super compute task has not been created',
superTaskEmptyTitle: 'HPC task has not been created',
deleteConfirmTips: 'Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.',
deletingTips: 'Task deletion in progress, please wait',
tabTitDebug: 'Debug Task',
@@ -653,7 +653,7 @@ const en = {

},
superComputeObj: {
mmlSparkDescr: `The full name of MMLSpark is Microsoft Machine Learning for Apache Spark, which supports users to run self-made container images and grants them root privileges within the container. Users can directly use Microsoft's MMLSpark provided by the platform.\nNote: MMLSpark is a Spark version provided by Microsoft for machine learning environments( <a target="_blank" href="https://github.com/Azure/mmlspark">https://github.com/Azure/mmlspark</a> )Regarding mmlspark, please refer to the following paper: <a target="_blank" href="https://arxiv.org/pdf/1810.08744.pdf">https://arxiv.org/pdf/1810.08744.pdf</a>`,
mmlSparkDescr: `The full name of MMLSpark is Microsoft Machine Learning for Apache Spark, which enables users to run customized container images and grants them root accesses within the container. Users can directly use Microsoft's MMLSpark provided by the platform.\nNote: MMLSpark is a Spark version provided by Microsoft for machine learning environments( <a target="_blank" href="https://github.com/Azure/mmlspark">https://github.com/Azure/mmlspark</a> )Regarding mmlspark, please refer to the following paper: <a target="_blank" href="https://arxiv.org/pdf/1810.08744.pdf">https://arxiv.org/pdf/1810.08744.pdf</a>`,
}
}



+ 3
- 0
web_src/vuepages/pages/cloudbrain/tools.js View File

@@ -176,6 +176,9 @@ export class CloudBrainTools {
link += `grampus/onlineinfer/${taskInfo.id}`;
}
break;
case 'HPC':
link += `supercompute/job/${taskInfo.id}`;
break;
default:
break;
}


+ 13
- 9
web_src/vuepages/pages/reward/point/utils.js View File

@@ -57,6 +57,9 @@ const getJobTypeLink = (record, type) => {
case 'ONLINEINFERENCE':
link += `/grampus/onlineinfer/${cloudbrain.ID}`;
break;
case 'HPC':
link += `/supercompute/job/${cloudbrain.ID}`;
break;
default:
break;
};
@@ -65,12 +68,13 @@ const getJobTypeLink = (record, type) => {

const renderSpecStr = (spec, showPoint) => {
var ngpu = `${spec.ComputeResource}: ${spec.AccCardsNum + '*' + getListValueWithKey(ACC_CARD_TYPE, spec.AccCardType)}`;
var gpuMemStr = spec.GPUMemGiB != 0 ? `${i18n.t('resourcesManagement.gpuMem')}: ${spec.GPUMemGiB}GB, ` : '';
var gpuMemStr = spec.GPUMemGiB != 0 ? `, ${i18n.t('resourcesManagement.gpuMem')}: ${spec.GPUMemGiB}GB` : '';
var memStr = spec.MemGiB != 0 ? `, ${i18n.t('resourcesManagement.mem')}: ${spec.MemGiB}GB` : '';
var sharedMemStr = spec.ShareMemGiB != 0 ? `, ${i18n.t('resourcesManagement.shareMem')}: ${spec.ShareMemGiB}GB` : '';
var workServerNum = spec.workServerNumber;
var workServerNumStr = showPoint && workServerNum != 1 && spec.UnitPrice != 0 ? '*' + workServerNum + i18n.t('resourcesManagement.node') : '';
var pointStr = showPoint ? `, ${spec.UnitPrice == 0 ? i18n.t('resourcesManagement.free') : spec.UnitPrice + i18n.t('resourcesManagement.point_hr') + workServerNumStr}` : '';
var specStr = `${ngpu}, CPU: ${spec.CpuCores}, ${gpuMemStr}${i18n.t('resourcesManagement.mem')}: ${spec.MemGiB}GB${sharedMemStr}${pointStr}`;
var specStr = `${ngpu}, CPU: ${spec.CpuCores}${gpuMemStr}${memStr}${sharedMemStr}${pointStr}`;
return specStr;
};

@@ -90,22 +94,22 @@ export const getRewardPointRecordInfo = (record) => {
remark: record.Remark,
amount: record.Amount,
};
if (record.Action?.Cloudbrain?.JobType === 'BRAINSCORE' || record.Action?.Cloudbrain?.JobType === 'SNN4IMAGENET'
|| record.Action?.Cloudbrain?.JobType === 'SNN4ECOSET' || record.Action?.Cloudbrain?.JobType === 'SIM2BRAIN_SNN'
|| record.Action?.Cloudbrain?.JobType === 'MODELSAFETY') {
if (record.Action?.Cloudbrain?.JobType === 'BRAINSCORE' || record.Action?.Cloudbrain?.JobType === 'SNN4IMAGENET'
|| record.Action?.Cloudbrain?.JobType === 'SNN4ECOSET' || record.Action?.Cloudbrain?.JobType === 'SIM2BRAIN_SNN'
|| record.Action?.Cloudbrain?.JobType === 'MODELSAFETY') {
record.Action.Cloudbrain.oJobType = record.Action?.Cloudbrain?.JobType;
record.Action.Cloudbrain.JobType = 'BENCHMARK';
}
if (record?.Cloudbrain?.JobType === 'BRAINSCORE' || record?.Cloudbrain?.JobType === 'SNN4IMAGENET'
|| record?.Cloudbrain?.JobType === 'SNN4ECOSET' || record?.Cloudbrain?.JobType === 'SIM2BRAIN_SNN'
|| record?.Cloudbrain?.JobType === 'MODELSAFETY') {
if (record?.Cloudbrain?.JobType === 'BRAINSCORE' || record?.Cloudbrain?.JobType === 'SNN4IMAGENET'
|| record?.Cloudbrain?.JobType === 'SNN4ECOSET' || record?.Cloudbrain?.JobType === 'SIM2BRAIN_SNN'
|| record?.Cloudbrain?.JobType === 'MODELSAFETY') {
record.Cloudbrain.oJobType = record?.Cloudbrain?.JobType;
record.Cloudbrain.JobType = 'BENCHMARK';
}
if (record.OperateType === 'INCREASE') {
if (record.SourceType === 'ADMIN_OPERATE') {
out.remark = record.Remark;
} else if (record.SourceType === 'ACCOMPLISH_TASK') {
} else if (record.SourceType === 'ACCOMPLISH_TASK') {
switch (record?.SourceTemplateId) {
case 'CreatePublicRepo': // 创建公开项目 - 创建了项目OpenI/aiforge
out.remark = record.Action ? `${i18n.t('createdRepository')}<a href="${record.Action.RepoLink}" rel="nofollow">${record.Action.ShortRepoFullDisplayName}</a>`


+ 0
- 1
web_src/vuepages/pages/reward/point/vp-point.vue View File

@@ -188,7 +188,6 @@ export default {
tableData.push(getRewardPointRecordInfo(record));
}
this.tableData.splice(0, Infinity, ...tableData);
console.log(this.tableData)
this.pageInfo.total = data.Total;
}
})


+ 2
- 6
web_src/vuepages/pages/supercompute/configs.js View File

@@ -15,7 +15,7 @@ export const ListPageConfigs = {
clusterType: 'C2Net',
computerResouce: 'CPU',
appName: 'MMLSpark',
jobType: 'SUPERCOMPUTE',
jobType: 'HPC',
jobTypeName: i18n.t('superComputeTask'),
columns: ['taskName', 'status', 'appName', 'createTime', 'runDuration', 'clusterAndComputeResource', 'creator'],
operations: ['start', 'stop', 'delete'],
@@ -31,7 +31,7 @@ export const CreatePageConfigs = {
'MMLSpark': {
appListUrl: 'supercompute',
taskListUrl: 'supercompute/job',
taskType: 'SUPERCOMPUTE',
taskType: 'HPC',
taskTypeName: i18n.t('superComputeTask'),
clusterType: 'C2Net',
computerResouce: 'CPU',
@@ -81,10 +81,6 @@ export const DetailPageConfigs = {
}
};

export const getAiJobLink = (taskInfo) => {
return `supercompute/job/${taskInfo.id}`;
};

export const getCreatePageConfigs = (appName) => {
return CreatePageConfigs[appName] || CreatePageConfigs['MMLSpark'];
};


+ 2
- 2
web_src/vuepages/pages/supercompute/detail/index.vue View File

@@ -60,7 +60,7 @@ import ConfigInfo from '~/components/cloudbrain/details/ConfigInfo.vue';
import { CloudBrainTools } from '~/pages/cloudbrain/tools';
import { CLUSTERS } from '~/const';
import { timeSinceUnix, getListValueWithKey } from '~/utils';
import { getDetailPageConfigs, getAiJobLink } from '../configs';
import { getDetailPageConfigs } from '../configs';
import { getAiTask } from '~/apis/modules/cloudbrain';
import { formatDate } from 'element-ui/lib/utils/date-util';

@@ -151,7 +151,7 @@ export default {
task.clusterName = getListValueWithKey(CLUSTERS, task.cluster);
task.repoOwnerName = this.repoOwnerName;
task.repoName = this.repoName;
task.jobLink = `/${this.repoOwnerName}/${this.repoName}/${getAiJobLink(task)}`;
task.jobLink = `/${this.repoOwnerName}/${this.repoName}/${cloudBrainTools.getAiJobLink(task)}`;
task.createdFromNow = timeSinceUnix(task.created_unix, Date.now() / 1000);
task.createTimeStr = formatDate(new Date(task.created_unix * 1000), 'yyyy-MM-dd HH:mm:ss');
cloudBrainTools.checkOperation(task);


+ 2
- 2
web_src/vuepages/pages/supercompute/list/index.vue View File

@@ -124,7 +124,7 @@

<script>
import LoadingMask from '~/components/cloudbrain/LoadingMask.vue';
import { ListPageConfigs, getAiJobLink } from '../configs';
import { ListPageConfigs } from '../configs';
import { TABS } from '../configs';
import { CloudBrainTools } from '~/pages/cloudbrain/tools';
import { CLUSTERS } from '~/const';
@@ -197,7 +197,7 @@ export default {
task.clusterName = getListValueWithKey(CLUSTERS, task.cluster);
task.repoOwnerName = this.repoOwnerName;
task.repoName = this.repoName;
task.jobLink = `/${this.repoOwnerName}/${this.repoName}/${getAiJobLink(task)}`;
task.jobLink = `/${this.repoOwnerName}/${this.repoName}/${cloudBrainTools.getAiJobLink(task)}`;
task.createdFromNow = this.calcFromNow(task.created_unix);
cloudBrainTools.checkOperation(task);
});


Loading…
Cancel
Save