|
|
@@ -63,6 +63,8 @@ func DebugJobIndex(ctx *context.Context) { |
|
|
|
debugType = models.TypeCloudBrainTwo |
|
|
|
} |
|
|
|
|
|
|
|
var jobTypes []string |
|
|
|
jobTypes = append(jobTypes, string(models.JobTypeBenchmark), string(models.JobTypeSnn4imagenet), string(models.JobTypeBrainScore), string(models.JobTypeDebug)) |
|
|
|
ciTasks, count, err := models.Cloudbrains(&models.CloudbrainsOptions{ |
|
|
|
ListOptions: models.ListOptions{ |
|
|
|
Page: page, |
|
|
@@ -71,7 +73,7 @@ func DebugJobIndex(ctx *context.Context) { |
|
|
|
RepoID: repo.ID, |
|
|
|
Type: debugType, |
|
|
|
JobTypeNot: jobTypeNot, |
|
|
|
JobType: string(models.JobTypeDebug), |
|
|
|
JobTypes: jobTypes, |
|
|
|
}) |
|
|
|
if err != nil { |
|
|
|
ctx.ServerError("Get debugjob faild:", err) |
|
|
@@ -375,6 +377,8 @@ func TrainJobIndex(ctx *context.Context) { |
|
|
|
page = 1 |
|
|
|
} |
|
|
|
|
|
|
|
var jobTypes []string |
|
|
|
jobTypes = append(jobTypes, string(models.JobTypeTrain)) |
|
|
|
tasks, count, err := models.Cloudbrains(&models.CloudbrainsOptions{ |
|
|
|
ListOptions: models.ListOptions{ |
|
|
|
Page: page, |
|
|
@@ -383,7 +387,7 @@ func TrainJobIndex(ctx *context.Context) { |
|
|
|
RepoID: repo.ID, |
|
|
|
Type: models.TypeCloudBrainTwo, |
|
|
|
JobTypeNot: false, |
|
|
|
JobType: string(models.JobTypeTrain), |
|
|
|
JobTypes: jobTypes, |
|
|
|
IsLatestVersion: modelarts.IsLatestVersion, |
|
|
|
}) |
|
|
|
if err != nil { |
|
|
@@ -1309,6 +1313,9 @@ func TrainJobShow(ctx *context.Context) { |
|
|
|
if page <= 0 { |
|
|
|
page = 1 |
|
|
|
} |
|
|
|
|
|
|
|
var jobTypes []string |
|
|
|
jobTypes = append(jobTypes, string(models.JobTypeTrain)) |
|
|
|
VersionListTasks, VersionListCount, err := models.CloudbrainsVersionList(&models.CloudbrainsOptions{ |
|
|
|
ListOptions: models.ListOptions{ |
|
|
|
Page: page, |
|
|
@@ -1316,7 +1323,7 @@ func TrainJobShow(ctx *context.Context) { |
|
|
|
}, |
|
|
|
RepoID: repo.ID, |
|
|
|
Type: models.TypeCloudBrainTwo, |
|
|
|
JobType: string(models.JobTypeTrain), |
|
|
|
JobTypes: jobTypes, |
|
|
|
JobID: jobID, |
|
|
|
}) |
|
|
|
|
|
|
@@ -1428,10 +1435,12 @@ func TrainJobDel(ctx *context.Context) { |
|
|
|
var jobID = ctx.Params(":jobid") |
|
|
|
repo := ctx.Repo.Repository |
|
|
|
|
|
|
|
var jobTypes []string |
|
|
|
jobTypes = append(jobTypes, string(models.JobTypeTrain)) |
|
|
|
VersionListTasks, _, err := models.CloudbrainsVersionList(&models.CloudbrainsOptions{ |
|
|
|
RepoID: repo.ID, |
|
|
|
Type: models.TypeCloudBrainTwo, |
|
|
|
JobType: string(models.JobTypeTrain), |
|
|
|
JobTypes: jobTypes, |
|
|
|
JobID: jobID, |
|
|
|
}) |
|
|
|
if err != nil { |
|
|
@@ -1731,6 +1740,8 @@ func InferenceJobIndex(ctx *context.Context) { |
|
|
|
page = 1 |
|
|
|
} |
|
|
|
|
|
|
|
var jobTypes []string |
|
|
|
jobTypes = append(jobTypes, string(models.JobTypeInference)) |
|
|
|
tasks, count, err := models.Cloudbrains(&models.CloudbrainsOptions{ |
|
|
|
ListOptions: models.ListOptions{ |
|
|
|
Page: page, |
|
|
@@ -1738,7 +1749,7 @@ func InferenceJobIndex(ctx *context.Context) { |
|
|
|
}, |
|
|
|
RepoID: repo.ID, |
|
|
|
Type: models.TypeCloudBrainTwo, |
|
|
|
JobType: string(models.JobTypeInference), |
|
|
|
JobTypes: jobTypes, |
|
|
|
}) |
|
|
|
if err != nil { |
|
|
|
ctx.ServerError("Cloudbrain", err) |
|
|
|