@@ -50,32 +50,34 @@ const ( | |||
ActionRejectPullRequest // 22 | |||
ActionCommentPull // 23 | |||
ActionUploadAttachment //24 | |||
ActionCreateDebugGPUTask //25 | |||
ActionCreateDebugNPUTask //26 | |||
ActionCreateTrainTask //27 | |||
ActionCreateInferenceTask // 28 | |||
ActionCreateBenchMarkTask //29 | |||
ActionCreateNewModelTask //30 | |||
ActionCreateGPUTrainTask //31 | |||
ActionCreateGrampusNPUTrainTask //32 | |||
ActionCreateGrampusGPUTrainTask //33 | |||
ActionBindWechat //34 | |||
ActionDatasetRecommended //35 | |||
ActionCreateImage //36 | |||
ActionImageRecommend //37 | |||
ActionChangeUserAvatar //38 | |||
ActionCreateGrampusNPUDebugTask //39 | |||
ActionCreateGrampusGPUDebugTask //40 | |||
ActionCreateGrampusGCUDebugTask //41 | |||
ActionCreateGrampusGCUTrainTask //42 | |||
ActionCreateGrampusMLUDebugTask //43 | |||
ActionCreateGrampusMLUTrainTask //44 | |||
ActionCreateGrampusGPUOnlineInferTask //45 | |||
ActionCreateGrampusDCUDebugTask //46 | |||
ActionCreateSuperComputeTask //47 | |||
ActionCreateGrampusILUVATARDebugTask //48 | |||
ActionCreateGrampusMETAXDebugTask //49 | |||
ActionUploadAttachment //24 | |||
ActionCreateDebugGPUTask //25 | |||
ActionCreateDebugNPUTask //26 | |||
ActionCreateTrainTask //27 | |||
ActionCreateInferenceTask // 28 | |||
ActionCreateBenchMarkTask //29 | |||
ActionCreateNewModelTask //30 | |||
ActionCreateGPUTrainTask //31 | |||
ActionCreateGrampusNPUTrainTask //32 | |||
ActionCreateGrampusGPUTrainTask //33 | |||
ActionBindWechat //34 | |||
ActionDatasetRecommended //35 | |||
ActionCreateImage //36 | |||
ActionImageRecommend //37 | |||
ActionChangeUserAvatar //38 | |||
ActionCreateGrampusNPUDebugTask //39 | |||
ActionCreateGrampusGPUDebugTask //40 | |||
ActionCreateGrampusGCUDebugTask //41 | |||
ActionCreateGrampusGCUTrainTask //42 | |||
ActionCreateGrampusMLUDebugTask //43 | |||
ActionCreateGrampusMLUTrainTask //44 | |||
ActionCreateGrampusGPUOnlineInferTask //45 | |||
ActionCreateGrampusDCUDebugTask //46 | |||
ActionCreateSuperComputeTask //47 | |||
ActionCreateGrampusILUVATARDebugTask //48 | |||
ActionCreateGrampusMETAXDebugTask //49 | |||
ActionCreateGrampusGPUInferenceTask //50 | |||
ActionCreateGrampusILUVATARInferenceTask //51 | |||
) | |||
// Action represents user operation type and other information to | |||
@@ -431,7 +433,9 @@ func (a *Action) IsCloudbrainAction() bool { | |||
ActionCreateGrampusMLUDebugTask, | |||
ActionCreateGrampusILUVATARDebugTask, | |||
ActionCreateGrampusMETAXDebugTask, | |||
ActionCreateSuperComputeTask: | |||
ActionCreateSuperComputeTask, | |||
ActionCreateGrampusILUVATARInferenceTask, | |||
ActionCreateGrampusGPUInferenceTask: | |||
return true | |||
} | |||
return false | |||
@@ -80,7 +80,9 @@ func GetTaskTypeFromAction(a ActionType) TaskType { | |||
ActionCreateGrampusMETAXDebugTask, | |||
ActionCreateSuperComputeTask, | |||
ActionCreateGrampusGPUOnlineInferTask, | |||
ActionCreateGrampusGPUTrainTask: | |||
ActionCreateGrampusGPUTrainTask, | |||
ActionCreateGrampusGPUInferenceTask, | |||
ActionCreateGrampusILUVATARInferenceTask: | |||
return TaskCreateCloudbrainTask | |||
case ActionCreateRepo: | |||
return TaskCreatePublicRepo | |||
@@ -105,7 +105,7 @@ func NewFuncMap() []template.FuncMap { | |||
return setting.UI.Reactions | |||
}, | |||
"DebugAttachSize": func() int { | |||
return setting.DebugAttachSize * 1000 * 1000 * 1000 | |||
return setting.DebugAttachSize * 1024 * 1024 * 1024 | |||
}, | |||
"LlmCommonKB": func() string { | |||
return setting.LLM_CHAT_API.COMMON_KB | |||
@@ -1300,7 +1300,7 @@ cloudbrain.morethanonejob2=You can view all your Cloud Brain tasks in <a href="/ | |||
modelarts.online_infer = Online Inference | |||
modelarts.infer_job_model = Model | |||
modelarts.infer_job_model_file = Model File | |||
modelarts.infer_job = Inference Job | |||
modelarts.infer_job = Inference Task | |||
modelarts.infer_job.model_version = Model/Version | |||
modelarts.infer_job.select_model = Select Model | |||
modelarts.infer_job.boot_file_helper=The startup file is the entry file for your program execution and must end in.py.Such as inference.py, main.py, example/inference.py, case/main.py. | |||
@@ -1324,7 +1324,7 @@ successfully_deleted = Successfully deleted | |||
debug_task_not_created = Debug task has not been created | |||
train_task_not_created = Train task has not been created | |||
inference_job_not_created = Inference job has not been created | |||
inference_job_not_created = Inference task has not been created | |||
model_Evaluation_not_created = Model evaluation has not been created | |||
repo_not_initialized = Code version: You have not initialized the code repository, please <a href="%s"> initialized </a> first ; | |||
debug_task_running_limit =Running time: no more than 4 hours, it will automatically stop if it exceeds 4 hours; | |||
@@ -3228,6 +3228,8 @@ task_c2ent_onlineinferjob=`created GPU type online inference task <a href="%s/gr | |||
task_c2net_cpusupercomputejob=`created CPU type HPC task <a href="%s/supercompute/job/%s">%s</a>` | |||
task_nputrainjob=`created NPU training task <a href="%s/modelarts/train-job/%s">%s</a>` | |||
task_inferencejob=`created reasoning task <a href="%s/modelarts/inference-job/%s">%s</a>` | |||
task_c2net_gpu_inferencejob=`created GPU type inference task <a href="%s/grampus/inference-job/%s">%s</a>` | |||
task_c2net_gpgpu_iluvatar_inferencejob=`created ILUVATAR-GPGPU type inference task <a href="%s/grampus/inference-job/%s">%s</a>` | |||
task_benchmark=`created profiling task <a href="%s/cloudbrain/benchmark/%s">%s</a>` | |||
task_createmodel=`created new model <a href="%s/modelmanage/model_readme_tmpl?name=%s">%s</a>` | |||
task_gputrainjob=`created CPU/GPU training task <a href="%s/cloudbrain/train-job/%s">%s</a>` | |||
@@ -3247,6 +3247,8 @@ task_c2ent_onlineinferjob=`创建了GPU类型在线推理任务 <a href="%s/gram | |||
task_c2net_cpusupercomputejob=`创建了CPU类型超算任务 <a href="%s/supercompute/job/%s">%s</a>` | |||
task_nputrainjob=`创建了NPU类型训练任务 <a href="%s/modelarts/train-job/%s">%s</a>` | |||
task_inferencejob=`创建了推理任务 <a href="%s/modelarts/inference-job/%s">%s</a>` | |||
task_c2net_gpu_inferencejob=`创建了GPU类型推理任务 <a href="%s/grampus/inference-job/%s">%s</a>` | |||
task_c2net_gpgpu_iluvatar_inferencejob=`创建了ILUVATAR-GPGPU类型推理任务 <a href="%s/grampus/inference-job/%s">%s</a>` | |||
task_benchmark=`创建了评测任务 <a href="%s/cloudbrain/benchmark/%s">%s</a>` | |||
task_createmodel=`导入了新模型 <a href="%s/modelmanage/model_readme_tmpl?name=%s">%s</a>` | |||
task_gputrainjob=`创建了CPU/GPU类型训练任务 <a href="%s/cloudbrain/train-job/%s">%s</a>` | |||
@@ -243,8 +243,8 @@ document.onreadystatechange = function () { | |||
html += recordPrefix + actionName; | |||
html += " <a href=\"" + getRepoLink(record) + "\" rel=\"nofollow\">" + getRepotext(record) + "</a>" | |||
} | |||
else if(record.OpType == "24" || record.OpType == "26" || record.OpType == "27" || record.OpType == "28" || record.OpType == "30" | |||
|| record.OpType == "31" || record.OpType == "32" || record.OpType == "33" || record.OpType == "42" || record.OpType == "44"){ | |||
else if(record.OpType == "24" || record.OpType == "26" || record.OpType == "27" || record.OpType == "28" || record.OpType == "50" || record.OpType == "51" | |||
|| record.OpType == "30" || record.OpType == "31" || record.OpType == "32" || record.OpType == "33" || record.OpType == "42" || record.OpType == "44"){ | |||
html += recordPrefix + actionName; | |||
const taskLink = getTaskLink(record); | |||
if (taskLink) { | |||
@@ -311,7 +311,17 @@ function getTaskLink(record){ | |||
re = ''; | |||
} | |||
}else if(record.OpType == 28){ | |||
re = re + "/modelarts/inference-job/" + record.Content; | |||
if (record.Cloudbrain) { | |||
re = re + "/modelarts/inference-job/" + record.Cloudbrain.ID; | |||
} else { | |||
re = ''; | |||
} | |||
}else if(record.OpType == 50 || record.OpType == 51){ | |||
if (record.Cloudbrain) { | |||
re = re + "/grampus/inference-job/" + record.Cloudbrain.ID; | |||
} else { | |||
re = ''; | |||
} | |||
}else if(record.OpType == 29){ | |||
re = re + "/cloudbrain/benchmark/" + record.Content; | |||
}else if(record.OpType == 30){ | |||
@@ -487,6 +497,8 @@ var actionNameZH={ | |||
"26":"创建了NPU类型调试任务", | |||
"27":"创建了NPU类型训练任务", | |||
"28":"创建了推理任务", | |||
"50":"创建了GPU类型推理任务", | |||
"51":"创建了ILUVATAR-GPGPU类型推理任务", | |||
"29":"创建了评测任务", | |||
"30":"导入了新模型", | |||
"31":"创建了CPU/GPU类型训练任务", | |||
@@ -528,7 +540,9 @@ var actionNameEN={ | |||
"25":" created CPU/GPU type debugging task ", | |||
"26":" created NPU type debugging task ", | |||
"27":" created NPU type training task", | |||
"28":" created reasoning task", | |||
"28":" created inference task", | |||
"50":" created GPU type inference task", | |||
"51":" created ILUVATAR-GPGPU type inference task", | |||
"29":" created profiling task", | |||
"30":" created new model", | |||
"31":" created CPU/GPU type training task", | |||
@@ -325,7 +325,7 @@ func cloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) { | |||
for _, infos := range datasetInfos { | |||
attachSize += infos.Size | |||
} | |||
if attachSize > int64(setting.DebugAttachSize*1000*1000*1000) { | |||
if attachSize > int64(setting.DebugAttachSize*1024*1024*1024) { | |||
log.Error("The DatasetSize exceeds the limit (%dGB)", setting.DebugAttachSize) // GB | |||
cloudBrainNewDataPrepare(ctx, jobType) | |||
ctx.RenderWithErr(ctx.Tr("cloudbrain.error.debug_datasetsize", setting.DebugAttachSize), tpl, &form) | |||
@@ -3008,16 +3008,13 @@ func cloudBrainTrainJobCreate(ctx *context.Context) { | |||
} | |||
func InferenceCloudBrainJobNew(ctx *context.Context) { | |||
err := cloudBrainNewDataPrepare(ctx, string(models.JobTypeInference)) | |||
if err != nil { | |||
ctx.ServerError("get new train-job info failed", err) | |||
return | |||
} | |||
ctx.Data["PageIsCloudBrain"] = true | |||
ctx.HTML(http.StatusOK, tplCloudBrainInferenceJobNew) | |||
} | |||
func InferenceCloudBrainJobShow(ctx *context.Context) { | |||
cloudBrainShow(ctx, tplCloudBrainInferenceJobShow, models.JobTypeInference) | |||
ctx.Data["PageIsCloudBrain"] = true | |||
ctx.HTML(http.StatusOK, tplCloudBrainInferenceJobShow) | |||
} | |||
func DownloadGPUInferenceResultFile(ctx *context.Context) { | |||
@@ -67,9 +67,23 @@ const ( | |||
tplGrampusTrainJobMLUNew base.TplName = "repo/grampus/trainjob/mlu/new" | |||
//C2NET notebook | |||
tplGrampusNotebookNew base.TplName = "repo/grampus/notebook/new" | |||
tplGrampusNotebookNew base.TplName = "repo/grampus/notebook/new" | |||
// Inference job | |||
tplGrampusInferenceNew base.TplName = "repo/grampus/inference/new" | |||
tplGrampusInferenceShow base.TplName = "repo/grampus/inference/show" | |||
) | |||
func GrampusInferenceNew(ctx *context.Context) { | |||
ctx.Data["PageIsCloudBrain"] = true | |||
ctx.HTML(http.StatusOK, tplGrampusInferenceNew) | |||
} | |||
func GrampusInferenceShow(ctx *context.Context) { | |||
ctx.Data["PageIsCloudBrain"] = true | |||
ctx.HTML(http.StatusOK, tplGrampusInferenceShow) | |||
} | |||
func GrampusNotebookNew(ctx *context.Context) { | |||
ctx.Data["PageIsCloudBrain"] = true | |||
ctx.HTML(http.StatusOK, tplGrampusNotebookNew) | |||
@@ -256,7 +270,7 @@ func GrampusNotebookCreate(ctx *context.Context, form auth.CreateGrampusNotebook | |||
for _, infos := range datasetInfos { | |||
attachSize += infos.Size | |||
} | |||
if attachSize > int64(setting.DebugAttachSize*1000*1000*1000) { | |||
if attachSize > int64(setting.DebugAttachSize*1024*1024*1024) { | |||
log.Error("The DatasetSize exceeds the limit (%dGB)", setting.DebugAttachSize) // GB | |||
grampusNotebookNewDataPrepare(ctx, processType) | |||
ctx.RenderWithErr(ctx.Tr("cloudbrain.error.debug_datasetsize", setting.DebugAttachSize), tpl, &form) | |||
@@ -254,7 +254,7 @@ func Notebook2Create(ctx *context.Context, form auth.CreateModelArtsNotebookForm | |||
for _, infos := range datasetInfos { | |||
attachSize += infos.Size | |||
} | |||
if attachSize > int64(setting.DebugAttachSize*1000*1000*1000) { | |||
if attachSize > int64(setting.DebugAttachSize*1024*1024*1024) { | |||
log.Error("The DatasetSize exceeds the limit (%dGB)", setting.DebugAttachSize) //GB | |||
notebookNewDataPrepare(ctx) | |||
ctx.RenderWithErr(ctx.Tr("cloudbrain.error.debug_datasetsize", setting.DebugAttachSize), tplModelArtsNotebookNew, &form) | |||
@@ -2544,91 +2544,11 @@ func checkModelArtsSpecialPool(ctx *context.Context, flavorCode string, jobType | |||
return "" | |||
} | |||
func InferenceJobIndex(ctx *context.Context) { | |||
MustEnableModelArts(ctx) | |||
repo := ctx.Repo.Repository | |||
page := ctx.QueryInt("page") | |||
if page <= 0 { | |||
page = 1 | |||
} | |||
listType := ctx.Query("listType") | |||
ctx.Data["ListType"] = listType | |||
if listType == models.AllResource { | |||
listType = "" | |||
} | |||
var jobTypes []string | |||
jobTypes = append(jobTypes, string(models.JobTypeInference)) | |||
tasks, count, err := models.Cloudbrains(&models.CloudbrainsOptions{ | |||
ListOptions: models.ListOptions{ | |||
Page: page, | |||
PageSize: setting.UI.IssuePagingNum, | |||
}, | |||
RepoID: repo.ID, | |||
ComputeResource: listType, | |||
JobTypes: jobTypes, | |||
Type: models.TypeCloudBrainAll, | |||
}) | |||
if err != nil { | |||
ctx.ServerError("Cloudbrain", err) | |||
return | |||
} | |||
for i, task := range tasks { | |||
tasks[i].CanDel = cloudbrain.CanDeleteJob(ctx, &task.Cloudbrain) | |||
tasks[i].CanModify = cloudbrain.CanModifyJob(ctx, &task.Cloudbrain) | |||
if tasks[i].ComputeResource == "" { | |||
tasks[i].ComputeResource = models.NPUResource | |||
} | |||
if tasks[i].ModelId != "" { | |||
model, err := models.QueryModelById(tasks[i].ModelId) | |||
if err == nil && model != nil { | |||
if model.RepoId != tasks[i].RepoID { | |||
repo, err := models.GetRepositoryByID(model.RepoId) | |||
if err == nil && repo != nil { | |||
tasks[i].ModelRepoName = repo.Name | |||
tasks[i].ModelRepoOwnerName = repo.OwnerName | |||
} | |||
} | |||
} | |||
} | |||
} | |||
isQueryPrivate := isQueryPrivateModel(ctx) | |||
repoId := ctx.Repo.Repository.ID | |||
Type := -1 | |||
_, model_count, _ := models.QueryModel(&models.AiModelQueryOptions{ | |||
ListOptions: models.ListOptions{ | |||
Page: 1, | |||
PageSize: 2, | |||
}, | |||
RepoID: repoId, | |||
Type: Type, | |||
New: MODEL_LATEST, | |||
IsOnlyThisRepo: true, | |||
Status: 0, | |||
IsQueryPrivate: isQueryPrivate, | |||
}) | |||
ctx.Data["MODEL_COUNT"] = model_count | |||
pager := context.NewPagination(int(count), setting.UI.IssuePagingNum, page, 5) | |||
pager.SetDefaultParams(ctx) | |||
ctx.Data["Page"] = pager | |||
ctx.Data["PageIsCloudBrain"] = true | |||
ctx.Data["Tasks"] = tasks | |||
ctx.Data["CanCreate"] = cloudbrain.CanCreateOrDebugJob(ctx) | |||
ctx.Data["RepoIsEmpty"] = repo.IsEmpty | |||
ctx.HTML(200, tplModelArtsInferenceJobIndex) | |||
} | |||
func InferenceJobNew(ctx *context.Context) { | |||
err := inferenceJobNewDataPrepare(ctx) | |||
if err != nil { | |||
ctx.ServerError("get new inference-job info failed", err) | |||
return | |||
} | |||
ctx.Data["PageIsCloudBrain"] = true | |||
ctx.HTML(200, tplModelArtsInferenceJobNew) | |||
} | |||
func inferenceJobNewDataPrepare(ctx *context.Context) error { | |||
@@ -2783,62 +2703,6 @@ func inferenceJobErrorNewDataPrepare(ctx *context.Context, form auth.CreateModel | |||
} | |||
func InferenceJobShow(ctx *context.Context) { | |||
ctx.Data["PageIsCloudBrain"] = true | |||
var jobID = ctx.Params(":jobid") | |||
page := ctx.QueryInt("page") | |||
if page <= 0 { | |||
page = 1 | |||
} | |||
task, err := models.GetCloudbrainByJobID(jobID) | |||
if err != nil { | |||
log.Error("GetInferenceTask(%s) failed:%v", jobID, err.Error()) | |||
ctx.NotFound(ctx.Req.URL.RequestURI(), nil) | |||
return | |||
} | |||
//设置权限 | |||
canNewJob, err := canUserCreateTrainJobVersion(ctx, task.UserID) | |||
if err != nil { | |||
ctx.ServerError("canNewJob failed", err) | |||
return | |||
} | |||
ctx.Data["canNewJob"] = canNewJob | |||
//将运行参数转化为epoch_size = 3, device_target = Ascend的格式 | |||
var parameters models.Parameters | |||
err = json.Unmarshal([]byte(task.Parameters), ¶meters) | |||
if err != nil { | |||
log.Error("Failed to Unmarshal Parameters: %s (%v)", task.Parameters, err) | |||
trainJobNewDataPrepare(ctx) | |||
return | |||
} | |||
if len(parameters.Parameter) > 0 { | |||
paramTemp := "" | |||
for _, Parameter := range parameters.Parameter { | |||
param := Parameter.Label + " = " + Parameter.Value + "; " | |||
paramTemp = paramTemp + param | |||
} | |||
task.Parameters = paramTemp[:len(paramTemp)-2] | |||
} else { | |||
task.Parameters = "" | |||
} | |||
prepareSpec4Show(ctx, task) | |||
LabelName := strings.Fields(task.LabelName) | |||
ctx.Data["labelName"] = LabelName | |||
ctx.Data["jobID"] = jobID | |||
ctx.Data["jobName"] = task.JobName | |||
ctx.Data["displayJobName"] = task.DisplayJobName | |||
ctx.Data["task"] = task | |||
ctx.Data["canDownload"] = cloudbrain.CanModifyJob(ctx, task) | |||
ctx.Data["datasetDownload"] = GetCloudBrainDataSetInfo(task.Uuid, task.DatasetName, false) | |||
tempUids := []int64{} | |||
tempUids = append(tempUids, task.UserID) | |||
JobCreater, err := models.GetUserNamesByIDs(tempUids) | |||
if err != nil { | |||
log.Error("GetUserNamesByIDs (WhitelistUserIDs): %v", err) | |||
} | |||
ctx.Data["userName"] = JobCreater[0] | |||
ctx.HTML(http.StatusOK, tplModelArtsInferenceJobShow) | |||
} | |||
@@ -1388,6 +1388,13 @@ func RegisterRoutes(m *macaron.Macaron) { | |||
m.Post("/create", reqWechatBind, reqRepoCloudBrainWriter, bindIgnErr(auth.CreateGrampusTrainJobForm{}), context.PointAccount(), repo.GrampusTrainJobGcuCreate) | |||
}) | |||
}) | |||
m.Group("/inference-job", func() { | |||
m.Get("/create", reqWechatBind, reqRepoCloudBrainWriter, context.PointAccount(), repo.GrampusInferenceNew) | |||
m.Group("/:id", func() { | |||
m.Get("", reqRepoCloudBrainReader, repo.GrampusInferenceShow) | |||
}) | |||
}) | |||
}, context.RepoRef()) | |||
m.Group("/modelmanage", func() { | |||
m.Get("/create_local_model", repo.CreateLocalModel) | |||
@@ -36,6 +36,7 @@ func (c C2NetClusterAdapter) CreateNoteBook(req entity.CreateNoteBookTaskRequest | |||
newReq, err := convertNoteBookReq2Grampus(req) | |||
if err != nil { | |||
log.Error("CreateNoteBook err.req=%+v err=%v", req, err) | |||
return nil, err | |||
} | |||
jobResult, err := grampus.CreateNotebookJob(newReq) | |||
if err != nil { | |||
@@ -778,7 +779,7 @@ func (c C2NetClusterAdapter) DeleteTrainJob(opts entity.JobIdAndVersionId) error | |||
} | |||
func (c C2NetClusterAdapter) StopTrainJob(opts entity.JobIdAndVersionId) error { | |||
_, err := grampus.StopJob(opts.JobID, string(models.JobTypeDebug)) | |||
_, err := grampus.StopJob(opts.JobID) | |||
if err != nil { | |||
log.Error("StopNoteBook(%s) failed:%v", opts, err) | |||
return err | |||
@@ -482,6 +482,11 @@ func handleCloudbrainTwoParameter(req entity.CreateTrainTaskRequest) models.Para | |||
}) | |||
} | |||
param.Parameter = append(param.Parameter, models.Parameter{ | |||
Label: modelarts.ResultUrl, | |||
Value: t.OutPut[0].S3DownloadUrl, | |||
}) | |||
existDeviceTarget := false | |||
for _, parameter := range t.Params.Parameter { | |||
if parameter.Label == modelarts.DeviceTarget { | |||
@@ -1,13 +1,14 @@ | |||
package container_builder | |||
import ( | |||
"path" | |||
"code.gitea.io/gitea/entity" | |||
"code.gitea.io/gitea/models" | |||
"code.gitea.io/gitea/modules/log" | |||
"code.gitea.io/gitea/routers/response" | |||
"code.gitea.io/gitea/services/ai_task_service/context" | |||
"code.gitea.io/gitea/services/ai_task_service/storage_helper" | |||
"path" | |||
) | |||
type OutputPathBuilder struct { | |||
@@ -67,6 +68,7 @@ func (b *OutputPathBuilder) Build(ctx *context.CreationContext) ([]entity.Contai | |||
GetBackEndpoint: uploader.GetEndpoint(), | |||
IsDir: true, | |||
StorageType: storageTypes[0], | |||
S3DownloadUrl: uploader.GetS3DownloadUrl(remoteDir), | |||
}}, nil | |||
} | |||
@@ -0,0 +1,139 @@ | |||
package task | |||
import ( | |||
"strings" | |||
"code.gitea.io/gitea/entity" | |||
"code.gitea.io/gitea/models" | |||
"code.gitea.io/gitea/modules/log" | |||
"code.gitea.io/gitea/modules/timeutil" | |||
"code.gitea.io/gitea/routers/response" | |||
"code.gitea.io/gitea/services/ai_task_service/context" | |||
) | |||
type CloudbrainTwoInferenceTaskTemplate struct { | |||
DefaultAITaskTemplate | |||
} | |||
func init() { | |||
t := &CloudbrainTwoInferenceTaskTemplate{ | |||
DefaultAITaskTemplate: DefaultAITaskTemplate{ | |||
ClusterType: entity.OpenICloudbrainTwo, | |||
JobType: models.JobTypeInference, | |||
Config: GetCloudbrainTwoInferenceConfig, | |||
}, | |||
} | |||
RegisterTask(models.JobTypeInference, entity.OpenICloudbrainTwo, t) | |||
} | |||
func GetCloudbrainTwoInferenceConfig(opts entity.AITaskConfigKey) *entity.AITaskBaseConfig { | |||
var config = &entity.AITaskBaseConfig{ | |||
ActionType: models.ActionCreateInferenceTask, | |||
IsActionUseJobId: true, | |||
ContainerSteps: map[entity.ContainerDataType]*entity.ContainerBuildOpts{ | |||
entity.ContainerCode: { | |||
ContainerPath: "/code", | |||
ReadOnly: false, | |||
AcceptStorageType: []entity.StorageType{entity.OBS}, | |||
Uncompressed: true, | |||
}, | |||
entity.ContainerDataset: { | |||
ContainerPath: "/dataset", | |||
ReadOnly: true, | |||
Uncompressed: true, | |||
AcceptStorageType: []entity.StorageType{entity.OBS}, | |||
}, | |||
entity.ContainerPreTrainModel: { | |||
ContainerPath: "/pretrainmodel", | |||
ReadOnly: true, | |||
AcceptStorageType: []entity.StorageType{entity.OBS}, | |||
}, | |||
entity.ContainerOutPutPath: { | |||
ContainerPath: "/output", | |||
StorageRelativePath: "/output" + models.CloudbrainTwoDefaultVersion, | |||
ReadOnly: false, | |||
AcceptStorageType: []entity.StorageType{entity.OBS}, | |||
MKDIR: true, | |||
}, | |||
entity.ContainerLogPath: { | |||
ContainerPath: "/log", | |||
StorageRelativePath: "/log" + models.CloudbrainTwoDefaultVersion, | |||
ReadOnly: false, | |||
AcceptStorageType: []entity.StorageType{entity.OBS}, | |||
MKDIR: true, | |||
}, | |||
}, | |||
} | |||
return config | |||
} | |||
func (t CloudbrainTwoInferenceTaskTemplate) Create(ctx *context.CreationContext) (*entity.CreateTaskRes, *response.BizError) { | |||
c := &CreateOperator{} | |||
err := c.Next(t.CheckParamFormat). | |||
Next(t.HandleReqParameters). | |||
Next(t.CheckPrivilege4Continue). | |||
Next(t.CheckSourceTaskIsCleared). | |||
Next(t.CheckWorkerNum). | |||
Next(t.CheckMultiRequest). | |||
Next(t.CheckBranchExists). | |||
Next(t.CheckBootFile). | |||
Next(t.CheckDisplayJobName). | |||
Next(t.LoadSpec). | |||
Next(t.CheckPointBalance). | |||
Next(t.CheckDatasets). | |||
Next(t.CheckModel). | |||
Next(t.InsertCloudbrainRecord4Async). | |||
AsyncNextWithErrFun(t.BuildContainerData, t.GetAvailableQueues, t.CallCreationAPI, t.AfterCallCreationAPI4Async, t.NotifyCreation, t.HandleErr4Async). | |||
Operate(ctx) | |||
if err != nil { | |||
log.Error("create GrampusInferenceTask err.%v", err) | |||
return nil, err | |||
} | |||
return &entity.CreateTaskRes{ID: ctx.NewCloudbrain.ID}, nil | |||
} | |||
func (g CloudbrainTwoInferenceTaskTemplate) CallCreationAPI(ctx *context.CreationContext) *response.BizError { | |||
c := g.GetMyCluster() | |||
if c == nil { | |||
return response.SYSTEM_ERROR | |||
} | |||
form := ctx.Request | |||
req := entity.CreateTrainTaskRequest{ | |||
Name: form.JobName, | |||
DisplayJobName: form.DisplayJobName, | |||
Description: form.Description, | |||
Tasks: []entity.TrainTask{ | |||
{ | |||
Name: form.JobName, | |||
ResourceSpecId: ctx.Spec.SourceSpecId, | |||
ImageId: form.ImageID, | |||
ImageUrl: strings.TrimSpace(form.ImageUrl), | |||
Datasets: ctx.GetContainerDataArray(entity.ContainerDataset), | |||
Code: ctx.GetContainerDataArray(entity.ContainerCode), | |||
LogPath: ctx.GetContainerDataArray(entity.ContainerLogPath), | |||
Queues: ctx.Queues, | |||
PreTrainModel: ctx.GetContainerDataArray(entity.ContainerPreTrainModel), | |||
BootFile: form.BootFile, | |||
OutPut: ctx.GetContainerDataArray(entity.ContainerOutPutPath), | |||
Params: form.ParamArray, | |||
Spec: ctx.Spec, | |||
PoolId: ctx.Spec.QueueCode, | |||
WorkServerNumber: form.WorkServerNumber, | |||
}, | |||
}, | |||
} | |||
createTime := timeutil.TimeStampNow() | |||
res, err := c.CreateTrainJob(req) | |||
if err != nil { | |||
log.Error("CloudbrainTwo InfereceTask Create err.req=%+v err=%v", req, err) | |||
return response.NewBizError(err) | |||
} | |||
ctx.Response = &entity.CreationResponse{ | |||
JobID: res.JobID, | |||
Status: res.Status, | |||
CreateTime: createTime, | |||
VersionID: res.VersionID, | |||
VersionName: res.VersionName, | |||
} | |||
return nil | |||
} |
@@ -0,0 +1,144 @@ | |||
package task | |||
import ( | |||
"strings" | |||
"code.gitea.io/gitea/entity" | |||
"code.gitea.io/gitea/models" | |||
"code.gitea.io/gitea/modules/cloudbrain" | |||
"code.gitea.io/gitea/modules/log" | |||
"code.gitea.io/gitea/modules/timeutil" | |||
"code.gitea.io/gitea/routers/response" | |||
"code.gitea.io/gitea/services/ai_task_service/context" | |||
) | |||
type GrampusInferenceTaskTemplate struct { | |||
DefaultAITaskTemplate | |||
} | |||
func init() { | |||
t := &GrampusInferenceTaskTemplate{ | |||
DefaultAITaskTemplate: DefaultAITaskTemplate{ | |||
ClusterType: entity.C2Net, | |||
JobType: models.JobTypeInference, | |||
Config: GetGrampusInferenceTaskConfig, | |||
}, | |||
} | |||
RegisterTask(models.JobTypeInference, entity.C2Net, t) | |||
} | |||
func GetGrampusInferenceTaskConfig(opts entity.AITaskConfigKey) *entity.AITaskBaseConfig { | |||
codePath := "/code" | |||
datasetPath := "/dataset" | |||
pretrainModelPath := "/pretrainmodel" | |||
outputPath := "/output" | |||
var config = &entity.AITaskBaseConfig{ | |||
ContainerSteps: map[entity.ContainerDataType]*entity.ContainerBuildOpts{ | |||
entity.ContainerCode: { | |||
ContainerPath: "/tmp" + codePath, | |||
StorageRelativePath: codePath, | |||
ReadOnly: false, | |||
AcceptStorageType: []entity.StorageType{entity.MINIO, entity.OBS}, | |||
}, | |||
entity.ContainerDataset: { | |||
ContainerPath: "/tmp" + datasetPath, | |||
ReadOnly: true, | |||
AcceptStorageType: []entity.StorageType{entity.MINIO, entity.OBS}, | |||
}, | |||
entity.ContainerPreTrainModel: { | |||
ContainerPath: "/tmp" + pretrainModelPath, | |||
ReadOnly: true, | |||
AcceptStorageType: []entity.StorageType{entity.MINIO, entity.OBS}, | |||
}, | |||
entity.ContainerOutPutPath: { | |||
ContainerPath: "/tmp" + outputPath, | |||
StorageRelativePath: cloudbrain.ModelMountPath, | |||
ReadOnly: false, | |||
AcceptStorageType: []entity.StorageType{entity.MINIO}, | |||
MKDIR: false, | |||
}, | |||
}, | |||
} | |||
switch opts.ComputeSource { | |||
case models.GPU: | |||
config.ActionType = models.ActionCreateGrampusGPUInferenceTask | |||
case models.ILUVATAR: | |||
config.ActionType = models.ActionCreateGrampusILUVATARInferenceTask | |||
} | |||
config.IsActionUseJobId = true | |||
return config | |||
} | |||
func (t GrampusInferenceTaskTemplate) Create(ctx *context.CreationContext) (*entity.CreateTaskRes, *response.BizError) { | |||
c := &CreateOperator{} | |||
err := c.Next(t.CheckParamFormat). | |||
Next(t.HandleReqParameters). | |||
Next(t.CheckPrivilege4Continue). | |||
Next(t.CheckSourceTaskIsCleared). | |||
Next(t.CheckBranchExists). | |||
Next(t.CheckBootFile). | |||
Next(t.CheckWorkerNum). | |||
Next(t.CheckMultiRequest). | |||
Next(t.CheckDisplayJobName). | |||
Next(t.LoadSpec). | |||
Next(t.CheckPointBalance). | |||
Next(t.CheckDatasets). | |||
Next(t.CheckModel). | |||
Next(t.InsertCloudbrainRecord4Async). | |||
AsyncNextWithErrFun(t.BuildContainerData, t.GetAvailableQueues, t.CallCreationAPI, t.AfterCallCreationAPI4Async, t.NotifyCreation, t.HandleErr4Async). | |||
Operate(ctx) | |||
if err != nil { | |||
log.Error("create GrampusTrainTaskTemplate err.%v", err) | |||
return nil, err | |||
} | |||
return &entity.CreateTaskRes{ID: ctx.NewCloudbrain.ID}, nil | |||
} | |||
func (g GrampusInferenceTaskTemplate) CallCreationAPI(ctx *context.CreationContext) *response.BizError { | |||
c := g.GetMyCluster() | |||
if c == nil { | |||
return response.SYSTEM_ERROR | |||
} | |||
form := ctx.Request | |||
imageUrl := strings.TrimSpace(form.ImageUrl) | |||
if form.ImageID != "" { | |||
imageUrl = "" | |||
} | |||
req := entity.CreateTrainTaskRequest{ | |||
Name: form.JobName, | |||
DisplayJobName: form.DisplayJobName, | |||
Tasks: []entity.TrainTask{ | |||
{ | |||
Name: form.JobName, | |||
ResourceSpecId: ctx.Spec.SourceSpecId, | |||
ImageId: form.ImageID, | |||
ImageUrl: imageUrl, | |||
Datasets: ctx.GetContainerDataArray(entity.ContainerDataset), | |||
Code: ctx.GetContainerDataArray(entity.ContainerCode), | |||
Queues: ctx.Queues, | |||
PreTrainModel: ctx.GetContainerDataArray(entity.ContainerPreTrainModel), | |||
BootFile: form.BootFile, | |||
OutPut: ctx.GetContainerDataArray(entity.ContainerOutPutPath), | |||
Params: form.ParamArray, | |||
Spec: ctx.Spec, | |||
RepoName: ctx.Repository.Name, | |||
WorkServerNumber: ctx.Request.WorkServerNumber, | |||
}, | |||
}, | |||
TaskConfig: ctx.Config, | |||
} | |||
createTime := timeutil.TimeStampNow() | |||
res, err := c.CreateTrainJob(req) | |||
if err != nil { | |||
log.Error("GrampusTrainTaskTemplate CreateTrainJob err.req=%+v err=%v", req, err) | |||
return response.NewBizError(err) | |||
} | |||
ctx.Response = &entity.CreationResponse{ | |||
JobID: res.JobID, | |||
Status: res.Status, | |||
CreateTime: createTime, | |||
} | |||
return nil | |||
} |
@@ -144,7 +144,7 @@ func (g DefaultCreationHandler) CheckDatasets(ctx *context.CreationContext) *res | |||
attachSize += infos.Size | |||
} | |||
limitSizeGB := ctx.Config.DatasetsLimitSizeGB | |||
if limitSizeGB > 0 && attachSize > int64(limitSizeGB*1000*1000*1000) { | |||
if limitSizeGB > 0 && attachSize > int64(limitSizeGB*1024*1024*1024) { | |||
log.Error("The DatasetSize exceeds the limit (%dGB)", limitSizeGB) // GB | |||
return response.DATASET_SIZE_OVER_LIMIT.WithParams(limitSizeGB) | |||
} | |||
@@ -87,7 +87,7 @@ func GetAITaskCreationInfo(req entity.GetAITaskCreationInfoReq) (*entity.Creatio | |||
} | |||
result.Config = entity.AITaskCreationConfig{ | |||
DatasetMaxSize: setting.DebugAttachSize * 1000 * 1000 * 1000, | |||
DatasetMaxSize: setting.DebugAttachSize * 1024 * 1024 * 1024, | |||
} | |||
//查询可用节点数 | |||
if workerNums, err := t.GetAllowedWorkerNum(req.User.ID, req.ComputeSource); err == nil { | |||
@@ -170,7 +170,7 @@ func GrampusNotebookCreate(ctx *context.Context, option api.CreateNotebookOption | |||
for _, infos := range datasetInfos { | |||
attachSize += infos.Size | |||
} | |||
if attachSize > int64(setting.DebugAttachSize*1000*1000*1000) { | |||
if attachSize > int64(setting.DebugAttachSize*1024*1024*1024) { | |||
log.Error("The DatasetSize exceeds the limit (%dGB)", setting.DebugAttachSize) // GB | |||
ctx.JSON(http.StatusOK, models.BaseErrorMessageApi(ctx.Tr("cloudbrain.error.debug_datasetsize", setting.DebugAttachSize))) | |||
return | |||
@@ -10,7 +10,7 @@ import ( | |||
"github.com/elliotchance/orderedmap" | |||
) | |||
var opTypes = []int{1, 2, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49} | |||
var opTypes = []int{1, 2, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51} | |||
type ClientsManager struct { | |||
Clients *orderedmap.OrderedMap | |||
@@ -89,7 +89,7 @@ | |||
<div class="row"> | |||
<!-- 任务名 --> | |||
{{$JobID := '0'}} | |||
{{if eq .JobType "DEBUG" "TRAIN" "HPC" "SNN4IMAGENET" "BRAINSCORE" "BENCHMARK" "MODELSAFETY" "SNN4ECOSET" "SIM2BRAIN_SNN" "ONLINEINFERENCE"}} | |||
{{if eq .JobType "DEBUG" "TRAIN" "INFERENCE" "HPC" "SNN4IMAGENET" "BRAINSCORE" "BENCHMARK" "MODELSAFETY" "SNN4ECOSET" "SIM2BRAIN_SNN" "ONLINEINFERENCE"}} | |||
{{$JobID = .Cloudbrain.ID}} | |||
{{else}} | |||
{{$JobID = .JobID}} | |||
@@ -119,7 +119,7 @@ | |||
</a> | |||
{{else if eq .JobType "INFERENCE"}} | |||
<a class="title" | |||
href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/{{if eq .Cloudbrain.Type 1}}modelarts{{else if eq .Cloudbrain.Type 0}}cloudbrain{{end}}/inference-job/{{$JobID}}" | |||
href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/{{if eq .Cloudbrain.Type 2}}grampus{{else if eq .Cloudbrain.Type 1}}modelarts{{else if eq .Cloudbrain.Type 0}}cloudbrain{{end}}/inference-job/{{$JobID}}" | |||
title="{{.DisplayJobName}}" style="font-size: 14px;"> | |||
<span class="fitted" | |||
style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> | |||
@@ -155,7 +155,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" "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-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/train-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}}" data-datamigrate='{{$.i18n.Tr "repo.migratingData"}}' data-centerpend='{{$.i18n.Tr "repo.centerPending"}}'> | |||
<span> | |||
@@ -351,7 +351,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" "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' | |||
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{{else if eq .Cloudbrain.Type 1}}/modelarts/train-job{{else if eq .Cloudbrain.Type 2}}/grampus/train-job{{end}}{{end}}/{{$JobID}}/del?isadminpage=true' | |||
method="post"> | |||
{{$.CsrfTokenHtml}} | |||
<input type="hidden" value="{{.Cloudbrain.ID}}" style="display:none" name="id" /> | |||
@@ -1,553 +1 @@ | |||
{{template "base/head" .}} | |||
<style> | |||
.title{ | |||
font-size: 16px !important; | |||
padding-left: 3rem !important; | |||
} | |||
.min_title{ | |||
font-size: 14px !important; | |||
margin-bottom: 2rem !important; | |||
} | |||
.width{ | |||
width:100% !important; | |||
} | |||
.width80{ | |||
width: 80.7% !important; | |||
} | |||
.width85 { | |||
width: 85% !important; | |||
margin-left: 10.5rem !important; | |||
align-items: center; | |||
} | |||
.width35{ | |||
width: 35.5% !important; | |||
} | |||
.width48{ | |||
width: 48.5% !important; | |||
} | |||
.nowrapx { | |||
white-space: nowrap !important; | |||
} | |||
</style> | |||
{{template "custom/global_mask" .}} | |||
<div class="repository"> | |||
{{template "repo/header" .}} | |||
<div class="ui container"> | |||
{{if eq .NotStopTaskCount 0}} | |||
{{template "base/alert" .}} | |||
{{end}} | |||
{{template "custom/alert_cb" .}} | |||
<div class="cloudbrain-type" style="display: none;" data-cloudbrain-type="{{.datasetType}}" data-repo-link="{{.RepoLink}}"></div> | |||
<h4 class="ui top attached header"> | |||
{{.i18n.Tr "repo.modelarts.train_job.new_infer"}} | |||
</h4> | |||
<div class="ui attached segment"> | |||
<!-- equal width --> | |||
<form id="form_id" class="ui form" action="{{.Link}}" method="post"> | |||
{{.CsrfTokenHtml}} | |||
<input type="hidden" name="action" value="update"> | |||
<input type="hidden" id="ai_image_name" value="{{.image}}"> | |||
<input type="hidden" id="failed_train_url" value="{{$.train_url}}"> | |||
<input type="hidden" id="failed_model_name" value="{{$.model_name}}"> | |||
<input type="hidden" id="failed_model_version" value="{{$.model_version}}"> | |||
<input type="hidden" id="failed_ckpt_name" value="{{$.ckpt_name}}"> | |||
<input type="hidden" id="failed_train_url" value="{{$.train_url}}"> | |||
<input type="hidden" id="fail_dataset_name" value="{{$.dataset_name}}"> | |||
<input type="hidden" id="fail_dataset_uuid" value="{{$.attachment}}"> | |||
<h4 class="title ui header ">{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}:</h4> | |||
<div class="required min_title inline field"> | |||
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.compute_resource"}}</label> | |||
<div class="ui blue mini menu compact selectcloudbrain"> | |||
<a class="active item" href="{{.RepoLink}}/cloudbrain/inference-job/create"> | |||
<svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" | |||
height="16"> | |||
<path fill="none" d="M0 0h24v24H0z" /> | |||
<path | |||
d="M3 2.992C3 2.444 3.445 2 3.993 2h16.014a1 1 0 0 1 .993.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 21.008V2.992zM19 11V4H5v7h14zm0 2H5v7h14v-7zM9 6h6v2H9V6zm0 9h6v2H9v-2z" /> | |||
</svg> | |||
CPU/GPU | |||
</a> | |||
<a class="item" href="{{.RepoLink}}/modelarts/inference-job/create"> | |||
<svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" | |||
height="16"> | |||
<path fill="none" d="M0 0h24v24H0z" /> | |||
<path | |||
d="M3 2.992C3 2.444 3.445 2 3.993 2h16.014a1 1 0 0 1 .993.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 21.008V2.992zM19 11V4H5v7h14zm0 2H5v7h14v-7zM9 6h6v2H9V6zm0 9h6v2H9v-2z" /> | |||
</svg> | |||
Ascend NPU</a> | |||
</div> | |||
</div> | |||
<div class="min_title inline field" style="margin-top:-10px;"> | |||
<label class="label-fix-width" style="font-weight: normal;"></label> | |||
{{template "custom/task_wait_count" .}} | |||
<div style="display: flex;align-items: center;margin-left: 156px;margin-top: 0.5rem;"> | |||
<i class="ri-error-warning-line" style="color: #f2711c;margin-right: 0.5rem;"></i> | |||
<span style="color: #888;font-size: 12px;">{{.i18n.Tr "cloudbrain.new_infer_gpu_tooltips" "/dataset" "/model" "/result" | Safe}}</span> | |||
</div> | |||
</div> | |||
<div class="required min_title inline field"> | |||
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label> | |||
<input style="width: 60%;" name="display_job_name" id="display_job_name" placeholder={{.i18n.Tr "repo.modelarts.train_job.job_name"}} value="{{.display_job_name}}" onkeyup="this.value=this.value.replace(/[, ]/g,'')" tabindex="3" autofocus required maxlength="36"> | |||
<span class="tooltips" style="margin-left:11.5rem;display: block;">{{.i18n.Tr "repo.cloudbrain_jobname_err"}}</span> | |||
</div> | |||
<div class="min_title inline field"> | |||
<label class="label-fix-width" style="font-weight: normal;" for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}}</label> | |||
{{if .description}} | |||
<textarea style="width: 80%;" id="description" name="description" rows="3" maxlength="255" placeholder={{.i18n.Tr "repo.modelarts.train_job.new_place"}}>{{.description}}</textarea> | |||
{{else}} | |||
<textarea style="width: 80%;" id="description" name="description" rows="3" maxlength="255" placeholder={{.i18n.Tr "repo.modelarts.train_job.new_place"}} onchange="this.value=this.value.substring(0, 255)" onkeydown="this.value=this.value.substring(0, 255)" onkeyup="this.value=this.value.substring(0, 255)"></textarea> | |||
{{end}} | |||
</div> | |||
<div class="ui divider"></div> | |||
<h4 class="title ui header ">{{.i18n.Tr "repo.modelarts.train_job.parameter_setting"}}:</h4> | |||
<!-- 模型相关配置 --> | |||
<!-- | |||
<div class="required inline min_title fields" style="width: 94%;"> | |||
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.infer_job.select_model"}}</label> | |||
<div class="six wide field"> | |||
<div class="ui fluid search selection dropdown loading " id="select_model"> | |||
<input type="hidden" name="model_name" required> | |||
<div class="text"></div> | |||
<i class="dropdown icon"></i> | |||
<div class="menu" id="model_name"> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="three wide field"> | |||
<div class="ui fluid search selection dropdown" id="select_model_version"> | |||
<input type="hidden" name="train_url" required> | |||
<div class="text"></div> | |||
<i class="dropdown icon"></i> | |||
<div class="menu" id="model_name_version"> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="five wide field"> | |||
<div class="ui fluid search selection dropdown" id="select_model_checkpoint"> | |||
<input type="hidden" name="ckpt_name" required> | |||
<div class="text"></div> | |||
<i class="dropdown icon"></i> | |||
<div class="menu" id="model_checkpoint"> | |||
</div> | |||
</div> | |||
</div> | |||
<span > | |||
<i class="question circle icon" data-content="{{.i18n.Tr "cloudbrain.model_file_postfix_rule"}}" data-position="top center" data-variation="inverted mini"></i> | |||
</span> | |||
</div> | |||
--> | |||
<div> | |||
<div class="select-multi-model" data-required="true" data-model-id="{{.model_id}}" data-model-name="{{.model_name}}" data-model-version="{{.model_version}}" | |||
data-pre-train-model-url="{{.pre_train_model_url}}" data-ckpt-name="{{.ckpt_name}}"></div> | |||
<div id="select-multi-model"></div> | |||
</div> | |||
<!-- AI引擎 --> | |||
<div id="images-new-cb"></div> | |||
<!-- 代码分支 --> | |||
<div class="required min_title inline field"> | |||
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.code_version"}}</label> | |||
<select class="ui dropdown width48" id="code_version" name="branch_name"> | |||
{{if .branch_name}} | |||
<option name="branch_name" value="{{.branch_name}}">{{.branch_name}}</option> | |||
{{range $k, $v :=.Branches}} | |||
{{ if ne $v $.branch_name }} | |||
<option name="branch_name" value="{{$v}}">{{$v}}</option> | |||
{{end}} | |||
{{end}} | |||
{{else}} | |||
<option name="branch_name" value="{{.branchName}}">{{.branchName}}</option> | |||
{{range $k, $v :=.Branches}} | |||
{{ if ne $v $.branchName }} | |||
<option name="branch_name" value="{{$v}}">{{$v}}</option> | |||
{{end}} | |||
{{end}} | |||
{{end}} | |||
</select> | |||
</div> | |||
<!-- GPU 卡的类型 --> | |||
<!--<div class="required min_title inline field"> | |||
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.gpu_type"}}</label> | |||
<select id="cloudbrain_gpu_type" class="ui search width48 dropdown gpu-type" placeholder="选择GPU类型" | |||
style='width:385px' name="gpu_type"> | |||
{{if .gpu_type}} | |||
{{range .inference_gpu_types}} | |||
{{if eq $.gpu_type .Queue}} | |||
<option value="{{.Queue}}">{{.Value}}</option> | |||
{{end}} | |||
{{end}} | |||
{{range .inference_gpu_types}} | |||
{{if ne $.gpu_type .Queue}} | |||
<option value="{{.Queue}}">{{.Value}}</option> | |||
{{end}} | |||
{{end}} | |||
{{else}} | |||
{{range .inference_gpu_types}} | |||
<option value="{{.Queue}}">{{.Value}}</option> | |||
{{end}} | |||
{{end}} | |||
</select> | |||
</div>--> | |||
<!-- 数据集--> | |||
<div id="select-multi-dataset"> | |||
</div> | |||
<span class="tooltips" style="margin-left: 11.5rem;margin-bottom: 1rem;"></span> | |||
<div class="inline min_title field required"> | |||
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.start_file"}}</label> | |||
{{if .boot_file}} | |||
<input style="width: 48.5%;" name="boot_file" id="trainjob_boot_file" value="{{.boot_file}}" tabindex="3" autofocus required maxlength="255" > | |||
{{else}} | |||
<input style="width: 48.5%;" name="boot_file" id="trainjob_boot_file" value="" tabindex="3" autofocus required maxlength="255" > | |||
{{end}} | |||
<span > | |||
<i class="question circle icon" data-content={{.i18n.Tr "repo.modelarts.infer_job.boot_file_helper"}} data-position="top center" data-variation="inverted mini"></i> | |||
</span> | |||
<a href="https://openi.pcl.ac.cn/OpenIOSSG/MNIST_PytorchExample_GPU/src/branch/master/inference.py" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
</div> | |||
<!-- 运行参数 --> | |||
<div class="inline min_title field"> | |||
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.run_parameter"}}</label> | |||
<span id="add_run_para" style="cursor:pointer;color: rgba(3, 102, 214, 100);font-size: 14px;line-height: 26px;font-family: SourceHanSansSC-medium;"><i class="plus square outline icon"></i>{{.i18n.Tr "repo.modelarts.train_job.add_run_parameter"}}</span> | |||
<input id="store_run_para" type="hidden" name="run_para_list"> | |||
<div class="dynamic field" style="margin-top: 1rem;" data-params="{{.run_para_list}}"> | |||
</div> | |||
</div> | |||
<div class="required field " style="display: none;"> | |||
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.resource_pool"}}</label> | |||
<select class="ui dropdown" id="trainjob_resource_pool" style='width:385px' name="pool_id"> | |||
{{range .resource_pools}} | |||
<option value="{{.ID}}">{{.Value}}</option> | |||
{{end}} | |||
</select> | |||
</div> | |||
<!-- 规格 --> | |||
<!--<div class="required min_title inline field"> | |||
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_specification"}}</label> | |||
<select id="cloudbrain_resource_spec" class="ui search dropdown width80" placeholder="选择资源规格" name="resource_spec_id"> | |||
{{if .resource_spec_id}} | |||
{{range .inference_resource_specs}} | |||
{{if eq $.resource_spec_id .Id}} | |||
<option value="{{.Id}}">{{$.i18n.Tr "cloudbrain.gpu_num"}}:{{.GpuNum}},{{$.i18n.Tr "cloudbrain.cpu_num"}}:{{.CpuNum}},{{$.i18n.Tr "cloudbrain.memory"}}(MB):{{$.i18n.Tr "cloudbrain.shared_memory"}}(MB):{{.ShareMemMiB}}</option> | |||
{{end}} | |||
{{end}} | |||
{{range .inference_resource_specs}} | |||
{{if ne $.resource_spec_id .Id}} | |||
<option value="{{.Id}}">{{$.i18n.Tr "cloudbrain.gpu_num"}}:{{.GpuNum}},{{$.i18n.Tr "cloudbrain.cpu_num"}}:{{.CpuNum}},{{$.i18n.Tr "cloudbrain.memory"}}(MB):{{$.i18n.Tr "cloudbrain.shared_memory"}}(MB):{{.ShareMemMiB}}</option> | |||
{{end}} | |||
{{end}} | |||
{{else}} | |||
{{range .inference_resource_specs}} | |||
<option name="resource_spec_id" value="{{.Id}}"> | |||
{{$.i18n.Tr "cloudbrain.gpu_num"}}:{{.GpuNum}},{{$.i18n.Tr "cloudbrain.cpu_num"}}:{{.CpuNum}},{{$.i18n.Tr "cloudbrain.memory"}}(MB):{{$.i18n.Tr "cloudbrain.shared_memory"}}(MB):{{.ShareMemMiB}}</option> | |||
{{end}} | |||
{{end}} | |||
</select> | |||
</div>--> | |||
<div class="required min_title inline field"> | |||
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_specification"}}</label> | |||
<select id="__specs__" class="ui search dropdown width48" placeholder="{{.i18n.Tr "cloudbrain.select_specification"}}" ovalue="{{.spec_id}}" name="spec_id" {{if .CloudBrainPaySwitch}}blance="{{.PointAccount.Balance}}"{{end}}> | |||
</select> | |||
<span><i class="question circle icon link" data-content="{{.i18n.Tr "repo.modelarts.train_job.resource_helper"}}" data-position="right center" data-variation="mini"></i></span> | |||
<a href="https://openi.pcl.ac.cn/docs/index.html#/quickstart/resources" target="_blank">{{.i18n.Tr "custom.resource_description"}}</a> | |||
{{if .CloudBrainPaySwitch}} | |||
<div class="cloudbrain_resource_spec_blance_tip width48" style="padding:0 5px;margin:6px 0;margin-left:155px;font-size:12px;"> | |||
<span>{{$.i18n.Tr "points.balance_of_points"}}<span style="color:red;margin: 0 3px">{{.PointAccount.Balance}}</span>{{$.i18n.Tr "points.points"}}</span><span>{{$.i18n.Tr "points.expected_time"}}<span style="color:red;margin: 0 3px" class="can-use-time"></span>{{$.i18n.Tr "points.hours"}}</span> | |||
<span style="float:right;"> | |||
<i class="question circle icon link" ></i> | |||
<a href="{{AppSubUrl}}/reward/point/rule" target="_blank">{{$.i18n.Tr "points.points_acquisition_instructions"}}</a> | |||
</span> | |||
</div> | |||
{{end}} | |||
</div> | |||
<!-- 表单操作 --> | |||
<div class="inline min_title field"> | |||
<label class="label-fix-width" style="font-weight: normal;"></label> | |||
<button class="ui create_train_job green button {{if eq .NotStopTaskCount 1}}disabled{{end}}"> | |||
{{.i18n.Tr "repo.cloudbrain.new"}} | |||
</button> | |||
<a class="ui button" href="{{.RepoLink}}/modelarts/inference-job">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a> | |||
</div> | |||
<!-- 模态框 --> | |||
</form> | |||
</div> | |||
</div> | |||
</div> | |||
{{template "base/footer" .}} | |||
<script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script> | |||
<script> | |||
let form = document.getElementById('form_id'); | |||
let createFlag = false | |||
form.onsubmit = function (e) { | |||
if(createFlag) return false | |||
createFlag = true | |||
} | |||
const RepoLink = {{.RepoLink}} | |||
let nameMap,nameList | |||
// 获取模型列表和模型名称对应的模型版本 | |||
$(document).ready(function(){ | |||
return; // 用模型选择组件了 | |||
modelVersion() | |||
modelCkpt() | |||
$.get(`${RepoLink}/modelmanage/query_model_for_predict?type=0`, (data) => { | |||
nameMap = data.nameMap | |||
nameList = data.nameList | |||
let faildModelName = document.getElementById('failed_model_name').value | |||
let html = '' | |||
nameList.forEach(element => { | |||
html += `<div class="item" data-value="${element}">${element}</div>` | |||
}); | |||
if(nameList.length!==0){ | |||
$('#model_name').append(html) | |||
if(faildModelName){ | |||
$("#select_model").dropdown('set text',faildModelName) | |||
$("#select_model").dropdown('set value',faildModelName) | |||
}else{ | |||
$("#select_model").dropdown('set text',nameList[0]) | |||
$("#select_model").dropdown('set value',nameList[0],nameList[0]) | |||
} | |||
} | |||
$('#select_model').removeClass("loading") | |||
}) | |||
}) | |||
// 根据选中的模型名称获取相应的模型版本 | |||
function modelVersion(){ | |||
let faildModelVersion = $('#failed_model_version').val() | |||
let faildTrainUrl = $('#failed_train_url').val() | |||
$('#select_model').dropdown({ | |||
onChange: function(value, text, $selectedItem) { | |||
$("#select_model_version").addClass("loading") | |||
$('#model_name_version').empty() | |||
let html = '' | |||
nameMap[value].forEach(element => { | |||
html += `<div class="item" data-label="${element.label}" data-id="${element.id}" data-value="${element.path}">${element.version}</div>` | |||
}); | |||
$('#model_name_version').append(html) | |||
$("#select_model_version").removeClass("loading") | |||
const initVersionText = $('#model_name_version div.item:first-child').text() | |||
const initVersionValue = $('#model_name_version div.item:first-child').data('value') | |||
if(faildModelVersion&&faildTrainUrl){ | |||
$("#select_model_version").dropdown('set text',faildModelVersion) | |||
$("#select_model_version").dropdown('set value',faildTrainUrl,faildModelVersion,$('#model_name_version div.item:first-child')) | |||
}else{ | |||
$("#select_model_version").dropdown('set text',initVersionText) | |||
$("#select_model_version").dropdown('set value',initVersionValue,initVersionText,$('#model_name_version div.item:first-child')) | |||
} | |||
} | |||
}) | |||
} | |||
// 根据选中的模型版本获取相应的模型权重文件 | |||
function modelCkpt(){ | |||
let faildCkptName = $('#failed_ckpt_name').val() | |||
$('#select_model_version').dropdown({ | |||
onChange: function(value, text, $selectedItem) { | |||
const dataID = $selectedItem[0].getAttribute("data-id") | |||
const label = $selectedItem[0].getAttribute("data-label") | |||
$("#select_model_checkpoint").addClass("loading") | |||
$("#model_checkpoint").empty() | |||
let html = '' | |||
loadCheckpointList(dataID).then((res)=>{ | |||
res.forEach(element => { | |||
const ckptSuffix = element.FileName.split(".") | |||
const loadCheckpointFile = ['ckpt','pb','h5','json','pkl','pth','t7','pdparams','onnx','pbtxt','keras','mlmodel','cfg','pt'] | |||
if(!element.IsDir && loadCheckpointFile.includes(ckptSuffix[ckptSuffix.length-1])){ | |||
html += `<div class="item" data-value="${element.FileName}">${element.FileName}</div>` | |||
} | |||
}) | |||
$('#model_checkpoint').append(html) | |||
$("#select_model_checkpoint").removeClass("loading") | |||
const initVersionText = $('#model_checkpoint div.item:first-child').text() | |||
const initVersionValue = $('#model_checkpoint div.item:first-child').data('value') | |||
if(faildCkptName){ | |||
$("#select_model_checkpoint").dropdown('set text',faildCkptName) | |||
$("#select_model_checkpoint").dropdown('set value',faildCkptName,faildCkptName,$('#model_name_version div.item:first-child')) | |||
}else{ | |||
$("#select_model_checkpoint").dropdown('set text',initVersionText) | |||
$("#select_model_checkpoint").dropdown('set value',initVersionValue,initVersionText,$('#model_name_version div.item:first-child')) | |||
} | |||
}) | |||
$("input#ai_model_version").val(text) | |||
$("input#ai_model_label").val(label) | |||
} | |||
}) | |||
} | |||
function loadCheckpointList(value){ | |||
return new Promise((resolve,reject)=>{ | |||
$.get(`${RepoLink}/modelmanage/query_modelfile_for_predict`,{id:value}, (data) => { | |||
resolve(data) | |||
}) | |||
}) | |||
} | |||
$('.question.circle.icon').hover(function(){ | |||
$(this).popup('show') | |||
}); | |||
$(document).ready(function(){ | |||
let params = $('.dynamic.field').data('params') | |||
params&¶ms.parameter.forEach((item,index)=>{ | |||
Add_parameter(index,flag=true,item) | |||
}) | |||
}) | |||
// 参数增加、删除、修改、保存 | |||
function Add_parameter(i,flag=false,paramsObject={}) { | |||
let value = '' | |||
value += `<div class="two fields width85" id= "para${i}">` | |||
value += '<div class="field">' | |||
let placeholder_value='{{.i18n.Tr "repo.modelarts.train_job.parameter_value"}}' | |||
let placeholder_name='{{.i18n.Tr "repo.modelarts.train_job.parameter_name"}}' | |||
if(flag){ | |||
value +=`<input type="text" class="shipping_first-name" value="${paramsObject.label}">` | |||
}else{ | |||
value +='<input type="text" class="shipping_first-name" required placeholder="' + placeholder_name+ '">' | |||
} | |||
value += '</div>' | |||
value += '<div class="field">' | |||
if(flag){ | |||
value +=`<input type="text" class="shipping_last-name" value="${paramsObject.value}">` | |||
}else{ | |||
value +='<input type="text" class="shipping_last-name" required placeholder="' + placeholder_value+ '">' | |||
} | |||
value += '</div>' | |||
value += '<span><i class="trash icon"></i></span>' | |||
value += '</div>' | |||
$(".dynamic.field").append(value) | |||
} | |||
$('#add_run_para').click(function () { | |||
var len = $(".dynamic.field .two.fields").length | |||
Add_parameter(len) | |||
}); | |||
$(".dynamic.field").on("click", ".trash.icon", function () { | |||
var index = $(this).parent().parent().index() | |||
$(this).parent().parent().remove() | |||
var len = $(".dynamic.field .two.fields").length | |||
$(".dynamic.field .two.fields").each(function () { | |||
var cur_index = $(this).index() | |||
$(this).attr('id', 'para' + cur_index) | |||
}) | |||
}); | |||
function send_run_para() { | |||
var run_parameters = [] | |||
var msg = {} | |||
$(".dynamic.field .two.fields").each(function () { | |||
var para_name = $(this).find('input.shipping_first-name').val() | |||
var para_value = $(this).find('input.shipping_last-name').val() | |||
run_parameters.push({ "label": para_name, "value": para_value }) | |||
}) | |||
msg["parameter"] = run_parameters | |||
msg = JSON.stringify(msg) | |||
$('#store_run_para').val(msg) | |||
} | |||
var isValidate = false; | |||
function validate(){ | |||
$('.ui.form') | |||
.form({ | |||
on: 'blur', | |||
fields: { | |||
boot_file: { | |||
identifier : 'boot_file', | |||
rules: [ | |||
{ | |||
type: 'regExp[/.+\.py$/g]', | |||
} | |||
] | |||
}, | |||
display_job_name:{ | |||
identifier : 'display_job_name', | |||
rules: [ | |||
{ | |||
type: 'regExp[/^[a-z0-9][a-z0-9-_]{1,34}[a-z0-9-]$/]', | |||
} | |||
] | |||
}, | |||
attachment:{ | |||
identifier : 'attachment', | |||
rules: [ | |||
{ | |||
type: 'empty', | |||
} | |||
] | |||
}, | |||
model_name:{ | |||
identifier : 'model_name', | |||
rules: [ | |||
{ | |||
type: 'empty', | |||
} | |||
] | |||
}, | |||
train_url:{ | |||
identifier : 'train_url', | |||
rules: [ | |||
{ | |||
type: 'empty', | |||
} | |||
] | |||
}, | |||
ckpt_name:{ | |||
identifier : 'ckpt_name', | |||
rules: [ | |||
{ | |||
type: 'empty', | |||
} | |||
] | |||
}, | |||
spec_id: { | |||
identifier: 'spec_id', | |||
rules: [{ type: 'empty' }] | |||
} | |||
}, | |||
onSuccess: function(){ | |||
document.getElementById("mask").style.display = "block" | |||
isValidate = true; | |||
}, | |||
onFailure: function(e){ | |||
isValidate = false; | |||
return false; | |||
} | |||
}) | |||
} | |||
document.onreadystatechange = function() { | |||
if (document.readyState === "complete") { | |||
document.getElementById("mask").style.display = "none" | |||
} | |||
} | |||
validate(); | |||
$('.ui.create_train_job.green.button').click(function(e) { | |||
send_run_para(); | |||
validate(); | |||
}) | |||
;(function() { | |||
var SPECS = {{ .inference_specs }}; | |||
var showPoint = {{ .CloudBrainPaySwitch }}; | |||
window.renderSpecsSelect($('#__specs__'), SPECS, showPoint, { | |||
gpu_memory: {{$.i18n.Tr "cloudbrain.gpu_memory"}}, | |||
free: {{$.i18n.Tr "cloudbrain.free"}}, | |||
point_hr: {{$.i18n.Tr "cloudbrain.point_hr"}}, | |||
memory: {{$.i18n.Tr "cloudbrain.memory"}}, | |||
shared_memory: {{$.i18n.Tr "cloudbrain.shared_memory"}}, | |||
no_use_resource:{{$.i18n.Tr "cloudbrain.no_use_resource"}}, | |||
}); | |||
})(); | |||
</script> | |||
{{ template "repo/cloudbrain/cloudbraincreate" .}} |
@@ -1,446 +1 @@ | |||
{{template "base/head" .}} | |||
<style> | |||
.model_file_bread { | |||
margin-bottom: -0.5rem !important; | |||
padding-left: 1rem; | |||
padding-top: 0.5rem; | |||
} | |||
</style> | |||
<div id="mask"> | |||
<div id="loadingPage"> | |||
<div class="rect1"></div> | |||
<div class="rect2"></div> | |||
<div class="rect3"></div> | |||
<div class="rect4"></div> | |||
<div class="rect5"></div> | |||
</div> | |||
</div> | |||
<div class="repository"> | |||
{{template "repo/header" .}} | |||
<div class="ui container"> | |||
<h4 class="ui header" id="vertical-segment"> | |||
<div class="ui breadcrumb"> | |||
<a class="section" href="{{.RepoLink}}/debugjob?debugListType=all"> | |||
{{.i18n.Tr "repo.cloudbrain"}} | |||
</a> | |||
<div class="divider"> / </div> | |||
<a class="section" href="{{$.RepoLink}}/modelarts/inference-job"> | |||
{{$.i18n.Tr "repo.modelarts.infer_job"}} | |||
</a> | |||
<div class="divider"> / </div> | |||
<div class="active section">{{.displayJobName}}</div> | |||
</div> | |||
</h4> | |||
{{with .task}} | |||
<div class="ui accordion border-according" id="accordion{{.VersionName}}" | |||
data-repopath="{{$.RepoRelPath}}/cloudbrain" data-jobid="{{.ID}}" data-version="{{.VersionName}}"> | |||
<input type="hidden" id="jobId_input" name="jobId_input" value="{{.JobID}}"> | |||
<div class="active title padding0"> | |||
<div class="according-panel-heading"> | |||
<div class="accordion-panel-title"> | |||
<i class="dropdown icon"></i> | |||
<span class="accordion-panel-title-content"> | |||
<span> | |||
<div class="ac-display-inblock title_text acc-margin-bottom"> | |||
<span class="cti-mgRight-sm">{{TimeSinceUnix1 .CreatedUnix}}</span> | |||
<span class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.status"}}: | |||
<span id="{{.VersionName}}-status-span"><i id="icon" | |||
style="vertical-align: middle;" class="{{.Status}}"></i><span id="text" | |||
style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span> | |||
</span> | |||
<span | |||
class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}:</span> | |||
<span class="cti-mgRight-sm uc-accordionTitle-black" | |||
id="{{.VersionName}}-duration-span">{{$.duration}}</span> | |||
<span class="refresh-status" data-tooltip="刷新" style="cursor: pointer;" data-inverted="" data-version="{{.VersionName}}"><i | |||
class="redo icon redo-color"></i></span> | |||
</div> | |||
</span> | |||
</span> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="active content"> | |||
<div class="content-pad"> | |||
<div class="ui pointing secondary menu" style="border-bottom: 1px solid rgba(34,36,38,.15);"> | |||
<a class="active item" | |||
data-tab="first">{{$.i18n.Tr "repo.modelarts.train_job.config"}}</a> | |||
<a class="item detail-log-tab" data-tab="third" | |||
data-version="{{.VersionName}}">{{$.i18n.Tr "repo.modelarts.log"}}</a> | |||
<a class="item load-model-file" data-tab="four" | |||
data-gpu-flag="true" data-download-flag="{{$.canDownload}}" data-path="{{$.RepoLink}}/cloudbrain/inference-job/{{.JobID}}/result_list" data-version="{{.VersionName}}" data-parents="" data-filename="" data-init="init" >{{$.i18n.Tr "repo.model_download"}}</a> | |||
</div> | |||
<div class="ui tab active" data-tab="first"> | |||
<div style="padding-top: 10px;"> | |||
<div class="tab_2_content"> | |||
<div class="ac-grid ac-grid-col2"> | |||
<div class="ac-grid-col"> | |||
<table class="ti-form"> | |||
<tbody class="ti-text-form"> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.cloudbrain_task"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w"> | |||
{{.DisplayJobName}} | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.status"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w" id="{{.VersionName}}-status"> | |||
{{.Status}} | |||
</div> | |||
</td> | |||
</tr> | |||
<!-- <tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.run_version"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w"> | |||
{{.VersionName}} | |||
</div> | |||
</td> | |||
</tr> --> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.train_job.start_time"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w"> | |||
<span style="font-size: 12px;" id="{{.VersionName}}-startTime"> | |||
{{if not (eq .StartTime 0)}} | |||
{{TimeSinceUnix1 .StartTime}} | |||
{{else}} | |||
-- | |||
{{end}} | |||
</span> | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w" id="{{.VersionName}}-duration"> | |||
{{.TrainJobDuration}} | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.train_job.resource_type"}} | |||
</td> | |||
<td class="ti-text-form-content resorce_type"> | |||
<div class="text-span text-span-w"></div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.model.manage.description"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w" id="{{.VersionName}}-desc" style="width: 380px;"> | |||
{{if .Description}} | |||
<span title="{{.Description}}">{{.Description}}</span> | |||
{{else}} | |||
<span>--</span> | |||
{{end}} | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.cloudbrain_creator"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w" id="{{.VersionName}}-creator"> | |||
{{.User.Name}} | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "cloudbrain.mirror"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w" id="{{.VersionName}}-mirror"> | |||
<span class="ui poping up clipboard" data-position="top center" id="clipboard-btn" style="cursor:pointer" | |||
data-clipboard-text="{{.Image}}" | |||
data-success="{{$.i18n.Tr "repo.copy_link_success"}}" | |||
data-error="{{$.i18n.Tr "repo.copy_link_error"}}" | |||
data-content="{{$.i18n.Tr "repo.copy_link"}}" | |||
data-variation="inverted tiny" | |||
> | |||
<span title="{{.Image}}">{{.Image}}</span> | |||
</span> | |||
</div> | |||
</td> | |||
</tr> | |||
</tbody> | |||
</table> | |||
</div> | |||
<div class="ac-grid-col"> | |||
<table class="ti-form"> | |||
<tbody class="ti-text-form"> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.infer_job_model"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w"> | |||
<span>{{.ModelName}}</span> | |||
<span style="color: #8a8e99">{{$.i18n.Tr "repo.modelarts.version"}}:</span><span>{{.ModelVersion}}</span> | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.infer_job_model_file"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w"> | |||
{{.CkptName}} | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.model_label"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w" id="{{.VersionName}}-labels"> | |||
{{if .LabelName}} | |||
{{range $.LabelName}} | |||
<a class="ui label" title="{{.}}">{{.}}</a> | |||
{{end}} | |||
{{else}} | |||
<span>--</span> | |||
{{end}} | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.code_version"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w"> | |||
{{.BranchName}} | |||
<span style="margin-left:1rem" class="ui label">{{SubStr .CommitID 0 10}}</span> | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.train_job.start_file"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w"> | |||
{{.BootFile}} | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80" > | |||
{{$.i18n.Tr "repo.modelarts.train_job.run_parameter"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w" title="{{.Parameters}}"> | |||
{{if .Parameters}} | |||
<span>{{.Parameters}}</span> | |||
{{else}} | |||
<span>--</span> | |||
{{end}} | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.train_job.standard"}} | |||
</td> | |||
<td class="ti-text-form-content spec"> | |||
<div class="text-span text-span-w"></div> | |||
</td> | |||
</tr> | |||
</tbody> | |||
</table> | |||
</div> | |||
</div> | |||
<div style="clear:both"> | |||
<table style="border:none" class="ui fixed small stackable table"> | |||
<thead> | |||
<tr><th style="color: #8a8e99;font-size:12px" class="three wide left aligned">{{$.i18n.Tr "dataset.file"}}</th> | |||
</tr></thead> | |||
<tbody> | |||
{{range $m ,$n := $.datasetDownload}} | |||
<tr> | |||
<td style="word-wrap: break-word;word-break: break-all;"> | |||
{{if eq .IsDelete true}} | |||
{{.DatasetName}}({{$.i18n.Tr "dataset.file_deleted"}}) | |||
{{else}} | |||
<a href="{{.RepositoryLink}}" target="_blank">{{.DatasetName}}</a> | |||
{{end}} | |||
</td> | |||
</tr> | |||
{{end}} | |||
</tbody> | |||
</table> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="ui tab" data-tab="third"> | |||
<!-- | |||
<div class="file-info"> | |||
<a id="{{.VersionName}}-log-down" | |||
class='{{if $.canDownload}}ti-download-file{{else}}disabled{{end}} file-info' | |||
href="/api/v1/repos/{{$.RepoRelPath}}/cloudbrain/{{.ID}}/download_log_file"> | |||
<i class="ri-download-cloud-2-line"></i> | |||
<span style="margin-left: 0.3rem;">{{$.i18n.Tr "repo.modelarts.download_log"}}</span> | |||
</a> | |||
<div class="file-info full-log-dialog" data-version="{{.VersionName}}" data-log="{{$.i18n.Tr "repo.modelarts.log_file"}}" | |||
data-exit="{{$.i18n.Tr "repo.modelarts.exit_full_screen"}}" style="margin-left: 1rem;color:#0366d6;cursor: pointer;" | |||
data-log-down="{{$.i18n.Tr "repo.modelarts.download_log"}}" data-href="/api/v1/repos/{{$.RepoRelPath}}/cloudbrain/{{.ID}}/download_log_file" | |||
data-scroll-top="{{$.i18n.Tr "repo.log_scroll_start"}}" data-scroll-bottom="{{$.i18n.Tr "repo.log_scroll_end"}}"> | |||
<i class="ri-aspect-ratio-line"></i> | |||
<span style="margin-left: 0.3rem;">{{$.i18n.Tr "repo.modelarts.fullscreen_log_file"}}</span> | |||
</div> | |||
</div> | |||
<div | |||
style="position: relative;border: 1px solid rgba(0,0,0,.2);padding: 0 10px;margin-top: 10px;"> | |||
<span> | |||
<a title="{{$.i18n.Tr "repo.log_scroll_start"}}" style="position: absolute; right: -32px;cursor: pointer;" | |||
class="log_top" data-version="{{.VersionName}}"><i class="icon-to-top"></i></a> | |||
</span> | |||
<span class="log-info-{{.VersionName}}"> | |||
<a title="{{$.i18n.Tr "repo.log_scroll_end"}}" style="position: absolute; bottom: 10px;right: -32px;cursor: pointer;" | |||
class="log_bottom" data-version="{{.VersionName}}"><i | |||
class="icon-to-bottom"></i></a> | |||
</span> | |||
<div class="ui message message{{.VersionName}}" style="display: none;"> | |||
<div id="header"></div> | |||
</div> | |||
<div class="ui attached log log-scroll" id="log{{.VersionName}}" data-version="{{.VersionName}}" | |||
style="height: 300px !important; overflow: auto;"> | |||
<div class="ui inverted active dimmer"> | |||
<div class="ui loader"></div> | |||
</div> | |||
<input type="hidden" name="end_line" value> | |||
<input type="hidden" name="end_line-max" value> | |||
<input type="hidden" name="start_line-max" value> | |||
<input type="hidden" name="start_line-max-copy" value> | |||
<input type="hidden" name="start_line" value> | |||
<input type="hidden" name="init_log" value> | |||
<pre id="log_file{{.VersionName}}"></pre> | |||
</div> | |||
</div> | |||
--> | |||
<div class="detail-log-content detail-log-content-{{.VersionName}}" | |||
data-multiplenode="" | |||
data-logapiurl="{{$.RepoLink}}/cloudbrain/{{.ID}}/log" | |||
data-logdownloadurl="/api/v1/repos{{$.RepoLink}}/cloudbrain/{{.ID}}/download_log_file" | |||
data-workservernumber="{{.WorkServerNumber}}" | |||
data-version="{{.VersionName}}"> | |||
{{template "custom/task_log" Dict "$" $ "i18n" $.i18n }} | |||
</div> | |||
<div class="ui modal full-log-dlg-{{.VersionName}} container" style="height:90%;margin:3rem auto;"> | |||
<div id="log-file-title" style="font-size: 16px;font-weight:600;padding:20px 30px 16px;">{{$.i18n.Tr "repo.modelarts.log_file"}}</div> | |||
<div style="padding:0 50px 10px 30px;height:100%"> | |||
<div class="detail-log-fullscreen-content detail-log-fullscreen-content-{{.VersionName}}" style="height:100%;" | |||
data-multiplenode="" | |||
data-logapiurl="{{$.RepoLink}}/cloudbrain/{{.ID}}/log" | |||
data-logdownloadurl="/api/v1/repos{{$.RepoLink}}/cloudbrain/{{.ID}}/download_log_file" | |||
data-workservernumber="{{.WorkServerNumber}}" | |||
data-version="{{.VersionName}}"> | |||
{{template "custom/task_log" Dict "$" $ "i18n" $.i18n "Full" true }} | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="ui tab" data-tab="four"> | |||
<input type="hidden" name="model{{.VersionName}}" value="-1"> | |||
<input type="hidden" name="modelback{{.VersionName}}" value="-1"> | |||
<div style="display: flex;justify-content: space-between;"> | |||
<div class='ui breadcrumb model_file_bread' id='file_breadcrumb{{.VersionName}}'> | |||
<div class="active section">{{.VersionName}}</div> | |||
<div class="divider"> / </div> | |||
</div> | |||
<a id="{{.VersionName}}-result-down" style="padding-right: 1%;display: none;" | |||
class='{{if $.canDownload}}ti-download-file{{else}}disabled{{end}} file-info' | |||
href="{{$.RepoLink}}/cloudbrain/inference-job/{{.JobID}}/downloadall?version_name={{.VersionName}}"> | |||
<i class="ri-download-cloud-2-line"></i> | |||
<span style="margin-left: 0.3rem;">{{$.i18n.Tr "repo.all_result_download"}}</span> | |||
</a> | |||
</div> | |||
<div id="dir_list{{.VersionName}}"> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<!-- {{template "custom/max_log" .}} --> | |||
{{end}} | |||
</div> | |||
</div> | |||
{{template "base/footer" .}} | |||
<script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script> | |||
<script> | |||
$('.menu .item').tab() | |||
$(document).ready(function () { | |||
$('.ui.accordion').accordion({ selector: { trigger: '.icon' } }); | |||
}); | |||
$(document).ready(function () { | |||
$('.secondary.menu .item').tab(); | |||
}); | |||
;(function() { | |||
var SPEC = {{ .Spec }}; | |||
var showPoint = false; | |||
var specStr = window.renderSpecStr(SPEC, showPoint, { | |||
gpu_memory: {{$.i18n.Tr "cloudbrain.gpu_memory"}}, | |||
free: {{$.i18n.Tr "cloudbrain.free"}}, | |||
point_hr: {{$.i18n.Tr "cloudbrain.point_hr"}}, | |||
memory: {{$.i18n.Tr "cloudbrain.memory"}}, | |||
shared_memory: {{$.i18n.Tr "cloudbrain.shared_memory"}}, | |||
no_use_resource:{{$.i18n.Tr "cloudbrain.no_use_resource"}}, | |||
}); | |||
$('td.ti-text-form-content.spec div').text(specStr); | |||
SPEC && $('td.ti-text-form-content.resorce_type div').text(getListValueWithKey(ACC_CARD_TYPE, SPEC.AccCardType)); | |||
})(); | |||
</script> | |||
{{ template "repo/cloudbrain/cloudbraindetail" .}} |
@@ -0,0 +1 @@ | |||
{{ template "repo/cloudbrain/cloudbraincreate" .}} |
@@ -0,0 +1 @@ | |||
{{ template "repo/cloudbrain/cloudbraindetail" .}} |
@@ -1,311 +1,9 @@ | |||
<!-- 头部导航栏 --> | |||
{{template "base/head" .}} | |||
<style> | |||
.fontsize14{ | |||
font-size: 14px; | |||
} | |||
.padding0{ | |||
padding: 0 !important; | |||
} | |||
</style> | |||
<!-- 提示框 --> | |||
<div class="alert"></div> | |||
<link rel="stylesheet" href="{{StaticUrlPrefix}}/css/vp-cloudbrain-list.css?v={{MD5 AppVer}}" /> | |||
<script>const Tasks = {{.Tasks}}; </script> | |||
<div class="repository release dataset-list view"> | |||
{{template "repo/header" .}} | |||
<!-- 列表容器 --> | |||
<div class="ui container"> | |||
{{template "base/alert" .}} | |||
<div class="ui two column stackable grid "> | |||
<div class="column"> | |||
<div class="ui blue small menu compact selectcloudbrain"> | |||
<a class="item" href="{{.RepoLink}}/debugjob?debugListType=all">{{$.i18n.Tr "repo.modelarts.notebook"}}</a> | |||
<a class="item" href="{{.RepoLink}}/modelarts/train-job?listType=all">{{$.i18n.Tr "repo.modelarts.train_job"}}</a> | |||
<a class="active item" href="{{.RepoLink}}/modelarts/inference-job">{{$.i18n.Tr "repo.modelarts.infer_job"}}</a> | |||
<a class="item" href="{{.RepoLink}}/cloudbrain/benchmark">{{$.i18n.Tr "repo.modelarts.evaluate_job"}}</a> | |||
<a class="item" href="{{.RepoLink}}/grampus/onlineinfer">{{$.i18n.Tr "repo.modelarts.online_infer"}}</a> | |||
{{if MLOPS}} | |||
<a class="item" href="{{MlopsHost}}/AIStudio/mlops/deploy-online/edge-inference?reponame={{.Repository.Name}}&repoId={{.Repository.ID}}" target="_blank"> | |||
在线推理1 | |||
</a> | |||
<a class="item" href="{{MlopsHost}}/AIStudio/mlops/pipeline/list?reponame={{.Repository.Name}}&repoId={{.Repository.ID}}" target="_blank"> | |||
流水线 | |||
</a> | |||
{{end}} | |||
</div> | |||
</div> | |||
<div class="column right aligned"> | |||
<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;"> | |||
{{svg "octicon-server" 16}} | |||
<div class="default text" style="color: rgba(0,0,0,.87);"></div> | |||
<i class="dropdown icon"></i> | |||
<div class="menu"> | |||
<div class="item" data-value="all">{{$.i18n.Tr "repo.gpu_type_all"}}</div> | |||
<div class="item" data-value="CPU/GPU">CPU/GPU</div> | |||
<div class="item" data-value="NPU">NPU</div> | |||
</div> | |||
</div> | |||
{{if .Permission.CanWrite $.UnitTypeCloudBrain}} | |||
<a class="ui green button" href="{{.RepoLink}}/cloudbrain/inference-job/create">{{$.i18n.Tr "repo.modelarts.train_job.new_infer"}}</a> | |||
{{else}} | |||
<a class="ui disabled button" >{{$.i18n.Tr "repo.modelarts.train_job.new_infer"}}</a> | |||
{{end}} | |||
</div> | |||
</div> | |||
{{if eq 0 (len .Tasks)}} | |||
<div class="ui placeholder segment bgtask-none"> | |||
<div class="ui icon header bgtask-header-pic"></div> | |||
<div class="bgtask-content-header">{{$.i18n.Tr "repo.inference_job_not_created"}}</div> | |||
<div class="bgtask-content"> | |||
{{if $.RepoIsEmpty}} | |||
<div class="bgtask-content-txt">{{$.i18n.Tr "repo.repo_not_initialized" .RepoLink | Safe}}</div> | |||
{{end}} | |||
{{if eq 0 $.MODEL_COUNT}} | |||
<div class="bgtask-content-txt">{{$.i18n.Tr "repo.model_not_exist" .RepoLink .RepoLink | Safe}}</div> | |||
{{end}} | |||
<div class="bgtask-content-txt">{{$.i18n.Tr "repo.dataset_desc"}}</div> | |||
<div class="bgtask-content-txt">{{$.i18n.Tr "repo.platform_instructions" "https://openi.pcl.ac.cn/docs/index.html#/cloudbrain/infer/inference-job" | Safe}}</div> | |||
</div> | |||
</div> | |||
{{else}} | |||
<!-- 中下列表展示区 --> | |||
<div class="ui grid"> | |||
<div class="row"> | |||
<div class="ui sixteen wide column"> | |||
<!-- 任务展示 --> | |||
<div class="dataset list"> | |||
<!-- 表头 --> | |||
<div class="ui grid stackable" style="background: #f0f0f0;;"> | |||
<div class="row"> | |||
<div class="three wide column padding0" style="width: 17% !important;"> | |||
<span style="margin:0 6px">{{$.i18n.Tr "repo.cloudbrain_task"}}</span> | |||
</div> | |||
<div class="three wide column text center padding0" style="width: 17% !important;"> | |||
<span style="margin:0 6px">{{$.i18n.Tr "repo.modelarts.infer_job.model_version"}}</span> | |||
</div> | |||
<div class="two wide column text center padding0" style="width: 10.5% !important;"> | |||
<span>{{$.i18n.Tr "repo.modelarts.status"}}</span> | |||
</div> | |||
<div class="two wide column text center padding0" style="width: 10.5% !important;"> | |||
<span>{{$.i18n.Tr "repo.modelarts.createtime"}}</span> | |||
</div> | |||
<div class="two wide column text center padding0" style="width: 10.5% !important;"> | |||
<span>{{$.i18n.Tr "repo.cloudbrain_status_runtime"}}</span> | |||
</div> | |||
<div class="two wide column text center padding0" style="width: 10.5% !important;"> | |||
<span>{{$.i18n.Tr "repo.modelarts.computing_resources"}}</span> | |||
</div> | |||
<div class="one wide column text center padding0" style="width: 6% !important;"> | |||
<span>{{$.i18n.Tr "repo.cloudbrain_creator"}}</span> | |||
</div> | |||
<div class="three wide column text center padding0" style="width: 18% !important;"> | |||
<span>{{$.i18n.Tr "repo.cloudbrain_operate"}}</span> | |||
</div> | |||
</div> | |||
</div> | |||
{{range .Tasks}} | |||
<div class="ui grid stackable item"> | |||
<div class="row"> | |||
<!-- 任务名 --> | |||
<div class="three wide column padding0" style="width: 17% !important;"> | |||
<a class="title" href="/{{$.RepoRelPath}}/{{if eq .Cloudbrain.Type 0 }}cloudbrain{{else}}modelarts{{end}}/inference-job/{{.JobID}}" title="{{.DisplayJobName}}" style="font-size: 14px;"> | |||
<span class="fitted" style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> | |||
</a> | |||
</div> | |||
<!-- 模型版本 --> | |||
<!-- href="{{$.RepoLink}}/modelmanage/model_readme_tmpl?name={{.ModelName}}" --> | |||
<div class="three wide column text center padding0" style="display: flex;width: 17% !important;"> | |||
<a id="{{.JobName}}" class="goto_modelmanage nowrap" title="{{.ModelName}}" href="javascript:void(0);" | |||
data-variation="inverted" | |||
data-position="top center" | |||
data-content="{{$.i18n.Tr "repo.modelarts.infer_job.model_cant_see"}}" | |||
data-jobname="{{.JobName}}" | |||
data-modelid="{{.ModelId}}" | |||
data-modelname="{{.ModelName}}" | |||
data-version="{{.ModelVersion}}" | |||
data-repopath="{{$.RepoLink}}" | |||
data-modelrepoownername="{{.ModelRepoOwnerName}}" | |||
data-modelreponame="{{.ModelRepoName}}" | |||
> | |||
{{.ModelName}} </a> <span style="font-size: 12px;">{{.ModelVersion}}</span> | |||
</div> | |||
<!-- 任务状态 --> | |||
<div class="two wide column text center padding0" style="width: 10.5% !important;"> | |||
<span class="job-status" id="{{.JobID}}" data-repopath="{{$.RepoRelPath}}/{{if eq .Cloudbrain.Type 0 }}cloudbrain{{else}}modelarts{{end}}/inference-job" data-jobid="{{.JobID}}" data-version="{{.VersionName}}"> | |||
<span><i id="{{.JobID}}-icon" style="vertical-align: middle;" class="{{.Status}}"></i><span id="{{.JobID}}-text" style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span> | |||
</span> | |||
</div> | |||
<!-- 任务创建时间 --> | |||
<div class="two wide column text center padding0" style="width: 10.5% !important;"> | |||
<span style="font-size: 12px;" class="">{{TimeSinceUnix .Cloudbrain.CreatedUnix $.Lang}}</span> | |||
</div> | |||
<!-- 任务运行时间 --> | |||
<div class="two wide column text center padding0" style="width: 10.5% !important;"> | |||
<span style="font-size: 12px;" id="duration-{{.JobID}}">{{.TrainJobDuration}}</span> | |||
</div> | |||
<!-- 计算资源 --> | |||
<div class="two wide column text center padding0" style="width: 10.5% !important;"> | |||
<span style="font-size: 12px;">{{.ComputeResource}}</span> | |||
</div> | |||
<!-- 创建者 --> | |||
<div class="one wide column text center padding0" style="width: 6% !important;"> | |||
{{if .User.Name}} | |||
<a href="{{AppSubUrl}}/{{.User.Name}}" title="{{.User.Name}}"><img class="ui avatar image" src="{{.User.RelAvatarLink}}"></a> | |||
{{else}} | |||
<a title="Ghost"><img class="ui avatar image" src="{{AppSubUrl}}/user/avatar/Ghost/-1"></a> | |||
{{end}} | |||
</div> | |||
<div class="three wide column text center padding0" style="width: 18% !important;"> | |||
<!-- 停止任务 --> | |||
{{if eq .Cloudbrain.Type 0 }} | |||
<div class="ui compact buttons"> | |||
<form id="stopForm-{{.JobID}}" style="margin-left:-1px;"> | |||
{{$.CsrfTokenHtml}} | |||
{{if .CanDel}} | |||
<a id="ai-stop-{{.JobID}}" | |||
class='ui basic ai_stop {{if eq .Status "STOPPED" "FAILED" "START_FAILED" "STOPPING" "CREATING" "STARTING" "SUCCEEDED"}}disabled {{else}}blue {{end}}button' | |||
data-repopath="{{$.RepoLink}}/cloudbrain/{{.Cloudbrain.ID}}/stop" | |||
data-jobid="{{.JobID}}"> | |||
{{$.i18n.Tr "repo.stop"}} | |||
</a> | |||
{{else}} | |||
<a class="ui basic disabled button"> | |||
{{$.i18n.Tr "repo.stop"}} | |||
</a> | |||
{{end}} | |||
</form> | |||
</div> | |||
{{else}} | |||
<div class="ui compact buttons"> | |||
{{$.CsrfTokenHtml}} | |||
{{if .CanDel}} | |||
<a style="padding: 0.5rem 1rem;" id="ai-stop-{{.JobID}}" class="ui basic ai_stop_version {{if eq .Status "KILLED" "FAILED" "START_FAILED" "KILLING" "COMPLETED"}}disabled {{else}} blue {{end}}button" data-repopath="{{$.RepoRelPath}}/modelarts/inference-job" data-jobid="{{.JobID}}" data-version="{{.VersionName}}"> | |||
{{$.i18n.Tr "repo.stop"}} | |||
</a> | |||
{{else}} | |||
<a style="padding: 0.5rem 1rem;" id="ai-stop-{{.JobID}}" class="ui basic disabled button"> | |||
{{$.i18n.Tr "repo.stop"}} | |||
</a> | |||
{{end}} | |||
</div> | |||
{{end}} | |||
<!-- 下载 --> | |||
<div class="ui compact buttons"> | |||
{{$.CsrfTokenHtml}} | |||
{{if .CanModify}} | |||
<a style="padding: 0.5rem 1rem;margin-left:0.2rem" id="model-download-{{.JobID}}" href="{{$.RepoLink}}/{{if eq .Cloudbrain.Type 0 }}cloudbrain{{else}}modelarts{{end}}/inference-job/{{.JobID}}/downloadall?version_name={{.VersionName}}" class="ui basic blue button" style="border-radius: .28571429rem;"> | |||
{{$.i18n.Tr "repo.model_download"}} | |||
</a> | |||
{{else}} | |||
<a style="padding: 0.5rem 1rem;margin-left:0.2rem" class="ui basic button disabled" style="border-radius: .28571429rem;"> | |||
{{$.i18n.Tr "repo.model_download"}} | |||
</a> | |||
{{end}} | |||
</div> | |||
<!-- 删除任务 --> | |||
<div class="ui compact buttons"> | |||
{{$.CsrfTokenHtml}} | |||
{{if .CanDel}} | |||
{{if eq .Cloudbrain.Type 0 }} | |||
<a style="padding: 0.5rem 1rem;margin-left:0.2rem" id="ai-delete-{{.JobID}}" class="ui basic ai_delete blue button" data-repopath="{{$.RepoRelPath}}/cloudbrain/inference-job/{{.JobID}}/del" data-version="V0001" style="border-radius: .28571429rem;"> | |||
{{$.i18n.Tr "repo.delete"}} | |||
</a> | |||
{{else}} | |||
<a style="padding: 0.5rem 1rem;margin-left:0.2rem" id="ai-delete-{{.JobID}}" class="ui basic ai_delete blue button" data-repopath="{{$.RepoRelPath}}/modelarts/inference-job/{{.JobID}}/del_version" data-version="{{.VersionName}}" style="border-radius: .28571429rem;"> | |||
{{$.i18n.Tr "repo.delete"}} | |||
</a> | |||
{{end}} | |||
{{else}} | |||
<a style="padding: 0.5rem 1rem;margin-left:0.2rem" class="ui basic button disabled" style="border-radius: .28571429rem;"> | |||
{{$.i18n.Tr "repo.delete"}} | |||
</a> | |||
{{end}} | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
{{end}} | |||
<div id="app" style="margin-top: 2rem;"> | |||
<div class="center"> | |||
<el-pagination | |||
background | |||
@current-change="handleCurrentChange" | |||
:current-page="page" | |||
:page-sizes="[10]" | |||
:page-size="10" | |||
layout="total, sizes, prev, pager, next, jumper" | |||
:total="{{.Page.Paginater.Total}}"> | |||
</el-pagination> | |||
</div> | |||
</div> | |||
</div> | |||
{{template "custom/save_most_time" .}} | |||
</div> | |||
</div> | |||
</div> | |||
{{end}} | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<!-- 确认模态框 --> | |||
<div id="deletemodel"> | |||
<div class="ui basic modal"> | |||
<div class="ui icon header"> | |||
<i class="trash icon"></i> {{.i18n.Tr "cloudbrain.delete_task"}} | |||
</div> | |||
<div class="content"> | |||
<p>{{.i18n.Tr "cloudbrain.task_delete_confirm"}}</p> | |||
</div> | |||
<div class="actions"> | |||
<div class="ui red basic inverted cancel button"> | |||
<i class="remove icon"></i> {{.i18n.Tr "cloudbrain.operate_cancel"}} | |||
</div> | |||
<div class="ui green basic inverted ok button"> | |||
<i class="checkmark icon"></i> {{.i18n.Tr "cloudbrain.operate_confirm"}} | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div id="__vue-root"></div> | |||
</div> | |||
<script src="{{StaticUrlPrefix}}/js/vp-cloudbrain-list.js?v={{MD5 AppVer}}"></script> | |||
{{template "base/footer" .}} | |||
<script> | |||
let url = {{$.RepoLink}}; | |||
let all = {{$.i18n.Tr "repo.gpu_type_all"}} | |||
$(document).ready(function(){ | |||
const params = new URLSearchParams(location.search) | |||
if(!location.search){ | |||
$('.default.text').text(all) | |||
}else{ | |||
if(!params.has('listType') || params.get('listType')=='all'){ | |||
$('.default.text').text(all) | |||
} | |||
else{ | |||
$('.default.text').text(params.get('listType')) | |||
} | |||
} | |||
$('.ui.selection.dropdown').dropdown({ | |||
onChange:function(value){ | |||
location.href = `${url}/modelarts/inference-job?listType=${value}` | |||
} | |||
}) | |||
}) | |||
</script> | |||
@@ -1,577 +1 @@ | |||
{{template "base/head" .}} | |||
<style> | |||
.title{ | |||
font-size: 16px !important; | |||
padding-left: 3rem !important; | |||
} | |||
.min_title{ | |||
font-size: 14px !important; | |||
margin-bottom: 2rem !important; | |||
} | |||
.width80{ | |||
width: 80.7% !important; | |||
} | |||
.width{ | |||
width:100% !important; | |||
} | |||
.width85 { | |||
width: 85% !important; | |||
margin-left: 10.5rem !important; | |||
align-items: center; | |||
} | |||
.width35{ | |||
width: 35.5% !important; | |||
} | |||
.width48{ | |||
width: 48.5% !important; | |||
} | |||
.nowrapx { | |||
white-space: nowrap !important; | |||
} | |||
</style> | |||
{{template "custom/global_mask" .}} | |||
<div class="repository"> | |||
{{template "repo/header" .}} | |||
<div class="ui container"> | |||
{{if eq .NotStopTaskCount 0}} | |||
{{template "base/alert" .}} | |||
{{end}} | |||
{{template "custom/alert_cb" .}} | |||
<div class="cloudbrain-type" style="display: none;" data-cloudbrain-type="1" data-repo-link="{{.RepoLink}}"></div> | |||
<h4 class="ui top attached header"> | |||
{{.i18n.Tr "repo.modelarts.train_job.new_infer"}} | |||
</h4> | |||
<div class="ui attached segment"> | |||
<!-- equal width --> | |||
<form id="form_id" class="ui form" action="{{.Link}}" method="post"> | |||
{{.CsrfTokenHtml}} | |||
<input type="hidden" name="action" value="update"> | |||
<input type="hidden" id="ai_engine_name" name="engine_names" value=""> | |||
<input type="hidden" id="ai_flaver_name" name="flaver_names" value=""> | |||
<input type="hidden" id="failed_train_url" value="{{$.train_url}}"> | |||
<input type="hidden" id="failed_model_name" value="{{$.model_name}}"> | |||
<input type="hidden" id="failed_model_version" value="{{$.model_version}}"> | |||
<input type="hidden" id="failed_ckpt_name" value="{{$.ckpt_name}}"> | |||
<input type="hidden" id="failed_train_url" value="{{$.train_url}}"> | |||
<input type="hidden" id="fail_dataset_name" value="{{$.dataset_name}}"> | |||
<input type="hidden" id="fail_dataset_uuid" value="{{$.attachment}}"> | |||
<h4 class="title ui header ">{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}:</h4> | |||
<div class="required min_title inline field"> | |||
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.compute_resource"}}</label> | |||
<div class="ui blue mini menu compact selectcloudbrain"> | |||
<a class="item" href="{{.RepoLink}}/cloudbrain/inference-job/create"> | |||
<svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" | |||
height="16"> | |||
<path fill="none" d="M0 0h24v24H0z" /> | |||
<path | |||
d="M3 2.992C3 2.444 3.445 2 3.993 2h16.014a1 1 0 0 1 .993.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 21.008V2.992zM19 11V4H5v7h14zm0 2H5v7h14v-7zM9 6h6v2H9V6zm0 9h6v2H9v-2z" /> | |||
</svg> | |||
CPU/GPU | |||
</a> | |||
<a class="active item" href="{{.RepoLink}}/modelarts/inference-job/create"> | |||
<svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" | |||
height="16"> | |||
<path fill="none" d="M0 0h24v24H0z" /> | |||
<path | |||
d="M3 2.992C3 2.444 3.445 2 3.993 2h16.014a1 1 0 0 1 .993.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 21.008V2.992zM19 11V4H5v7h14zm0 2H5v7h14v-7zM9 6h6v2H9V6zm0 9h6v2H9v-2z" /> | |||
</svg> | |||
Ascend NPU</a> | |||
</div> | |||
</div> | |||
<div class="min_title inline field" style="margin-top:-10px;"> | |||
<label class="label-fix-width" style="font-weight: normal;"></label> | |||
{{template "custom/task_wait_count" .}} | |||
<div style="display: flex;align-items: center;margin-left: 156px;margin-top: 0.5rem;"> | |||
<i class="ri-error-warning-line" style="color: #f2711c;margin-right: 0.5rem;"></i> | |||
<span style="color: #888;font-size: 12px;">{{.i18n.Tr "cloudbrain.infer_dataset_path_rule" | Safe}}</span> | |||
</div> | |||
</div> | |||
<div class="required min_title inline field"> | |||
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label> | |||
<input style="width: 60%;" name="display_job_name" id="display_job_name" placeholder={{.i18n.Tr "repo.modelarts.train_job.job_name"}} value="{{.display_job_name}}" onkeyup="this.value=this.value.replace(/[, ]/g,'')" tabindex="3" autofocus required maxlength="36"> | |||
<span class="tooltips" style="margin-left:11.5rem;display: block;">{{.i18n.Tr "repo.cloudbrain_jobname_err"}}</span> | |||
</div> | |||
<div class="min_title inline field"> | |||
<label class="label-fix-width" style="font-weight: normal;" for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}}</label> | |||
{{if .description}} | |||
<textarea style="width: 80%;" id="description" name="description" rows="3" maxlength="255" placeholder={{.i18n.Tr "repo.modelarts.train_job.new_place"}}>{{.description}}</textarea> | |||
{{else}} | |||
<textarea style="width: 80%;" id="description" name="description" rows="3" maxlength="255" placeholder={{.i18n.Tr "repo.modelarts.train_job.new_place"}} onchange="this.value=this.value.substring(0, 255)" onkeydown="this.value=this.value.substring(0, 255)" onkeyup="this.value=this.value.substring(0, 255)"></textarea> | |||
{{end}} | |||
</div> | |||
<div class="ui divider"></div> | |||
<h4 class="title ui header ">{{.i18n.Tr "repo.modelarts.train_job.parameter_setting"}}:</h4> | |||
<!-- 模型相关配置 --> | |||
<!-- | |||
<div class="required inline min_title fields" style="width: 94%;"> | |||
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.infer_job.select_model"}}</label> | |||
<div class="six wide field"> | |||
<div class="ui fluid search selection dropdown loading " id="select_model"> | |||
<input type="hidden" name="model_name" required> | |||
<div class="text"></div> | |||
<i class="dropdown icon"></i> | |||
<div class="menu" id="model_name"> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="three wide field"> | |||
<div class="ui fluid search selection dropdown" id="select_model_version"> | |||
<input type="hidden" name="train_url" required> | |||
<div class="text"></div> | |||
<i class="dropdown icon"></i> | |||
<div class="menu" id="model_name_version"> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="five wide field"> | |||
<div class="ui fluid search selection dropdown" id="select_model_checkpoint"> | |||
<input type="hidden" name="ckpt_name" required> | |||
<div class="text"></div> | |||
<i class="dropdown icon"></i> | |||
<div class="menu" id="model_checkpoint"> | |||
</div> | |||
</div> | |||
</div> | |||
<span > | |||
<i class="question circle icon" data-content="{{.i18n.Tr "cloudbrain.model_file_path_rule"}} {{.i18n.Tr "cloudbrain.model_file_postfix_rule"}}" data-position="top center" data-variation="inverted mini"></i> | |||
</span> | |||
</div> | |||
--> | |||
<div> | |||
<div class="select-multi-model" data-required="true" data-model-id="{{.model_id}}" data-model-name="{{.model_name}}" data-model-version="{{.model_version}}" data-multiple="true" | |||
data-pre-train-model-url="{{.pre_train_model_url}}" data-ckpt-name="{{.ckpt_name}}"></div> | |||
<div id="select-multi-model"></div> | |||
</div> | |||
<!-- AI引擎 --> | |||
<div class="required inline min_title fields" style="width: 92.5%;"> | |||
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.AI_driver"}}</label> | |||
<div class="field" style="flex: 1.5;"> | |||
<select class="ui dropdown width" id="trainjob_engines"> | |||
{{range .engines}} | |||
<option value="{{.Value}}">{{.Value}}</option> | |||
{{end}} | |||
</select> | |||
</div> | |||
<div class="field" style="flex: 2;" id="engine_name"> | |||
<select class="ui dropdown width" id="trainjob_engine_versions" name="engine_id"> | |||
{{if .engine_id}} | |||
{{range .engine_versions}} | |||
{{if eq $.engine_id .ID}} | |||
<option value="{{.ID}}">{{.Value}}</option> | |||
{{end}} | |||
{{end}} | |||
{{range .engine_versions}} | |||
{{if ne $.engine_id .ID}} | |||
<option value="{{.ID}}">{{.Value}}</option> | |||
{{end}} | |||
{{end}} | |||
{{else}} | |||
{{range .engine_versions}} | |||
<option value="{{.ID}}">{{.Value}}</option> | |||
{{end}} | |||
{{end}} | |||
</select> | |||
</div> | |||
</div> | |||
<!-- 代码分支 --> | |||
<div class="required min_title inline field"> | |||
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.code_version"}}</label> | |||
<select class="ui dropdown width48" id="code_version" name="branch_name"> | |||
{{if .branch_name}} | |||
<option name="branch_name" value="{{.branch_name}}">{{.branch_name}}</option> | |||
{{range $k, $v :=.Branches}} | |||
{{ if ne $v $.branch_name }} | |||
<option name="branch_name" value="{{$v}}">{{$v}}</option> | |||
{{end}} | |||
{{end}} | |||
{{else}} | |||
<option name="branch_name" value="{{.branchName}}">{{.branchName}}</option> | |||
{{range $k, $v :=.Branches}} | |||
{{ if ne $v $.branchName }} | |||
<option name="branch_name" value="{{$v}}">{{$v}}</option> | |||
{{end}} | |||
{{end}} | |||
{{end}} | |||
</select> | |||
</div> | |||
<!-- 数据集 --> | |||
<div id="select-multi-dataset"> | |||
</div> | |||
<span class="tooltips" style="margin-left: 11.5rem;margin-bottom: 1rem;"></span> | |||
<div class="inline min_title field required"> | |||
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.start_file"}}</label> | |||
{{if .bootFile}} | |||
<input style="width: 48.5%;" name="boot_file" id="trainjob_boot_file" value="{{.bootFile}}" tabindex="3" autofocus required maxlength="255" > | |||
{{else}} | |||
<input style="width: 48.5%;" name="boot_file" id="trainjob_boot_file" value="" tabindex="3" autofocus required maxlength="255" > | |||
{{end}} | |||
<span > | |||
<i class="question circle icon" data-content={{.i18n.Tr "repo.modelarts.infer_job.boot_file_helper"}} data-position="top center" data-variation="inverted mini"></i> | |||
</span> | |||
<a href="https://openi.pcl.ac.cn/OpenIOSSG/MINIST_Example" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||
</div> | |||
<!-- 运行参数 --> | |||
<div class="inline min_title field"> | |||
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.run_parameter"}}</label> | |||
<span id="add_run_para" style="cursor:pointer;color: rgba(3, 102, 214, 100);font-size: 14px;line-height: 26px;font-family: SourceHanSansSC-medium;"><i class="plus square outline icon"></i>{{.i18n.Tr "repo.modelarts.train_job.add_run_parameter"}}</span> | |||
<input id="store_run_para" type="hidden" name="run_para_list"> | |||
<div class="dynamic field" style="margin-top: 1rem;"> | |||
{{if ne 0 (len .params)}} | |||
{{range $k ,$v := .params}} | |||
<div class="two fields width85" id="para{{$k}}"> | |||
<div class="field"> | |||
<input type="text" name="shipping_first-name" value={{$v.Label}} required> | |||
</div> | |||
<div class="field"> | |||
<input type="text" name="shipping_last-name" value={{$v.Value}} required> | |||
</div> | |||
<span> | |||
<i class="trash icon"></i> | |||
</span> | |||
</div> | |||
{{end}} | |||
{{end}} | |||
</div> | |||
</div> | |||
<div class="required field " style="display: none;"> | |||
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.resource_pool"}}</label> | |||
<select class="ui dropdown" id="trainjob_resource_pool" style='width:385px' name="pool_id"> | |||
{{range .resource_pools}} | |||
<option value="{{.ID}}">{{.Value}}</option> | |||
{{end}} | |||
</select> | |||
</div> | |||
<!-- 规格 --> | |||
<!--<div class="required min_title inline field" id="flaver_name"> | |||
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.standard"}}</label> | |||
<select class="ui dropdown width80" id="trainjob-flavor" name="flavor"> | |||
{{if .flavor}} | |||
{{range .flavor_infos}} | |||
{{if eq $.flavor .Code}} | |||
<option value="{{.Code}}">{{.Value}}</option> | |||
{{end}} | |||
{{end}} | |||
{{range .flavor_infos}} | |||
{{if ne $.flavor .Code}} | |||
<option value="{{.Code}}">{{.Value}}</option> | |||
{{end}} | |||
{{end}} | |||
{{else}} | |||
{{range .flavor_infos}} | |||
<option name="flavor" value="{{.Code}}">{{.Value}}</option> | |||
{{end}} | |||
{{end}} | |||
</select> | |||
</div>--> | |||
<div class="required min_title inline field" id="flaver_name"> | |||
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.standard"}}</label> | |||
<select class="ui dropdown width48" id="__specs__" name="spec_id" ovalue="{{.spec_id}}" {{if .CloudBrainPaySwitch}}blance="{{.PointAccount.Balance}}"{{end}}></select> | |||
<span><i class="question circle icon link" data-content="{{.i18n.Tr "repo.modelarts.train_job.resource_helper"}}" data-position="right center" data-variation="mini"></i></span> | |||
<a href="https://openi.pcl.ac.cn/docs/index.html#/quickstart/resources" target="_blank">{{.i18n.Tr "custom.resource_description"}}</a> | |||
{{if .CloudBrainPaySwitch}} | |||
<div class="cloudbrain_resource_spec_blance_tip width48" style="padding:0 5px;margin:6px 0;margin-left:155px;font-size:12px;"> | |||
<span>{{$.i18n.Tr "points.balance_of_points"}}<span style="color:red;margin: 0 3px">{{.PointAccount.Balance}}</span>{{$.i18n.Tr "points.points"}}</span><span>{{$.i18n.Tr "points.expected_time"}}<span style="color:red;margin: 0 3px" class="can-use-time"></span>{{$.i18n.Tr "points.hours"}}</span> | |||
<span style="float:right;"> | |||
<i class="question circle icon link"></i> | |||
<a href="{{AppSubUrl}}/reward/point/rule" target="_blank">{{$.i18n.Tr "points.points_acquisition_instructions"}}</a> | |||
</span> | |||
</div> | |||
{{end}} | |||
</div> | |||
<!-- 计算节点 --> | |||
<div class="inline required min_title field"> | |||
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.amount_of_compute_node"}}</label> | |||
<div class="ui labeled input" style="width: 5%;"> | |||
<input style="border-radius: 0;text-align: center;" name="work_server_number" id="trainjob_work_server_num" tabindex="3" autofocus required maxlength="255" value="1" readonly> | |||
</div> | |||
</div> | |||
<!-- 表单操作 --> | |||
<div class="inline min_title field"> | |||
<label class="label-fix-width" style="font-weight: normal;"></label> | |||
<button class="ui create_train_job green button {{if eq .NotStopTaskCount 1}}disabled{{end}}"> | |||
{{.i18n.Tr "repo.cloudbrain.new"}} | |||
</button> | |||
<a class="ui button" href="/">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a> | |||
</div> | |||
<!-- 模态框 --> | |||
</form> | |||
</div> | |||
</div> | |||
</div> | |||
{{template "base/footer" .}} | |||
<script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script> | |||
<script> | |||
let form = document.getElementById('form_id'); | |||
let createFlag = false | |||
form.onsubmit = function (e) { | |||
if(createFlag) return false | |||
createFlag = true | |||
} | |||
const RepoLink = {{.RepoLink}} | |||
const url_href = window.location.pathname.split('create')[0] | |||
let nameMap,nameList | |||
$(".ui.button").attr('href',url_href) | |||
// 获取模型列表和模型名称对应的模型版本 | |||
$(document).ready(function(){ | |||
return; // 用模型选择组件了 | |||
modelVersion() | |||
modelCkpt() | |||
$.get(`${RepoLink}/modelmanage/query_model_for_predict?type=1`, (data) => { | |||
nameMap = data.nameMap | |||
nameList = data.nameList | |||
let faildModelName = document.getElementById('failed_model_name').value | |||
let html = '' | |||
nameList.forEach(element => { | |||
html += `<div class="item" data-value="${element}">${element}</div>` | |||
}); | |||
if(nameList.length!==0){ | |||
$('#model_name').append(html) | |||
if(faildModelName){ | |||
$("#select_model").dropdown('set text',faildModelName) | |||
$("#select_model").dropdown('set value',faildModelName) | |||
}else{ | |||
$("#select_model").dropdown('set text',nameList[0]) | |||
$("#select_model").dropdown('set value',nameList[0],nameList[0]) | |||
} | |||
} | |||
$('#select_model').removeClass("loading") | |||
}) | |||
}) | |||
// 根据选中的模型名称获取相应的模型版本 | |||
function modelVersion(){ | |||
let faildModelVersion = $('#failed_model_version').val() | |||
let faildTrainUrl = $('#failed_train_url').val() | |||
$('#select_model').dropdown({ | |||
onChange: function(value, text, $selectedItem) { | |||
$("#select_model_version").addClass("loading") | |||
$('#model_name_version').empty() | |||
let html = '' | |||
nameMap[value].forEach(element => { | |||
html += `<div class="item" data-label="${element.label}" data-id="${element.id}" data-value="${element.path}">${element.version}</div>` | |||
}); | |||
$('#model_name_version').append(html) | |||
$("#select_model_version").removeClass("loading") | |||
const initVersionText = $('#model_name_version div.item:first-child').text() | |||
const initVersionValue = $('#model_name_version div.item:first-child').data('value') | |||
if(faildModelVersion&&faildTrainUrl){ | |||
$("#select_model_version").dropdown('set text',faildModelVersion) | |||
$("#select_model_version").dropdown('set value',faildTrainUrl,faildModelVersion,$('#model_name_version div.item:first-child')) | |||
}else{ | |||
$("#select_model_version").dropdown('set text',initVersionText) | |||
$("#select_model_version").dropdown('set value',initVersionValue,initVersionText,$('#model_name_version div.item:first-child')) | |||
} | |||
} | |||
}) | |||
} | |||
// 根据选中的模型版本获取相应的模型权重文件 | |||
function modelCkpt(){ | |||
let faildCkptName = $('#failed_ckpt_name').val() | |||
$('#select_model_version').dropdown({ | |||
onChange: function(value, text, $selectedItem) { | |||
const dataID = $selectedItem[0].getAttribute("data-id") | |||
const label = $selectedItem[0].getAttribute("data-label") | |||
$("#select_model_checkpoint").addClass("loading") | |||
$("#model_checkpoint").empty() | |||
let html = '' | |||
loadCheckpointList(dataID).then((res)=>{ | |||
res.forEach(element => { | |||
const ckptSuffix = element.FileName.split(".") | |||
const loadCheckpointFile = ['ckpt','pb','h5','json','pkl','pth','t7','pdparams','onnx','pbtxt','keras','mlmodel','cfg','pt'] | |||
if(!element.IsDir && loadCheckpointFile.includes(ckptSuffix[ckptSuffix.length-1])){ | |||
html += `<div class="item" data-value="${element.FileName}">${element.FileName}</div>` | |||
} | |||
}) | |||
$('#model_checkpoint').append(html) | |||
$("#select_model_checkpoint").removeClass("loading") | |||
const initVersionText = $('#model_checkpoint div.item:first-child').text() | |||
const initVersionValue = $('#model_checkpoint div.item:first-child').data('value') | |||
if(faildCkptName){ | |||
$("#select_model_checkpoint").dropdown('set text',faildCkptName) | |||
$("#select_model_checkpoint").dropdown('set value',faildCkptName,faildCkptName,$('#model_name_version div.item:first-child')) | |||
}else{ | |||
$("#select_model_checkpoint").dropdown('set text',initVersionText) | |||
$("#select_model_checkpoint").dropdown('set value',initVersionValue,initVersionText,$('#model_name_version div.item:first-child')) | |||
} | |||
}) | |||
$("input#ai_model_version").val(text) | |||
$("input#ai_model_label").val(label) | |||
} | |||
}) | |||
} | |||
function loadCheckpointList(value){ | |||
return new Promise((resolve,reject)=>{ | |||
$.get(`${RepoLink}/modelmanage/query_modelfile_for_predict`,{id:value}, (data) => { | |||
resolve(data) | |||
}) | |||
}) | |||
} | |||
$('.question.circle.icon').hover(function(){ | |||
$(this).popup('show') | |||
}); | |||
// 参数增加、删除、修改、保存 | |||
function Add_parameter(i){ | |||
let placeholder_value='{{.i18n.Tr "repo.modelarts.train_job.parameter_value"}}' | |||
let placeholder_name='{{.i18n.Tr "repo.modelarts.train_job.parameter_name"}}' | |||
value = '<div class="two fields width85" id= "para'+ i +'">' + | |||
'<div class="field">' + | |||
'<input type="text" name="shipping_first-name" required placeholder="' + placeholder_name+ '">' + | |||
'</div> ' + | |||
'<div class="field"> ' + | |||
'<input type="text" name="shipping_last-name" required placeholder="' + placeholder_value + '">' + | |||
'</div>'+ | |||
'<span>' + | |||
'<i class="trash icon">' + | |||
'</i>' + | |||
'</span>' + | |||
'</div>' | |||
$(".dynamic.field").append(value) | |||
} | |||
$('#add_run_para').click(function(){ | |||
var len = $(".dynamic.field .two.fields").length | |||
Add_parameter(len) | |||
}); | |||
$(".dynamic.field").on("click",".trash.icon", function() { | |||
var index = $(this).parent().parent().index() | |||
$(this).parent().parent().remove() | |||
var len = $(".dynamic.field .two.fields").length | |||
$(".dynamic.field .two.fields").each(function(){ | |||
var cur_index = $(this).index() | |||
$(this).attr('id', 'para' + cur_index) | |||
}) | |||
}); | |||
function send_run_para(){ | |||
var run_parameters = [] | |||
var msg = {} | |||
$(".dynamic.field .two.fields").each(function(){ | |||
var para_name = $(this).find('input[name=shipping_first-name]').val() | |||
var para_value = $(this).find('input[name=shipping_last-name]').val() | |||
run_parameters.push({"label": para_name, "value": para_value}) | |||
}) | |||
msg["parameter"] = run_parameters | |||
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) | |||
} | |||
var isValidate = false; | |||
function validate(){ | |||
$('.ui.form') | |||
.form({ | |||
on: 'blur', | |||
fields: { | |||
boot_file: { | |||
identifier : 'boot_file', | |||
rules: [ | |||
{ | |||
type: 'regExp[/.+\.py$/g]', | |||
} | |||
] | |||
}, | |||
display_job_name:{ | |||
identifier : 'display_job_name', | |||
rules: [ | |||
{ | |||
type: 'regExp[/^[a-z0-9][a-z0-9-_]{1,34}[a-z0-9-]$/]', | |||
} | |||
] | |||
}, | |||
attachment:{ | |||
identifier : 'attachment', | |||
rules: [ | |||
{ | |||
type: 'empty', | |||
} | |||
] | |||
}, | |||
model_name:{ | |||
identifier : 'model_name', | |||
rules: [ | |||
{ | |||
type: 'empty', | |||
} | |||
] | |||
}, | |||
train_url:{ | |||
identifier : 'train_url', | |||
rules: [ | |||
{ | |||
type: 'empty', | |||
} | |||
] | |||
}, | |||
ckpt_name:{ | |||
identifier : 'ckpt_name', | |||
rules: [ | |||
{ | |||
type: 'empty', | |||
} | |||
] | |||
}, | |||
spec_id: { | |||
identifier: 'spec_id', | |||
rules: [{ type: 'empty' }] | |||
} | |||
}, | |||
onSuccess: function(){ | |||
document.getElementById("mask").style.display = "block" | |||
isValidate = true; | |||
}, | |||
onFailure: function(e){ | |||
isValidate = false; | |||
return false; | |||
} | |||
}) | |||
} | |||
document.onreadystatechange = function() { | |||
if (document.readyState === "complete") { | |||
document.getElementById("mask").style.display = "none" | |||
} | |||
} | |||
validate(); | |||
$('.ui.create_train_job.green.button').click(function(e) { | |||
send_run_para() | |||
get_name() | |||
validate(); | |||
}) | |||
;(function() { | |||
var SPECS = {{ .Specs }}; | |||
var showPoint = {{ .CloudBrainPaySwitch }}; | |||
window.renderSpecsSelect($('#__specs__'), SPECS, showPoint, { | |||
gpu_memory: {{$.i18n.Tr "cloudbrain.gpu_memory"}}, | |||
free: {{$.i18n.Tr "cloudbrain.free"}}, | |||
point_hr: {{$.i18n.Tr "cloudbrain.point_hr"}}, | |||
memory: {{$.i18n.Tr "cloudbrain.memory"}}, | |||
shared_memory: {{$.i18n.Tr "cloudbrain.shared_memory"}}, | |||
no_use_resource:{{$.i18n.Tr "cloudbrain.no_use_resource"}}, | |||
}); | |||
})(); | |||
</script> | |||
{{ template "repo/cloudbrain/cloudbraincreate" .}} |
@@ -1,435 +1 @@ | |||
{{template "base/head" .}} | |||
<style> | |||
.model_file_bread{ | |||
margin-bottom: -0.5rem !important; | |||
padding-left: 1rem; | |||
padding-top: 0.5rem ; | |||
} | |||
</style> | |||
<div class="repository"> | |||
{{template "repo/header" .}} | |||
<div class="ui container"> | |||
<h4 class="ui header" id="vertical-segment"> | |||
<div class="ui breadcrumb"> | |||
<a class="section" href="{{.RepoLink}}/debugjob?debugListType=all"> | |||
{{.i18n.Tr "repo.cloudbrain"}} | |||
</a> | |||
<div class="divider"> / </div> | |||
<a class="section" href="{{$.RepoLink}}/modelarts/inference-job"> | |||
{{$.i18n.Tr "repo.modelarts.infer_job"}} | |||
</a> | |||
<div class="divider"> / </div> | |||
<div class="active section">{{.displayJobName}}</div> | |||
</div> | |||
</h4> | |||
{{with .task}} | |||
<div class="ui accordion border-according" id="accordion{{.VersionName}}" | |||
data-repopath="{{$.RepoRelPath}}/modelarts/inference-job" data-jobid="{{.JobID}}" data-version="{{.VersionName}}"> | |||
<input type="hidden" id="jobId_input" name="jobId_input" value="{{.JobID}}"> | |||
<div class="active title padding0"> | |||
<div class="according-panel-heading"> | |||
<div class="accordion-panel-title"> | |||
<i class="dropdown icon"></i> | |||
<span class="accordion-panel-title-content"> | |||
<span> | |||
<div class="ac-display-inblock title_text acc-margin-bottom"> | |||
<span class="cti-mgRight-sm">{{TimeSinceUnix1 .CreatedUnix}}</span> | |||
<span class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.status"}}: | |||
<span id="{{.VersionName}}-status-span"><i id="icon" | |||
style="vertical-align: middle;" class="{{.Status}}"></i><span id="text" | |||
style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span> | |||
</span> | |||
<span | |||
class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}:</span> | |||
<span class="cti-mgRight-sm uc-accordionTitle-black" | |||
id="{{.VersionName}}-duration-span">{{.TrainJobDuration}}</span> | |||
<span class="refresh-status" data-tooltip="刷新" style="cursor: pointer;" data-inverted="" data-version="{{.VersionName}}"><i | |||
class="redo icon redo-color"></i></span> | |||
</div> | |||
</span> | |||
</span> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="active content"> | |||
<div class="content-pad"> | |||
<div class="ui pointing secondary menu" style="border-bottom: 1px solid rgba(34,36,38,.15);"> | |||
<a class="active item" data-tab="first">{{$.i18n.Tr "repo.modelarts.train_job.config"}}</a> | |||
<a class="item detail-log-tab" data-tab="second" data-version="{{.VersionName}}">{{$.i18n.Tr "repo.modelarts.log"}}</a> | |||
<a class="item load-model-file" data-tab="third" data-download-flag="{{$.canDownload}}" data-path="{{$.RepoLink}}/modelarts/inference-job/{{.JobID}}/result_list" data-version="{{.VersionName}}" data-parents="" data-filename="" data-init="init" >{{$.i18n.Tr "repo.model_download"}}</a> | |||
</div> | |||
<div class="ui tab active" data-tab="first"> | |||
<div style="padding-top: 10px;"> | |||
<div class="tab_2_content"> | |||
<div class="ac-grid ac-grid-col2"> | |||
<div class="ac-grid-col"> | |||
<table class="ti-form"> | |||
<tbody class="ti-text-form"> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.cloudbrain_task"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w"> | |||
{{.DisplayJobName}} | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.status"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w" id="{{.VersionName}}-status"> | |||
{{.Status}} | |||
</div> | |||
</td> | |||
</tr> | |||
<!-- <tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.run_version"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w"> | |||
{{.VersionName}} | |||
</div> | |||
</td> | |||
</tr> --> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.train_job.start_time"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w"> | |||
<span style="font-size: 12px;" id="{{.VersionName}}-startTime"> | |||
{{if not (eq .StartTime 0)}} | |||
{{TimeSinceUnix1 .StartTime}} | |||
{{else}} | |||
-- | |||
{{end}} | |||
</span> | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w" id="{{.VersionName}}-duration"> | |||
{{.TrainJobDuration}} | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.train_job.AI_driver"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w"> | |||
{{.EngineName}} | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.model.manage.description"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w" id="{{.VersionName}}-desc" style="width: 380px;"> | |||
{{if .Description}} | |||
<span title="{{.Description}}">{{.Description}}</span> | |||
{{else}} | |||
<span>--</span> | |||
{{end}} | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.cloudbrain_creator"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w" id="{{.VersionName}}-creator"> | |||
{{$.userName}} | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.train_job.compute_node"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w"> | |||
{{.WorkServerNumber}} | |||
</div> | |||
</td> | |||
</tr> | |||
</tbody> | |||
</table> | |||
</div> | |||
<div class="ac-grid-col"> | |||
<table class="ti-form"> | |||
<tbody class="ti-text-form"> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.infer_job_model"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w"> | |||
<span>{{.ModelName}}</span> | |||
<span style="color: #8a8e99">{{$.i18n.Tr "repo.modelarts.version"}}:</span><span>{{.ModelVersion}}</span> | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.infer_job_model_file"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w"> | |||
{{.CkptName}} | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.model_label"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w" id="{{.VersionName}}-labels"> | |||
{{if .LabelName}} | |||
{{range $.labelName}} | |||
<a class="ui label" title="{{.}}">{{.}}</a> | |||
{{end}} | |||
{{else}} | |||
<span>--</span> | |||
{{end}} | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.code_version"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w"> | |||
{{.BranchName}} | |||
<span style="margin-left:1rem" class="ui label">{{SubStr .CommitID 0 10}}</span> | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.train_job.start_file"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w"> | |||
{{.BootFile}} | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80" > | |||
{{$.i18n.Tr "repo.modelarts.train_job.run_parameter"}} | |||
</td> | |||
<td class="ti-text-form-content"> | |||
<div class="text-span text-span-w" title="{{.Parameters}}"> | |||
{{if .Parameters}} | |||
<span>{{.Parameters}}</span> | |||
{{else}} | |||
<span>--</span> | |||
{{end}} | |||
</div> | |||
</td> | |||
</tr> | |||
<tr class="ti-no-ng-animate"> | |||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||
{{$.i18n.Tr "repo.modelarts.train_job.standard"}} | |||
</td> | |||
<td class="ti-text-form-content spec"> | |||
<div class="text-span text-span-w"></div> | |||
</td> | |||
</tr> | |||
</tbody> | |||
</table> | |||
</div> | |||
</div> | |||
<div style="clear:both"> | |||
<table style="border:none" class="ui fixed small stackable table"> | |||
<thead> | |||
<tr><th style="color: #8a8e99;font-size:12px" class="three wide left aligned">{{$.i18n.Tr "dataset.file"}}</th> | |||
</tr></thead> | |||
<tbody> | |||
{{range $m ,$n := $.datasetDownload}} | |||
<tr> | |||
<td style="word-wrap: break-word;word-break: break-all;"> | |||
{{if eq .IsDelete true}} | |||
{{.DatasetName}}({{$.i18n.Tr "dataset.file_deleted"}}) | |||
{{else}} | |||
<a href="{{.RepositoryLink}}" target="_blank">{{.DatasetName}}</a> | |||
{{end}} | |||
</td> | |||
</tr> | |||
{{end}} | |||
</tbody> | |||
</table> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="ui tab" data-tab="second"> | |||
<!-- | |||
<div class="file-info"> | |||
<a id="{{.VersionName}}-log-down" | |||
class='{{if and ($.canDownload) (eq .Status "KILLED" "FAILED" "START_FAILED" "STOPPED" "COMPLETED") }}ti-download-file{{else}}disabled{{end}} file-info' | |||
href="{{$.RepoLink}}/modelarts/train-job/{{.JobID}}/download_log_file?version_name={{.VersionName}}"> | |||
<i class="ri-download-cloud-2-line"></i> | |||
<span style="margin-left: 0.3rem;">{{$.i18n.Tr "repo.modelarts.download_log"}}</span> | |||
</a> | |||
<div class="file-info full-log-dialog" data-version="{{.VersionName}}" data-log="{{$.i18n.Tr "repo.modelarts.log_file"}}" | |||
data-exit="{{$.i18n.Tr "repo.modelarts.exit_full_screen"}}" style="margin-left: 1rem;color:#0366d6;cursor: pointer;" | |||
data-log-down="{{$.i18n.Tr "repo.modelarts.download_log"}}" data-href="{{$.RepoLink}}/modelarts/train-job/{{.JobID}}/download_log_file?version_name={{.VersionName}}" | |||
data-scroll-top="{{$.i18n.Tr "repo.log_scroll_start"}}" data-scroll-bottom="{{$.i18n.Tr "repo.log_scroll_end"}}"> | |||
<i class="ri-aspect-ratio-line"></i> | |||
<span style="margin-left: 0.3rem;">{{$.i18n.Tr "repo.modelarts.fullscreen_log_file"}}</span> | |||
</div> | |||
</div> | |||
<div style="position: relative;border: 1px solid rgba(0,0,0,.2);padding: 0 10px;margin-top: 10px;"> | |||
<span> | |||
<a title="{{$.i18n.Tr "repo.log_scroll_start"}}" style="position: absolute; right: -32px;cursor: pointer;" | |||
class="log_top" data-version="{{.VersionName}}"><i class="icon-to-top"></i></a> | |||
</span> | |||
<span class="log-info-{{.VersionName}}"> | |||
<a title="{{$.i18n.Tr "repo.log_scroll_end"}}" style="position: absolute; bottom: 10px;right: -32px;cursor: pointer;" | |||
class="log_bottom" data-version="{{.VersionName}}"><i | |||
class="icon-to-bottom"></i></a> | |||
</span> | |||
<div class="ui message message{{.VersionName}}" style="display: none;"> | |||
<div id="header"></div> | |||
</div> | |||
<div class="ui attached log log-scroll" data-version="{{.VersionName}}" id="log{{.VersionName}}" style="height: 300px !important; overflow: auto;"> | |||
<div class="ui inverted active dimmer"> | |||
<div class="ui loader"></div> | |||
</div> | |||
<input type="hidden" name="end_line" value> | |||
<input type="hidden" name="end_line-max" value> | |||
<input type="hidden" name="start_line-max" value> | |||
<input type="hidden" name="start_line-max-copy" value> | |||
<input type="hidden" name="start_line" value> | |||
<input type="hidden" name="init_log" value> | |||
<pre id="log_file{{.VersionName}}"></pre> | |||
</div> | |||
</div> | |||
--> | |||
<div class="detail-log-content detail-log-content-{{.VersionName}}" | |||
data-multiplenode="" | |||
data-logapiurl="{{$.RepoLink}}/modelarts/inference-job/{{.JobID}}/log" | |||
data-logdownloadurl="{{$.RepoLink}}/modelarts/train-job/{{.JobID}}/download_log_file" | |||
data-workservernumber="{{.WorkServerNumber}}" | |||
data-version="{{.VersionName}}"> | |||
{{template "custom/task_log" Dict "$" $ "i18n" $.i18n }} | |||
</div> | |||
<div class="ui modal full-log-dlg-{{.VersionName}} container" style="height:90%;margin:3rem auto;"> | |||
<div id="log-file-title" style="font-size: 16px;font-weight:600;padding:20px 30px 16px;">{{$.i18n.Tr "repo.modelarts.log_file"}}</div> | |||
<div style="padding:0 50px 10px 30px;height:100%"> | |||
<div class="detail-log-fullscreen-content detail-log-fullscreen-content-{{.VersionName}}" style="height:100%;" | |||
data-multiplenode="" | |||
data-logapiurl="{{$.RepoLink}}/modelarts/inference-job/{{.JobID}}/log" | |||
data-logdownloadurl="{{$.RepoLink}}/modelarts/train-job/{{.JobID}}/download_log_file" | |||
data-workservernumber="{{.WorkServerNumber}}" | |||
data-version="{{.VersionName}}"> | |||
{{template "custom/task_log" Dict "$" $ "i18n" $.i18n "Full" true }} | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="ui tab" data-tab="third"> | |||
<input type="hidden" name="model{{.VersionName}}" value="-1"> | |||
<input type="hidden" name="modelback{{.VersionName}}" value="-1"> | |||
<div style="display: flex;justify-content: space-between;"> | |||
<div class='ui breadcrumb model_file_bread' id='file_breadcrumb{{.VersionName}}'> | |||
<div class="active section">result</div> | |||
<div class="divider"> / </div> | |||
</div> | |||
<a id="{{.VersionName}}-result-down" style="padding-right: 1%;display: none;" | |||
class='{{if $.canDownload}}ti-download-file{{else}}disabled{{end}} file-info' | |||
href="{{$.RepoLink}}/modelarts/inference-job/{{.JobID}}/downloadall?version_name={{.VersionName}}"> | |||
<i class="ri-download-cloud-2-line"></i> | |||
<span style="margin-left: 0.3rem;">{{$.i18n.Tr "repo.all_result_download"}}</span> | |||
</a> | |||
</div> | |||
<div id="dir_list{{.VersionName}}"> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<!-- {{template "custom/max_log" .}} --> | |||
{{end}} | |||
</div> | |||
<!-- 确认模态框 --> | |||
</div> | |||
{{template "base/footer" .}} | |||
<script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script> | |||
<script> | |||
console.log('{{$.canDownload}}') | |||
$(document).ready(function(){ | |||
$('.secondary.menu .item').tab(); | |||
}); | |||
let userName | |||
let repoPath | |||
let jobID | |||
let downlaodFlag = {{$.canDownload }} | |||
$(document).ready(function(){ | |||
let url = window.location.href; | |||
let urlArr = url.split('/') | |||
userName = urlArr.slice(-5)[0] | |||
repoPath = urlArr.slice(-4)[0] | |||
jobID = urlArr.slice(-1)[0] | |||
}) | |||
;(function() { | |||
var SPEC = {{ .Spec }}; | |||
var showPoint = false; | |||
var specStr = window.renderSpecStr(SPEC, showPoint, { | |||
gpu_memory: {{$.i18n.Tr "cloudbrain.gpu_memory"}}, | |||
free: {{$.i18n.Tr "cloudbrain.free"}}, | |||
point_hr: {{$.i18n.Tr "cloudbrain.point_hr"}}, | |||
memory: {{$.i18n.Tr "cloudbrain.memory"}}, | |||
shared_memory: {{$.i18n.Tr "cloudbrain.shared_memory"}}, | |||
no_use_resource:{{$.i18n.Tr "cloudbrain.no_use_resource"}}, | |||
}); | |||
$('td.ti-text-form-content.spec div').text(specStr); | |||
})(); | |||
</script> | |||
{{ template "repo/cloudbrain/cloudbraindetail" .}} |
@@ -8,9 +8,9 @@ | |||
<a class="{{if .PageIsLogin}}active{{end}} item" rel="nofollow" href="{{AppSubUrl}}/user/login"> | |||
{{.i18n.Tr "phone.account_password_login"}} | |||
</a> | |||
<a class="{{if .PageIsCloudBrainLogin}}active{{end}} item" rel="nofollow" href="{{AppSubUrl}}/user/login/cloud_brain"> | |||
<!--<a class="{{if .PageIsCloudBrainLogin}}active{{end}} item" rel="nofollow" href="{{AppSubUrl}}/user/login/cloud_brain"> | |||
{{.i18n.Tr "phone.cloud_brain_user_login"}} | |||
</a> | |||
</a>--> | |||
{{if .EnableOpenIDSignIn}} | |||
<a class="{{if .PageIsLoginOpenID}}active{{end}} item" rel="nofollow" href="{{AppSubUrl}}/user/login/openid"> | |||
<i class="fa fa-openid"></i> | |||
@@ -72,7 +72,7 @@ | |||
<div class="row"> | |||
<!-- 任务名 --> | |||
{{$JobID := '0'}} | |||
{{if eq .JobType "DEBUG" "TRAIN" "HPC" "SNN4IMAGENET" "BRAINSCORE" "BENCHMARK" "MODELSAFETY" "SNN4ECOSET" "SIM2BRAIN_SNN" "ONLINEINFERENCE"}} | |||
{{if eq .JobType "DEBUG" "TRAIN" "INFERENCE" "HPC" "SNN4IMAGENET" "BRAINSCORE" "BENCHMARK" "MODELSAFETY" "SNN4ECOSET" "SIM2BRAIN_SNN" "ONLINEINFERENCE"}} | |||
{{$JobID = .Cloudbrain.ID}} | |||
{{else}} | |||
{{$JobID = .JobID}} | |||
@@ -102,7 +102,7 @@ | |||
</a> | |||
{{else if eq .JobType "INFERENCE"}} | |||
<a class="title" | |||
href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/{{if eq .Cloudbrain.Type 1}}modelarts{{else if eq .Cloudbrain.Type 0}}cloudbrain{{end}}/inference-job/{{$JobID}}" | |||
href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/{{if eq .Cloudbrain.Type 2}}grampus{{else if eq .Cloudbrain.Type 1}}modelarts{{else if eq .Cloudbrain.Type 0}}cloudbrain{{end}}/inference-job/{{$JobID}}" | |||
title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px"> | |||
<span class="fitted" | |||
style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> | |||
@@ -321,7 +321,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" "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' | |||
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{{else if eq .Cloudbrain.Type 1}}/modelarts/train-job{{else if eq .Cloudbrain.Type 2}}/grampus/train-job{{end}}{{end}}/{{$JobID}}/del?ishomepage=true' | |||
method="post"> | |||
{{$.CsrfTokenHtml}} | |||
<input type="hidden" value="{{.Cloudbrain.ID}}" style="display:none" name="id" /> | |||
@@ -380,7 +380,7 @@ | |||
<div class="two wide column text center nowrap" | |||
style="padding-left: 2.2rem !important; width: 8% !important;"> | |||
<span class="job-status" id="{{$JobID}}" | |||
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-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/train-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}}" data-datamigrate='{{$.i18n.Tr "repo.migratingData"}}' data-centerpend='{{$.i18n.Tr "repo.centerPending"}}'> | |||
<span> | |||
@@ -91,7 +91,23 @@ | |||
{{$.i18n.Tr "action.task_nputrainjob" "" "" "" | Str2html}}<span style="">{{.RefName}}{{$.i18n.Tr "repo.issues.deleted_milestone"}}</span> | |||
{{end}} | |||
{{else if eq .GetOpType 28}} | |||
{{$.i18n.Tr "action.task_inferencejob" .GetRepoLink .Content .RefName | Str2html}} | |||
{{if .Cloudbrain}} | |||
{{$.i18n.Tr "action.task_inferencejob" .GetRepoLink (Printf "%d" .Cloudbrain.ID) .RefName | Str2html}} | |||
{{else}} | |||
{{$.i18n.Tr "action.task_inferencejob" "" "" "" | Str2html}}<span style="">{{.RefName}}{{$.i18n.Tr "repo.issues.deleted_milestone"}}</span> | |||
{{end}} | |||
{{else if eq .GetOpType 50}} | |||
{{if .Cloudbrain}} | |||
{{$.i18n.Tr "action.task_c2net_gpu_inferencejob" .GetRepoLink (Printf "%d" .Cloudbrain.ID) .RefName | Str2html}} | |||
{{else}} | |||
{{$.i18n.Tr "action.task_c2net_gpu_inferencejob" "" "" "" | Str2html}}<span style="">{{.RefName}}{{$.i18n.Tr "repo.issues.deleted_milestone"}}</span> | |||
{{end}} | |||
{{else if eq .GetOpType 51}} | |||
{{if .Cloudbrain}} | |||
{{$.i18n.Tr "action.task_c2net_gpgpu_iluvatar_inferencejob" .GetRepoLink (Printf "%d" .Cloudbrain.ID) .RefName | Str2html}} | |||
{{else}} | |||
{{$.i18n.Tr "action.task_c2net_gpgpu_iluvatar_inferencejob" "" "" "" | Str2html}}<span style="">{{.RefName}}{{$.i18n.Tr "repo.issues.deleted_milestone"}}</span> | |||
{{end}} | |||
{{else if eq .GetOpType 29}} | |||
{{$.i18n.Tr "action.task_benchmark" .GetRepoLink .Content .RefName | Str2html}} | |||
{{else if eq .GetOpType 30}} | |||
@@ -241,6 +257,10 @@ | |||
<span class="text grey"><i class="ri-character-recognition-line icon big"></i></span> | |||
{{else if eq .GetOpType 28}} | |||
<span class="text grey"><i class="ri-haze-2-line icon big"></i></span> | |||
{{else if eq .GetOpType 50}} | |||
<span class="text grey"><i class="ri-haze-2-line icon big"></i></span> | |||
{{else if eq .GetOpType 51}} | |||
<span class="text grey"><i class="ri-haze-2-line icon big"></i></span> | |||
{{else if eq .GetOpType 29}} | |||
<span class="text grey"><i class="ri-vip-crown-line icon big"></i></span> | |||
{{else if eq .GetOpType 30}} | |||
@@ -180,7 +180,7 @@ | |||
class="unzip-failed" | |||
v-if="data.Size > exceedSize" | |||
> | |||
{{ i18n.dataset_exceeds_failed }}{{exceedSize/(1000*1000*1000)}}G | |||
{{ i18n.dataset_exceeds_failed }}{{exceedSize/(1024*1024*1024)}}G | |||
</span> | |||
</span> | |||
</span> | |||
@@ -292,7 +292,7 @@ | |||
class="unzip-failed" | |||
v-if="data.Size > exceedSize" | |||
> | |||
{{ i18n.dataset_exceeds_failed }}{{exceedSize/(1000*1000*1000)}}G | |||
{{ i18n.dataset_exceeds_failed }}{{exceedSize/(1024*1024*1024)}}G | |||
</span> | |||
</span> | |||
</span> | |||
@@ -404,7 +404,7 @@ | |||
class="unzip-failed" | |||
v-if="data.Size > exceedSize" | |||
> | |||
{{ i18n.dataset_exceeds_failed }}{{exceedSize/(1000*1000*1000)}}G | |||
{{ i18n.dataset_exceeds_failed }}{{exceedSize/(1024*1024*1024)}}G | |||
</span> | |||
</span> | |||
</span> | |||
@@ -516,7 +516,7 @@ | |||
class="unzip-failed" | |||
v-if="data.Size > exceedSize" | |||
> | |||
{{ i18n.dataset_exceeds_failed }}{{exceedSize/(1000*1000*1000)}}G | |||
{{ i18n.dataset_exceeds_failed }}{{exceedSize/(1024*1024*1024)}}G | |||
</span> | |||
</span> | |||
</span> | |||
@@ -1179,6 +1179,7 @@ async function initRepository() { | |||
headers: { "X-Csrf-Token": csrf }, | |||
maxFiles: $dropzone.data("max-file"), | |||
maxFilesize: $dropzone.data("max-size"), | |||
filesizeBase: 1024, | |||
acceptedFiles: | |||
$dropzone.data("accepts") === "*/*" | |||
? null | |||
@@ -2828,6 +2829,7 @@ $(document).ready(async () => { | |||
headers: { "X-Csrf-Token": csrf }, | |||
maxFiles: $dropzone.data("max-file"), | |||
maxFilesize: $dropzone.data("max-size"), | |||
filesizeBase: 1024, | |||
acceptedFiles: | |||
$dropzone.data("accepts") === "*/*" ? null : $dropzone.data("accepts"), | |||
addRemoveLinks: true, | |||
@@ -78,7 +78,7 @@ | |||
{{ $t('datasetObj.dataset_unzip_failed') }} | |||
</span> | |||
<span class="unzip-failed" v-if="useExceedSize && exceedSize && data.Size > exceedSize"> | |||
{{ $t('datasetObj.dataset_exceeds_failed') }}{{ exceedSize / (1000 * 1000 * 1000) }}G | |||
{{ $t('datasetObj.dataset_exceeds_failed') }}{{ exceedSize / (1024 * 1024 * 1024) }}G | |||
</span> | |||
</span> | |||
</span> | |||
@@ -12,7 +12,7 @@ export const JOB_TYPE = [{ k: 'DEBUG', v: i18n.t('debugTask') }, { k: 'TRAIN', v | |||
export const CLUSTERS = [{ k: 'OpenI', v: i18n.t('resourcesManagement.OpenI') }, { k: 'C2Net', v: i18n.t('resourcesManagement.C2Net') }]; | |||
export const AI_CENTER = [{ k: 'OpenIOne', v: i18n.t('resourcesManagement.OpenIOne') }, { k: 'OpenITwo', v: i18n.t('resourcesManagement.OpenITwo') }, { k: 'OpenIChengdu', v: i18n.t('resourcesManagement.OpenIChengdu') }, { k: 'pclcci', v: i18n.t('resourcesManagement.pclcci') }, { k: 'hefei', v: i18n.t('resourcesManagement.hefeiCenter') }, { k: 'xuchang', v: i18n.t('resourcesManagement.xuchangCenter') }]; | |||
export const COMPUTER_RESOURCES = [{ k: 'CPU', v: 'CPU' }, { k: 'GPU', v: 'GPU' }, { k: 'NPU', v: 'NPU' }, { k: 'GCU', v: 'GCU' }, { k: 'MLU', v: 'MLU' }, { k: 'DCU', v: 'DCU' }, { k: 'ILUVATAR-GPGPU', v: 'ILUVATAR-GPGPU' }, { k: 'METAX-GPGPU', v: 'METAX-GPGPU' }]; | |||
export const ACC_CARD_TYPE = [{ k: 'T4', v: 'T4' }, { k: 'A100', v: 'A100' }, { k: 'V100', v: 'V100' }, { k: 'ASCEND910', v: 'Ascend 910' }, { k: 'MLU270', v: 'MLU270' }, { k: 'MLU290', v: 'MLU290' }, { k: 'RTX3080', v: 'RTX3080' }, { k: 'ENFLAME-T20', v: 'ENFLAME-T20' }, { k: 'DCU', v: 'DCU' }, { k: 'BI-V100', v: 'BI-V100' }, { k: 'MR-V100', v: 'MR-V100' }, { k: 'N100', v: 'N100' }]; | |||
export const ACC_CARD_TYPE = [{ k: 'T4', v: 'T4' }, { k: 'A100', v: 'A100' }, { k: 'V100', v: 'V100' }, { k: 'ASCEND910', v: 'Ascend 910' }, { k: 'ASCEND-D910B', v: 'Ascend-D910B' }, { k: 'MLU270', v: 'MLU270' }, { k: 'MLU290', v: 'MLU290' }, { k: 'RTX3080', v: 'RTX3080' }, { k: 'ENFLAME-T20', v: 'ENFLAME-T20' }, { k: 'DCU', v: 'DCU' }, { k: 'BI-V100', v: 'BI-V100' }, { k: 'MR-V100', v: 'MR-V100' }, { k: 'N100', v: 'N100' }]; | |||
export const SPECIFICATION_STATUS = [{ k: '1', v: i18n.t('resourcesManagement.willOnShelf') }, { k: '2', v: i18n.t('resourcesManagement.onShelf') }, { k: '3', v: i18n.t('resourcesManagement.offShelf') }]; | |||
export const NETWORK_TYPE = [{ k: 1, v: `${i18n.t('cloudbrainObj.networkType')}(${i18n.t('cloudbrainObj.noInternet')})` }, { k: 2, v: `${i18n.t('cloudbrainObj.networkType')}(${i18n.t('cloudbrainObj.hasInternet')})` }]; | |||
export const NETWORK_TYPE_VALUE = [{ k: 1, v: i18n.t('cloudbrainObj.noInternet') }, { k: 2, v: i18n.t('cloudbrainObj.hasInternet') }]; | |||
@@ -538,14 +538,16 @@ const en = { | |||
computeResource: 'Computing resources', | |||
sameTaskTips1: 'You have created an <span>equivalent task</span> that is waiting or running, please wait for the task to finish before creating it.', | |||
sameTaskTips2: 'You can view all your Cloud Brain tasks in <a href="/cloudbrains" target="_blank"> Home > Cloudbrain Task </a>.', | |||
pathTips1: 'The code is storaged in <strong style="color:#010101">{code}</strong>, the dataset is storaged in <strong style="color:#010101">{dataset}</strong>, the pre-trained model is storaged in the run parameter <strong style="color:#010101">{model}</strong>, and please put your model into <strong style="color:#010101">{output}</strong> then you can download it online', | |||
pathTips11: 'The code is storaged in <strong style="color:#010101">{code}</strong>, the dataset is storaged in <strong style="color:#010101">{dataset}</strong>, the pre-trained model is storaged in the <strong style="color:#010101">{model}</strong>, and please put your model into <strong style="color:#010101">{output}</strong> then you can download it online', | |||
pathTips2: 'The code is storaged in <strong style="color:#010101">{code}</strong>, the dataset is storaged in <strong style="color:#010101">{dataset}</strong>, the pre-trained model is storaged in the <strong style="color:#010101">{model}</strong>, and please put your model into <strong style="color:#010101">{output}</strong> then you can download it online', | |||
pathTips1: 'The code is storaged in <strong style="color:#010101">{code}</strong>, the dataset is storaged in <strong style="color:#010101">{dataset}</strong>, the pre-trained model is storaged in the run parameter <strong style="color:#010101">{model}</strong>, and please put your model into <strong style="color:#010101">{output}</strong> then you can download it online.', | |||
pathTips11: 'The code is storaged in <strong style="color:#010101">{code}</strong>, the dataset is storaged in <strong style="color:#010101">{dataset}</strong>, the pre-trained model is storaged in the <strong style="color:#010101">{model}</strong>, and please put your model into <strong style="color:#010101">{output}</strong> then you can download it online.', | |||
pathTips2: 'The code is storaged in <strong style="color:#010101">{code}</strong>, the dataset is storaged in <strong style="color:#010101">{dataset}</strong>, the pre-trained model is storaged in the <strong style="color:#010101">{model}</strong>, and please put your model into <strong style="color:#010101">{output}</strong> then you can download it online.', | |||
pathTips3: 'The code is storaged in <strong style="color:#010101">{code}</strong>, the dataset is storaged in <strong style="color:#010101">{dataset}</strong>, the pre-trained model is storaged in the <strong style="color:#010101">{model}</strong>.', | |||
pathTips4: 'The code is storaged in <strong style="color:#010101">{code}</strong>, the pre-trained model is storaged in the run parameter <strong style="color:#010101">{model}</strong>, and please put your model into <strong style="color:#010101">{output}</strong> then you can download it online', | |||
pathTips4: 'The code is storaged in <strong style="color:#010101">{code}</strong>, the pre-trained model is storaged in the run parameter <strong style="color:#010101">{model}</strong>, and please put your model into <strong style="color:#010101">{output}</strong> then you can download it online.', | |||
pathTips5: 'The dataset is stored in <strong style="color:#010101">{dataset}</strong>, the model file is stored in <strong style="color:#010101">{model}</strong>, please store the inference output in <strong style="color:#010101">{output}</strong> for subsequent downloads.', | |||
pathTips6: 'The dataset location is stored in the run parameter <strong style="color:#010101">{dataset}</strong>, the pre-trained model is storaged in the run parameter <strong style="color:#010101">{model}</strong>, and the output path is stored in the run parameter <strong style="color:#010101">{output}</strong>.', | |||
pathTips66: 'The dataset location is stored in the run parameter <strong style="color:#010101">{dataset}</strong>, the pre-trained model is storaged in the run parameter <strong style="color:#010101">{model}</strong>, and please put your model into <strong style="color:#010101">{output}</strong> then you can download it online.', | |||
pathTips7: 'The dataset location is stored in the run parameter <strong style="color:#010101">{dataset}</strong>, the model file is stored in the run parameter <strong style="color:#010101">{model}</strong>, and the inference output path is stored in the run parameter <strong style="color:#010101">{output}</strong>.', | |||
pathTips71: 'The code is storaged in <strong style="color:#010101">{code}</strong>, the dataset is storaged in <strong style="color:#010101">{dataset}</strong>, the model file is storaged in the <strong style="color:#010101">{model}</strong>, and please put your inference output into <strong style="color:#010101">{output}</strong> then you can download it online.', | |||
basicInfo: 'Basic Info', | |||
paramsSetting: 'Parameter setting', | |||
taskPrepareTips: 'The task is currently being prepared. Drink a glass of water and come back to take a look~', | |||
@@ -631,18 +633,21 @@ const en = { | |||
debugTaskEmptyTitle: 'Debug task has not been created', | |||
debugTaskEmptyTip0: 'Code version: You have not initialized the code repository, please <a href="{url}">initialized</a> first;', | |||
debugTaskEmptyTip1: 'Running time: no more than 4 hours, it will automatically stop if it exceeds 4 hours;', | |||
debugTaskEmptyTip2: 'Dataset: Cloud Brain 1 provides CPU/GPU,Cloud Brain 2 provides Ascend NPU.And dataset also needs to be uploaded to the corresponding environment;', | |||
debugTaskEmptyTip2: 'Dataset: Cloud Brain 1 provides CPU/GPU,Cloud Brain 2 provides Ascend NPU. And dataset also needs to be uploaded to the corresponding environment;', | |||
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;', | |||
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: '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', | |||
tabTitTrain: 'Train Task', | |||
tabTitInference: 'Inference Job', | |||
tabTitInference: 'Inference Task', | |||
tabTitBenchmark: 'Model Evaluation', | |||
trainTaskEmptyTitle: 'Train task has not been created', | |||
trainTaskEmptyTip2: 'Dataset: Cloud Brain 1 provides CPU/GPU,Cloud Brain 2 provides Ascend NPU. And dataset also needs to be uploaded to the corresponding environment;', | |||
inferenceTaskEmptyTitle: 'Inference task has not been created', | |||
inferenceTaskEmptyTip2: 'Dataset: Cloud Brain 1 provides CPU/GPU,Cloud Brain 2 provides Ascend NPU. And dataset also needs to be uploaded to the corresponding environment;', | |||
bootFileTips: 'The startup file is the entry file that your program executes, and it must be a file ending in .py', | |||
viewSample: 'View sample', | |||
tabTitOnlineInference: 'Online Inference', | |||
@@ -562,6 +562,8 @@ const zh = { | |||
pathTips5: '数据集存储在 <strong style="color:#010101">{dataset}</strong> 中,模型文件存储在 <strong style="color:#010101">{model}</strong> 中,推理输出请存储在 <strong style="color:#010101">{output}</strong> 中以供后续下载。', | |||
pathTips6: '数据集位置存储在运行参数 <strong style="color:#010101">{dataset}</strong> 中,预训练模型存放在运行参数 <strong style="color:#010101">{model}</strong> 中,训练输出路径存储在运行参数 <strong style="color:#010101">{output}</strong> 中。', | |||
pathTips66: '数据集位置存储在运行参数 <strong style="color:#010101">{dataset}</strong> 中,预训练模型存放在运行参数 <strong style="color:#010101">{model}</strong> 中,训练输出请存储在 <strong style="color:#010101">{output}</strong> 中以供后续下载。', | |||
pathTips7: '数据集位置存储在运行参数 <strong style="color:#010101">{dataset}</strong> 中,模型存放在运行参数 <strong style="color:#010101">{model}</strong> 中,推理输出路径存储在运行参数 <strong style="color:#010101">{output}</strong> 中。', | |||
pathTips71: '推理脚本存储在 <strong style="color:#010101">{code}</strong> 中,数据集存储在 <strong style="color:#010101">{dataset}</strong> 中,模型存储在 <strong style="color:#010101">{model}</strong> 中,推理输出请存储在 <strong style="color:#010101">{output}</strong> 中以供后续下载。', | |||
basicInfo: '基本信息', | |||
paramsSetting: '参数设置', | |||
taskPrepareTips: '任务正在准备中,喝杯水回来再看看~', | |||
@@ -659,6 +661,9 @@ const zh = { | |||
tabTitInference: '推理任务', | |||
tabTitBenchmark: '评测任务', | |||
trainTaskEmptyTitle: '未创建过训练任务', | |||
trainTaskEmptyTip2: '数据集:云脑1提供 CPU / GPU 资源,云脑2提供 Ascend NPU 资源,训练使用的数据集也需要上传到对应的环境;', | |||
inferenceTaskEmptyTitle: '未创建过推理任务', | |||
inferenceTaskEmptyTip2: '数据集:云脑1提供 CPU / GPU 资源,云脑2提供 Ascend NPU 资源,推理使用的数据集也需要上传到对应的环境;', | |||
bootFileTips: '启动文件是您程序执行的入口文件,必须是以.py结尾的文件。比如train.py、main.py、example/train.py、case/main.py。', | |||
viewSample: '查看样例', | |||
tabTitOnlineInference: '在线推理', | |||
@@ -34,8 +34,8 @@ export const CreatePageConfigs = { | |||
url: 'debugjob?debugListType=all', | |||
clusters: ['OpenI', 'C2Net'], | |||
'OpenI': [{ | |||
url: 'cloudbrain/create', | |||
computerResouces: ['GPU', 'NPU'], | |||
url: 'modelarts/notebook/create', | |||
computerResouces: ['NPU'], | |||
'GPU': [{ | |||
url: 'cloudbrain/create', | |||
clusterType: 'OpenICloudbrainOne', | |||
@@ -93,8 +93,8 @@ export const CreatePageConfigs = { | |||
model: '/pretrainmodel', | |||
}), | |||
form: { | |||
taskName: { reuqired: true, }, | |||
taskDescr: { reuqired: false, }, | |||
taskName: { required: true, }, | |||
taskDescr: { required: false, }, | |||
taskType: {}, | |||
branchName: {}, | |||
model: { required: false, multiple: true }, | |||
@@ -132,7 +132,7 @@ export const CreatePageConfigs = { | |||
taskDescr: { required: false, }, | |||
branchName: { required: true, }, | |||
model: { required: false, multiple: true }, | |||
imagev2: { required: true }, | |||
imagev2: { required: true, relatedSpec: true }, | |||
dataset: { required: false, useExceedSize: true }, | |||
networkType: { required: true }, | |||
spec: { required: true }, | |||
@@ -151,7 +151,7 @@ export const CreatePageConfigs = { | |||
taskDescr: { required: false, }, | |||
branchName: { required: true, }, | |||
model: { required: false, multiple: true }, | |||
imagev2: { required: true }, | |||
imagev2: { required: true, relatedSpec: true }, | |||
dataset: { required: false, useExceedSize: true }, | |||
networkType: { required: true }, | |||
spec: { required: true }, | |||
@@ -170,7 +170,7 @@ export const CreatePageConfigs = { | |||
taskDescr: { required: false, }, | |||
branchName: { required: true, }, | |||
model: { required: false, multiple: true }, | |||
imagev2: { required: true }, | |||
imagev2: { required: true, relatedSpec: true }, | |||
dataset: { required: false, useExceedSize: true }, | |||
networkType: { required: true }, | |||
spec: { required: true }, | |||
@@ -189,7 +189,7 @@ export const CreatePageConfigs = { | |||
taskDescr: { required: false, }, | |||
branchName: { required: true, }, | |||
model: { required: false, multiple: true }, | |||
imagev2: { required: true }, | |||
imagev2: { required: true, relatedSpec: true }, | |||
dataset: { required: false, useExceedSize: true }, | |||
networkType: { required: true }, | |||
spec: { required: true }, | |||
@@ -208,7 +208,7 @@ export const CreatePageConfigs = { | |||
taskDescr: { required: false, }, | |||
branchName: { required: true, }, | |||
model: { required: false, multiple: true }, | |||
imagev2: { required: true }, | |||
imagev2: { required: true, relatedSpec: true }, | |||
dataset: { required: false, useExceedSize: true }, | |||
networkType: { required: true }, | |||
spec: { required: true }, | |||
@@ -221,8 +221,8 @@ export const CreatePageConfigs = { | |||
url: 'modelarts/train-job?listType=all', | |||
clusters: ['OpenI', 'C2Net'], | |||
'OpenI': [{ | |||
url: 'cloudbrain/train-job/create', | |||
computerResouces: ['GPU', 'NPU'], | |||
url: 'modelarts/train-job/create', | |||
computerResouces: ['NPU'], | |||
'GPU': [{ | |||
url: 'cloudbrain/train-job/create', | |||
clusterType: 'OpenICloudbrainOne', | |||
@@ -271,7 +271,7 @@ export const CreatePageConfigs = { | |||
branchName: { required: true, }, | |||
model: { required: false, multiple: false }, | |||
imagev2: { required: true }, | |||
bootFile: { required: true, sampleUrl: 'https://openi.pcl.ac.cn/OpenIOSSG/MINIST_Example' }, | |||
bootFile: { required: true, sampleUrl: 'https://openi.pcl.ac.cn/OpenIOSSG/MNIST_Example' }, | |||
dataset: { required: true, type: 1 }, | |||
runParameters: { required: false }, | |||
networkType: { required: true }, | |||
@@ -297,8 +297,8 @@ export const CreatePageConfigs = { | |||
output: '/tmp/output', | |||
}), | |||
form: { | |||
taskName: { reuqired: true, }, | |||
taskDescr: { reuqired: false, }, | |||
taskName: { required: true, }, | |||
taskDescr: { required: false, }, | |||
taskType: {}, | |||
branchName: {}, | |||
model: { multiple: false }, | |||
@@ -348,7 +348,7 @@ export const CreatePageConfigs = { | |||
taskDescr: { required: false, }, | |||
branchName: { required: true, }, | |||
model: { required: false, multiple: false }, | |||
imagev2: { required: true }, | |||
imagev2: { required: true, relatedSpec: true }, | |||
bootFile: { required: true, sampleUrl: 'https://openi.pcl.ac.cn/OpenIOSSG/MNIST_PytorchExample_GCU/src/branch/master/train_for_c2net.py' }, | |||
dataset: { required: true }, | |||
runParameters: { required: false }, | |||
@@ -371,7 +371,7 @@ export const CreatePageConfigs = { | |||
taskDescr: { required: false, }, | |||
branchName: { required: true, }, | |||
model: { required: false, multiple: false }, | |||
imagev2: { required: true }, | |||
imagev2: { required: true, relatedSpec: true }, | |||
bootFile: { required: true, sampleUrl: '' }, | |||
dataset: { required: true }, | |||
runParameters: { required: false }, | |||
@@ -385,23 +385,80 @@ export const CreatePageConfigs = { | |||
// 推理任务 | |||
'INFERENCE': [{ | |||
url: 'modelarts/inference-job', | |||
clusters: ['OpenI'], | |||
clusters: ['OpenI', 'C2Net'], | |||
'OpenI': [{ | |||
url: 'cloudbrain/inference-job/create', | |||
computerResouces: ['GPU', 'NPU'], | |||
'GPU': [{ | |||
url: 'cloudbrain/inference-job/create', | |||
tips2: '', | |||
// hideTips2: true, | |||
hideCluster: true, | |||
form: {}, | |||
}], | |||
url: 'modelarts/inference-job/create', | |||
computerResouces: ['NPU'], | |||
'NPU': [{ | |||
url: 'modelarts/inference-job/create', | |||
tips2: '', | |||
// hideTips2: true, | |||
hideCluster: true, | |||
form: {}, | |||
clusterType: 'OpenICloudbrainTwo', | |||
tips2: i18n.t('cloudbrainObj.pathTips7', { | |||
dataset: 'multi_data_url', | |||
model: 'pretrain_url', | |||
output: 'result_url', | |||
}), | |||
form: { | |||
taskName: { required: true, }, | |||
taskDescr: { required: false, }, | |||
branchName: { required: true, }, | |||
model: { required: true, multiple: false }, | |||
imagev2: { required: true }, | |||
bootFile: { required: true, sampleUrl: 'https://openi.pcl.ac.cn/OpenIOSSG/MNIST_Example/src/branch/master/inference.py' }, | |||
dataset: { required: true, type: 1 }, | |||
runParameters: { required: false }, | |||
networkType: { required: true }, | |||
spec: { required: true }, | |||
workServerNum: { required: true }, | |||
}, | |||
}], | |||
}], | |||
'C2Net': [{ | |||
url: 'grampus/inference-job/create', | |||
computerResouces: ['GPU', 'ILUVATAR-GPGPU'], | |||
'GPU': [{ | |||
url: 'grampus/inference-job/create', | |||
clusterType: 'C2Net', | |||
tips2: i18n.t('cloudbrainObj.pathTips71', { | |||
code: '/tmp/code', | |||
dataset: '/tmp/dataset', | |||
model: '/tmp/pretrainmodel', | |||
output: '/tmp/output', | |||
}), | |||
form: { | |||
taskName: { required: true, }, | |||
taskDescr: { required: false, }, | |||
taskType: {}, | |||
branchName: {}, | |||
model: { required: true, multiple: false }, | |||
imagev1: { required: true, type: 2 }, | |||
bootFile: { required: true, sampleUrl: 'https://openi.pcl.ac.cn/OpenIOSSG/MNIST_PytorchExample_GPU/src/branch/master/inference_for_c2net.py' }, | |||
dataset: { required: true, type: 0 }, | |||
runParameters: { required: false }, | |||
networkType: { required: true }, | |||
spec: {}, | |||
}, | |||
}], | |||
'ILUVATAR-GPGPU': [{ | |||
url: 'modelarts/inference-job/create?type=1', | |||
clusterType: 'C2Net', | |||
tips2: i18n.t('cloudbrainObj.pathTips71', { | |||
code: '/tmp/code', | |||
dataset: '/tmp/dataset', | |||
model: '/tmp/pretrainmodel', | |||
output: '/tmp/output', | |||
}), | |||
form: { | |||
taskName: { required: true, }, | |||
taskDescr: { required: false, }, | |||
branchName: { required: true, }, | |||
model: { required: true, multiple: false }, | |||
imagev2: { required: true, relatedSpec: true }, | |||
bootFile: { required: true, sampleUrl: 'https://openi.pcl.ac.cn/OpenIOSSG/MNIST_PytorchExample_GPU/src/branch/master/inference_for_c2net.py' }, | |||
dataset: { required: true, type: 0 }, | |||
runParameters: { required: false }, | |||
networkType: { required: true }, | |||
spec: { required: true }, | |||
} | |||
}], | |||
}], | |||
}], | |||
@@ -488,8 +545,8 @@ export const CreatePageConfigs = { | |||
model: '/pretrainmodel', | |||
}), | |||
form: { | |||
taskName: { reuqired: true, }, | |||
taskDescr: { reuqired: false, }, | |||
taskName: { required: true, }, | |||
taskDescr: { required: false, }, | |||
taskType: {}, | |||
branchName: {}, | |||
bootFile: { required: true, sampleUrl: 'https://openi.pcl.ac.cn/OpenIOSSG/Online-Inference_Example' }, | |||
@@ -535,14 +592,20 @@ export const ListPageConfigs = { | |||
operations: ['stop', 'modify', 'delete'], | |||
emptyTitle: i18n.t('cloudbrainObj.trainTaskEmptyTitle'), | |||
emptyTip0: true, | |||
emptyTip1: i18n.t('cloudbrainObj.debugTaskEmptyTip2'), | |||
emptyTip1: i18n.t('cloudbrainObj.trainTaskEmptyTip2'), | |||
emptyTip2: i18n.t('cloudbrainObj.debugTaskEmptyTip3'), | |||
}, { | |||
jobType: 'INFERENCE', | |||
sortList: getSortList(['', 'GPU', 'NPU', 'ILUVATAR-GPGPU']), | |||
jobTypeName: getListValueWithKey(JOB_TYPE, 'INFERENCE'), | |||
url: 'modelarts/inference-job', | |||
createUrl: 'cloudbrain/inference-job/create', | |||
createUrl: 'modelarts/inference-job/create', | |||
columns: ['taskName', 'status', 'createTime', 'runDuration', 'clusterAndComputeResource', 'creator'], | |||
operations: ['stop', 'delete'], | |||
emptyTitle: i18n.t('cloudbrainObj.inferenceTaskEmptyTitle'), | |||
emptyTip0: true, | |||
emptyTip1: i18n.t('cloudbrainObj.inferenceTaskEmptyTip2'), | |||
emptyTip2: i18n.t('cloudbrainObj.debugTaskEmptyTip3'), | |||
}, { | |||
jobType: 'BENCHMARK', | |||
jobTypeName: getListValueWithKey(JOB_TYPE, 'BENCHMARK'), | |||
@@ -1010,30 +1073,116 @@ export const DetailPageConfigs = { | |||
}], | |||
}] | |||
}], | |||
/* | |||
// 推理任务 | |||
'INFERENCE': [{ | |||
listUrl: 'modelarts/inference-job', | |||
clusters: ['OpenI'], | |||
clusters: ['OpenI', 'C2Net'], | |||
'OpenI': [{ | |||
url: 'cloudbrain/inference-job/create', | |||
computerResouces: ['GPU', 'NPU'], | |||
'GPU': [{ | |||
url: 'cloudbrain/inference-job/create', | |||
tips2: '', | |||
// hideTips2: true, | |||
hideCluster: true, | |||
form: {}, | |||
}], | |||
'NPU': [{ | |||
url: 'modelarts/inference-job/create', | |||
tips2: '', | |||
// hideTips2: true, | |||
hideCluster: true, | |||
form: {}, | |||
detailUrl: 'modelarts/inference-job/', | |||
summary: [], | |||
operations: [], | |||
tabs: [{ | |||
name: 'configInfo', | |||
fields: [ | |||
'taskName', 'imagev2', | |||
'status', 'spec', | |||
'creator', 'hasInternet', | |||
'branch', 'modelName', | |||
'computerRes', 'modelVersion', | |||
'runVersion', 'modelFiles', | |||
'createTime', 'bootFile', | |||
'startTime', 'runParameters', | |||
'endTime', 'workServerNum', | |||
'duration', '', | |||
'descr', '', | |||
'failedReason', | |||
'dataset', | |||
'modelList', | |||
] | |||
}, { | |||
name: 'logs', | |||
multiNodes: true, | |||
}, { | |||
name: 'resourceUseage', | |||
multiNodes: true, | |||
}, { | |||
name: 'resultDownload' | |||
}], | |||
}], | |||
}], | |||
'C2Net': [{ | |||
'GPU': [{ | |||
detailUrl: 'grampus/inference-job/', | |||
summary: [], | |||
operations: [], | |||
tabs: [{ | |||
name: 'configInfo', | |||
fields: [ | |||
'taskName', 'imagev1', | |||
'status', 'spec', | |||
'creator', 'aiCenter', | |||
'branch', 'hasInternet', | |||
'computerRes', 'modelName', | |||
'createTime', 'modelVersion', | |||
'startTime', 'modelFiles', | |||
'endTime', 'bootFile', | |||
'duration', 'runParameters', | |||
'descr', 'workServerNum', | |||
'failedReason', '', | |||
'dataset', | |||
'modelList', | |||
] | |||
}, { | |||
name: 'operationProfile' | |||
}, { | |||
name: 'logs', | |||
noScroll: true, | |||
multiNodes: true, | |||
}, { | |||
name: 'resourceUseage', | |||
multiNodes: true, | |||
}, { | |||
name: 'resultDownload' | |||
}], | |||
}], | |||
'ILUVATAR-GPGPU': [{ | |||
detailUrl: 'grampus/inference-job/', | |||
summary: [], | |||
operations: [], | |||
tabs: [{ | |||
name: 'configInfo', | |||
fields: [ | |||
'taskName', 'imagev2', | |||
'status', 'spec', | |||
'creator', 'aiCenter', | |||
'branch', 'hasInternet', | |||
'computerRes', 'modelName', | |||
'createTime', 'modelVersion', | |||
'startTime', 'modelFiles', | |||
'endTime', 'bootFile', | |||
'duration', 'runParameters', | |||
'descr', '', | |||
'failedReason', | |||
'dataset', | |||
'modelList', | |||
] | |||
}, { | |||
name: 'operationProfile' | |||
}, { | |||
name: 'logs', | |||
noScroll: true, | |||
multiNodes: true, | |||
}, { | |||
name: 'resourceUseage', | |||
multiNodes: true, | |||
}, { | |||
name: 'resultDownload' | |||
}], | |||
}], | |||
}] | |||
}], | |||
/* | |||
// 评测任务 | |||
'BENCHMARK': [{ // 评测任务-算法 | |||
listUrl: 'cloudbrain/benchmark', | |||
@@ -1127,7 +1276,7 @@ export const DetailPageConfigs = { | |||
}, { | |||
name: 'logs', | |||
noScroll: true, | |||
},{ | |||
}, { | |||
name: 'resultDownload' | |||
}], | |||
}], | |||
@@ -37,14 +37,22 @@ | |||
<span>{{ scope.row.task.versionCount }}</span> | |||
</template> | |||
</el-table-column> | |||
<el-table-column v-if="pageCfg.page.columns.indexOf('modelInfo') >= 0" :label="$t('repos.model')" align="left" | |||
header-align="left" width="100"> | |||
<template slot-scope="scope"> | |||
<span>{{ scope.row.task.model }}</span> | |||
</template> | |||
</el-table-column> | |||
<el-table-column v-if="pageCfg.page.columns.indexOf('status') >= 0" prop="Status" :label="$t('status')" | |||
align="left" header-align="left" min-width="120"> | |||
<template slot-scope="scope"> | |||
<div class="status-wrap"> | |||
<i :class="scope.row.task.status"></i> | |||
<span>{{ scope.row.task.status }}</span> | |||
<i v-if="scope.row.task.detailed_status==='dataMigrating' && scope.row.task.status==='WAITING'" :class="scope.row.task.detailed_status" :title="$t('cloudbrainObj.migratingData')"></i> | |||
<i v-if="scope.row.task.detailed_status==='centerPending' && scope.row.task.status==='WAITING'" :class="scope.row.task.detailed_status" :title="$t('cloudbrainObj.centerPending')"></i> | |||
<i v-if="scope.row.task.detailed_status === 'dataMigrating' && scope.row.task.status === 'WAITING'" | |||
:class="scope.row.task.detailed_status" :title="$t('cloudbrainObj.migratingData')"></i> | |||
<i v-if="scope.row.task.detailed_status === 'centerPending' && scope.row.task.status === 'WAITING'" | |||
:class="scope.row.task.detailed_status" :title="$t('cloudbrainObj.centerPending')"></i> | |||
</div> | |||
</template> | |||
</el-table-column> | |||
@@ -105,6 +113,11 @@ | |||
:class="scope.row.can_modify && scope.row.task.canModify ? '' : 'disabled'">{{ | |||
$t('cloudbrainObj.modify') | |||
}}</a> | |||
<a href="javascript:;" v-if="pageCfg.page.operations.indexOf('download') >= 0" | |||
@click="opDownload(scope.row)" | |||
:class="scope.row.can_delete && scope.row.task.canDelete ? '' : 'disabled'">{{ | |||
$t('cloudbrainObj.modelDownload') | |||
}}</a> | |||
<a href="javascript:;" v-if="pageCfg.page.operations.indexOf('delete') >= 0" | |||
@click="opDelete(scope.row)" | |||
:class="scope.row.can_delete && scope.row.task.canDelete ? '' : 'disabled'">{{ | |||
@@ -387,6 +400,7 @@ export default { | |||
}); | |||
}); | |||
}, | |||
opDownload(row) { }, | |||
}, | |||
beforeMount() { | |||
const urlParams = getUrlSearchParams(); | |||
@@ -162,6 +162,15 @@ export class CloudBrainTools { | |||
} | |||
break; | |||
case 'INFERENCE': | |||
if (taskInfo.cluster == 'OpenI') { | |||
if (taskInfo.compute_source == 'GPU') { | |||
link += `cloudbrain/inference-job/${taskInfo.id}`; | |||
} else if (taskInfo.compute_source == 'NPU') { | |||
link += `modelarts/inference-job/${taskInfo.id}`; | |||
} | |||
} else if (taskInfo.cluster == 'C2Net') { | |||
link += `grampus/inference-job/${taskInfo.id}`; | |||
} | |||
break; | |||
case 'BENCHMARK': | |||
break; | |||
@@ -1,6 +1,6 @@ | |||
<template> | |||
<div> | |||
<div class="title" v-if="type == 'add'">请在下方填写您的算力使用需求:</div> | |||
<div class="title" v-if="type == 'add'">请在下方填写您的算力使用需求,部分大额或独占资源使用涉及付费,平台运营人员会与您联系沟通详情。</div> | |||
<div class="form-c"> | |||
<el-form ref="formRef" size="default" :model="form" :rules="formRules" label-width="110px"> | |||
<el-form-item label="计算资源" prop="compute_resource"> | |||
@@ -166,7 +166,9 @@ export default { | |||
], | |||
}, | |||
computeResourceList: [], | |||
computeResourceCardTypeMap: {}, | |||
computeResourceCardTypeMap: { | |||
'GPU': ['A100', 'V100', 'T4'], | |||
}, | |||
cardTypeList: [], | |||
resourceTypeList: [ | |||
{ k: 1, v: '共享' }, | |||
@@ -292,8 +294,8 @@ export default { | |||
res = res.data; | |||
if (res.code == 0) { | |||
const data = res.data; | |||
this.computeResourceCardTypeMap = data; | |||
this.computeResourceList = Object.keys(data).map(itm => ({ k: itm, v: itm })); | |||
Object.assign(this.computeResourceCardTypeMap, { ...data }); | |||
this.computeResourceList = Object.keys(this.computeResourceCardTypeMap).map(itm => ({ k: itm, v: itm })); | |||
this.cardTypeList = []; | |||
this.form.card_type = ''; | |||
} | |||
@@ -40,10 +40,10 @@ | |||
<div class="demand-item-right"> | |||
<span class="status pending" v-if="item.status == 1"><i | |||
class="el-icon-stopwatch"></i><span>待处理</span></span> | |||
<span class="status accepted" v-if="item.status == 2"><i | |||
class="el-icon-circle-check"></i><span>已接纳</span></span> | |||
<span class="status refuse " v-if="item.status == 2"><i | |||
class="el-icon-circle-check"></i><span>已处理</span></span> | |||
<span class="status refuse" v-if="item.status == 3"><i | |||
class="el-icon-circle-close"></i><span>未接纳</span></span> | |||
class="el-icon-circle-check"></i><span>已处理</span></span> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -90,8 +90,12 @@ | |||
class="el-icon-stopwatch"></i><span>待处理</span></span> | |||
<span class="status accepted" v-if="item.status == 2"><i | |||
class="el-icon-circle-check"></i><span>已接纳</span></span> | |||
<span class="status refuse" v-if="item.status == 3"><i | |||
class="el-icon-circle-close"></i><span>未接纳</span></span> | |||
<span class="status refuse" v-if="item.status == 3"> | |||
<i class="el-icon-circle-close"></i><span>未接纳</span> | |||
<el-tooltip v-if="false" class="item" effect="dark" :content="item.review" placement="top"> | |||
<i class="el-icon-info" style="margin-left:5px;cursor:pointer"></i> | |||
</el-tooltip> | |||
</span> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -3,7 +3,7 @@ | |||
<div class="title" v-if="showTitle"><span :class="required ? 'required' : ''">{{ selfTitle }}</span></div> | |||
<div class="content"> | |||
<div class="dataset-list-c" :class="errStatus ? 'error' : ''"> | |||
<div class="dataset-item" v-for="(item, index) in selectList" :key="item.id"> | |||
<div class="dataset-item" v-for="(item) in selectList" :key="item.id"> | |||
{{ item.name }}; | |||
</div> | |||
<div v-if="selectList.length == 0" class="dataset-item-placeholder"> | |||
@@ -75,7 +75,7 @@ | |||
{{ $t('datasetObj.dataset_unzip_failed') }} | |||
</span> | |||
<span class="unzip-failed" v-if="exceedSize && data.Size > exceedSize"> | |||
{{ $t('datasetObj.dataset_exceeds_failed') }}{{ exceedSize / (1000 * 1000 * 1000) }}G | |||
{{ $t('datasetObj.dataset_exceeds_failed') }}{{ exceedSize / (1024 * 1024 * 1024) }}G | |||
</span> | |||
</span> | |||
</span> | |||
@@ -90,7 +90,7 @@ | |||
<div class="right-title"><span>{{ $t('datasetObj.dataset_selected') }}</span></div> | |||
<div class="right-selected-list"> | |||
<el-checkbox-group v-model="dlgSelectedDataset"> | |||
<el-checkbox v-for="(item, index) in dlgSelectedDatasetList" :key="item.id" :label="item.id" | |||
<el-checkbox v-for="(item) in dlgSelectedDatasetList" :key="item.id" :label="item.id" | |||
:true-label="item.id" :title="item.label" @change="(checked) => dlgChangeSelect(checked, item)"> | |||
{{ item.label }} | |||
</el-checkbox> | |||
@@ -4,7 +4,8 @@ | |||
<NotFound></NotFound> | |||
</div> | |||
<div v-else> | |||
<ModelHeader :tab="'files'" :repoOwnerName="repoOwnerName" :repoName="repoName" :modelName="modelName" :model="modelData" v-if="JSON.stringify(modelData)!=='{}'"> | |||
<ModelHeader :tab="'files'" :repoOwnerName="repoOwnerName" :repoName="repoName" :modelName="modelName" | |||
:model="modelData" v-if="JSON.stringify(modelData) !== '{}'"> | |||
</ModelHeader> | |||
<div class="ui container"> | |||
<div class="header"> | |||
@@ -181,6 +182,7 @@ export default { | |||
maxFiles: 10, | |||
parallelUploads: 20, | |||
uploadMultiple: true, | |||
filesizeBase: 1024, | |||
maxFilesize: maxModelFilesSize, | |||
timeout: 0, | |||
addRemoveLinks: true, | |||
@@ -49,7 +49,13 @@ const getJobTypeLink = (record, type) => { | |||
} | |||
break; | |||
case 'INFERENCE': | |||
link += `/modelarts/inference-job/${cloudbrain.JobID}`; | |||
if (cloudbrain.Type === 1) { | |||
link += `/modelarts/inference-job/${cloudbrain.ID}`; | |||
} else if (cloudbrain.Type === 0) { | |||
link += `/cloudbrain/inference-job/${cloudbrain.ID}`; | |||
} else if (cloudbrain.Type === 2) { | |||
link += `/grampus/inference-job/${cloudbrain.ID}`; | |||
} | |||
break; | |||
case 'BENCHMARK': | |||
link += `/cloudbrain/benchmark/${cloudbrain.ID}`; | |||
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》