|
|
@@ -349,7 +349,7 @@ func GenerateTask(ctx *context.Context, displayJobName, jobName, image, command, |
|
|
|
} |
|
|
|
stringId := strconv.FormatInt(task.ID, 10) |
|
|
|
|
|
|
|
if string(models.JobTypeBenchmark) == jobType { |
|
|
|
if IsBenchmarkJob(jobType) { |
|
|
|
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, stringId, displayJobName, models.ActionCreateBenchMarkTask) |
|
|
|
} else if string(models.JobTypeTrain) == jobType { |
|
|
|
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, jobID, displayJobName, models.ActionCreateGPUTrainTask) |
|
|
@@ -360,6 +360,10 @@ func GenerateTask(ctx *context.Context, displayJobName, jobName, image, command, |
|
|
|
return nil |
|
|
|
} |
|
|
|
|
|
|
|
func IsBenchmarkJob(jobType string) bool { |
|
|
|
return string(models.JobTypeBenchmark) == jobType || string(models.JobTypeBrainScore) == jobType || string(models.JobTypeSnn4imagenet) == jobType |
|
|
|
} |
|
|
|
|
|
|
|
func RestartTask(ctx *context.Context, task *models.Cloudbrain, newID *string) error { |
|
|
|
dataActualPath := setting.Attachment.Minio.RealPath + |
|
|
|
setting.Attachment.Minio.Bucket + "/" + |
|
|
|