|
|
@@ -21,7 +21,7 @@ const ( |
|
|
CodeMountPath = "/code" |
|
|
CodeMountPath = "/code" |
|
|
DataSetMountPath = "/dataset" |
|
|
DataSetMountPath = "/dataset" |
|
|
ModelMountPath = "/model" |
|
|
ModelMountPath = "/model" |
|
|
LogFile = "log.txt" |
|
|
|
|
|
|
|
|
LogFile = "log.txt" |
|
|
BenchMarkMountPath = "/benchmark" |
|
|
BenchMarkMountPath = "/benchmark" |
|
|
BenchMarkResourceID = 1 |
|
|
BenchMarkResourceID = 1 |
|
|
Snn4imagenetMountPath = "/snn4imagenet" |
|
|
Snn4imagenetMountPath = "/snn4imagenet" |
|
|
@@ -291,16 +291,16 @@ func GenerateTask(ctx *context.Context, displayJobName, jobName, image, command, |
|
|
IsLatestVersion: "1", |
|
|
IsLatestVersion: "1", |
|
|
VersionCount: versionCount, |
|
|
VersionCount: versionCount, |
|
|
BranchName: branchName, |
|
|
BranchName: branchName, |
|
|
BootFile: bootFile, |
|
|
|
|
|
DatasetName: datasetName, |
|
|
|
|
|
Parameters: params, |
|
|
|
|
|
|
|
|
BootFile: bootFile, |
|
|
|
|
|
DatasetName: datasetName, |
|
|
|
|
|
Parameters: params, |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return err |
|
|
return err |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
task, err := models.GetCloudbrainByName(jobName) |
|
|
|
|
|
|
|
|
task, err := models.GetCloudbrainByJobID(jobID) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
log.Error("GetCloudbrainByName failed: %v", err.Error()) |
|
|
log.Error("GetCloudbrainByName failed: %v", err.Error()) |
|
|
return err |
|
|
return err |
|
|
@@ -440,8 +440,10 @@ func RestartTask(ctx *context.Context, task *models.Cloudbrain, newID *string) e |
|
|
return err |
|
|
return err |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
idString := strconv.FormatInt(newTask.ID, 10) |
|
|
|
|
|
*newID = idString |
|
|
|
|
|
|
|
|
stringId := strconv.FormatInt(newTask.ID, 10) |
|
|
|
|
|
*newID = stringId |
|
|
|
|
|
|
|
|
|
|
|
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, stringId, task.DisplayJobName, models.ActionCreateDebugGPUTask) |
|
|
|
|
|
|
|
|
return nil |
|
|
return nil |
|
|
} |
|
|
} |