@@ -195,7 +195,7 @@ func queryPullRequestPublic(start_unix int64, end_unix int64, publicAllRepo map[ | |||||
sess := x.NewSession() | sess := x.NewSession() | ||||
defer sess.Close() | defer sess.Close() | ||||
resultMap := make(map[int64]int) | resultMap := make(map[int64]int) | ||||
cond := "pull_request.merged_unix>=" + fmt.Sprint(start_unix) + " and pull_request.merged_unix<=" + fmt.Sprint(end_unix) | |||||
cond := "issue.created_unix>=" + fmt.Sprint(start_unix) + " and issue.created_unix<=" + fmt.Sprint(end_unix) | |||||
count, err := sess.Table("issue").Join("inner", "pull_request", "issue.id=pull_request.issue_id").Where(cond).Count(new(Issue)) | count, err := sess.Table("issue").Join("inner", "pull_request", "issue.id=pull_request.issue_id").Where(cond).Count(new(Issue)) | ||||
if err != nil { | if err != nil { | ||||
log.Info("query issue error. return.") | log.Info("query issue error. return.") | ||||
@@ -326,7 +326,7 @@ func GenerateTask(req GenerateCloudBrainTaskReq) error { | |||||
ReadOnly: true, | ReadOnly: true, | ||||
}, | }, | ||||
}) | }) | ||||
} else { | |||||
} else if len(req.DatasetInfos) > 1 { | |||||
for _, dataset := range req.DatasetInfos { | for _, dataset := range req.DatasetInfos { | ||||
volumes = append(volumes, models.Volume{ | volumes = append(volumes, models.Volume{ | ||||
HostPath: models.StHostPath{ | HostPath: models.StHostPath{ | ||||
@@ -547,7 +547,7 @@ func RestartTask(ctx *context.Context, task *models.Cloudbrain, newID *string) e | |||||
GPUNumber: resourceSpec.GpuNum, | GPUNumber: resourceSpec.GpuNum, | ||||
MemoryMB: resourceSpec.MemMiB, | MemoryMB: resourceSpec.MemMiB, | ||||
ShmMB: resourceSpec.ShareMemMiB, | ShmMB: resourceSpec.ShareMemMiB, | ||||
Command: GetCloudbrainDebugCommand(),//Command, | |||||
Command: GetCloudbrainDebugCommand(), //Command, | |||||
NeedIBDevice: false, | NeedIBDevice: false, | ||||
IsMainRole: false, | IsMainRole: false, | ||||
UseNNI: false, | UseNNI: false, | ||||
@@ -225,6 +225,7 @@ func CloudBrainNew(ctx *context.Context) { | |||||
ctx.ServerError("get new cloudbrain info failed", err) | ctx.ServerError("get new cloudbrain info failed", err) | ||||
return | return | ||||
} | } | ||||
ctx.Data["PageIsGPUDebug"] = true | |||||
ctx.HTML(200, tplCloudBrainNew) | ctx.HTML(200, tplCloudBrainNew) | ||||
} | } | ||||
@@ -290,13 +291,17 @@ func CloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) { | |||||
return | return | ||||
} | } | ||||
} | } | ||||
datasetInfos, datasetNames, err := models.GetDatasetInfo(uuids) | |||||
if err != nil { | |||||
log.Error("GetDatasetInfo failed: %v", err, ctx.Data["MsgID"]) | |||||
cloudBrainNewDataPrepare(ctx) | |||||
ctx.RenderWithErr(ctx.Tr("cloudbrain.error.dataset_select"), tpl, &form) | |||||
return | |||||
var datasetInfos map[string]models.DatasetInfo | |||||
var datasetNames string | |||||
//var | |||||
if uuids != "" { | |||||
datasetInfos, datasetNames, err = models.GetDatasetInfo(uuids) | |||||
if err != nil { | |||||
log.Error("GetDatasetInfo failed: %v", err, ctx.Data["MsgID"]) | |||||
cloudBrainNewDataPrepare(ctx) | |||||
ctx.RenderWithErr(ctx.Tr("cloudbrain.error.dataset_select"), tpl, &form) | |||||
return | |||||
} | |||||
} | } | ||||
command := cloudbrain.GetCloudbrainDebugCommand() | command := cloudbrain.GetCloudbrainDebugCommand() | ||||
@@ -373,7 +378,6 @@ func CloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) { | |||||
} | } | ||||
} | } | ||||
func CloudBrainInferenceJobCreate(ctx *context.Context, form auth.CreateCloudBrainInferencForm) { | func CloudBrainInferenceJobCreate(ctx *context.Context, form auth.CreateCloudBrainInferencForm) { | ||||
ctx.Data["PageIsCloudBrain"] = true | ctx.Data["PageIsCloudBrain"] = true | ||||
displayJobName := form.DisplayJobName | displayJobName := form.DisplayJobName | ||||
@@ -494,6 +498,7 @@ func CloudBrainInferenceJobCreate(ctx *context.Context, form auth.CreateCloudBra | |||||
ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/modelarts/inference-job") | ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/modelarts/inference-job") | ||||
} | } | ||||
/** | /** | ||||
检查用户传输的参数是否符合专属资源池 | 检查用户传输的参数是否符合专属资源池 | ||||
*/ | */ | ||||
@@ -955,7 +955,8 @@ export default { | |||||
) { | ) { | ||||
this.benchmarkNew = true; | this.benchmarkNew = true; | ||||
} | } | ||||
if (location.href.indexOf("modelarts/notebook/create") !== -1) { | |||||
if (location.href.indexOf("modelarts/notebook/create") !== -1 || location.href.indexOf("/cloudbrain/create") !== -1) { | |||||
console.log("required is false;"); | |||||
this.required = false; | this.required = false; | ||||
} | } | ||||
window.onresize = () => { | window.onresize = () => { | ||||