|
|
|
@@ -49,8 +49,9 @@ const ( |
|
|
|
tplCloudBrainImageSubmit base.TplName = "repo/cloudbrain/image/submit" |
|
|
|
tplCloudBrainImageEdit base.TplName = "repo/cloudbrain/image/edit" |
|
|
|
|
|
|
|
tplCloudBrainTrainJobNew base.TplName = "repo/cloudbrain/trainjob/new" |
|
|
|
tplCloudBrainTrainJobShow base.TplName = "repo/cloudbrain/trainjob/show" |
|
|
|
tplCloudBrainTrainJobNew base.TplName = "repo/cloudbrain/trainjob/new" |
|
|
|
tplCloudBrainTrainJobVersionNew base.TplName = "repo/cloudbrain/trainjob/versionnew" |
|
|
|
tplCloudBrainTrainJobShow base.TplName = "repo/cloudbrain/trainjob/show" |
|
|
|
|
|
|
|
tplCloudBrainInferenceJobNew base.TplName = "repo/cloudbrain/inference/new" |
|
|
|
tplCloudBrainInferenceJobShow base.TplName = "repo/cloudbrain/inference/show" |
|
|
|
@@ -146,33 +147,6 @@ func cloudBrainVersionNewDataPrepare(ctx *context.Context) error { |
|
|
|
t := time.Now() |
|
|
|
var displayJobName = jobNamePrefixValid(cutString(ctx.User.Name, 5)) + t.Format("2006010215") + strconv.Itoa(int(t.Unix()))[5:] |
|
|
|
ctx.Data["display_job_name"] = displayJobName |
|
|
|
|
|
|
|
ctx.Data["command"] = cloudbrain.GetCloudbrainDebugCommand() |
|
|
|
ctx.Data["code_path"] = cloudbrain.CodeMountPath |
|
|
|
ctx.Data["dataset_path"] = cloudbrain.DataSetMountPath |
|
|
|
ctx.Data["model_path"] = cloudbrain.ModelMountPath |
|
|
|
ctx.Data["benchmark_path"] = cloudbrain.BenchMarkMountPath |
|
|
|
ctx.Data["is_benchmark_enabled"] = setting.IsBenchmarkEnabled |
|
|
|
|
|
|
|
if categories == nil { |
|
|
|
json.Unmarshal([]byte(setting.BenchmarkCategory), &categories) |
|
|
|
} |
|
|
|
ctx.Data["benchmark_categories"] = categories.Category |
|
|
|
|
|
|
|
ctx.Data["benchmark_types"] = GetBenchmarkTypes(ctx).BenchmarkType |
|
|
|
queuesDetail, _ := cloudbrain.GetQueuesDetail() |
|
|
|
if queuesDetail != nil { |
|
|
|
ctx.Data["QueuesDetail"] = queuesDetail |
|
|
|
} |
|
|
|
|
|
|
|
prepareCloudbrainOneSpecs(ctx) |
|
|
|
|
|
|
|
ctx.Data["snn4imagenet_path"] = cloudbrain.Snn4imagenetMountPath |
|
|
|
ctx.Data["is_snn4imagenet_enabled"] = setting.IsSnn4imagenetEnabled |
|
|
|
ctx.Data["brainscore_path"] = cloudbrain.BrainScoreMountPath |
|
|
|
ctx.Data["is_brainscore_enabled"] = setting.IsBrainScoreEnabled |
|
|
|
ctx.Data["benchmarkMode"] = ctx.Query("benchmarkMode") |
|
|
|
|
|
|
|
ctx.Data["branch_name"] = ctx.Cloudbrain.BranchName |
|
|
|
ctx.Data["image_name"] = ctx.Cloudbrain.Image |
|
|
|
ctx.Data["bootfile"] = ctx.Cloudbrain.BootFile |
|
|
|
@@ -197,10 +171,10 @@ func cloudBrainVersionNewDataPrepare(ctx *context.Context) error { |
|
|
|
ctx.Data["dataset_name"] = datasetNames |
|
|
|
} |
|
|
|
ctx.Data["uuid"] = ctx.Cloudbrain.Uuid |
|
|
|
ctx.Data["cluster_type"] = models.OpenICluster |
|
|
|
ctx.Data["compute_resource"] = ctx.Cloudbrain.ComputeResource |
|
|
|
|
|
|
|
ctx.Data["dataset_type"] = models.TypeCloudBrainOne |
|
|
|
waitCount := cloudbrain.GetWaitingCloudbrainCount(models.TypeC2Net, models.GPUResource, models.JobTypeTrain) |
|
|
|
waitCount := cloudbrain.GetWaitingCloudbrainCount(models.TypeCloudBrainOne, models.GPUResource, models.JobTypeTrain) |
|
|
|
ctx.Data["wait_count"] = waitCount |
|
|
|
|
|
|
|
return nil |
|
|
|
@@ -2624,7 +2598,7 @@ func CloudBrainTrainJobVersionNew(ctx *context.Context) { |
|
|
|
ctx.ServerError("get new train-job info failed", err) |
|
|
|
return |
|
|
|
} |
|
|
|
ctx.HTML(http.StatusOK, tplCloudBrainTrainJobNew) |
|
|
|
ctx.HTML(http.StatusOK, tplCloudBrainTrainJobVersionNew) |
|
|
|
} |
|
|
|
|
|
|
|
func InferenceCloudBrainJobNew(ctx *context.Context) { |
|
|
|
|