Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.10.1^2
zouap 2 years ago
parent
commit
8583a9e13c
2 changed files with 4 additions and 4 deletions
  1. +4
    -1
      modules/modelarts/modelarts.go
  2. +0
    -3
      routers/repo/cloudbrain.go

+ 4
- 1
modules/modelarts/modelarts.go View File

@@ -772,7 +772,10 @@ func GenerateInferenceJob(ctx *context.Context, req *GenerateInferenceJobReq) (e
return err
}
if req.JobType == string(models.JobTypeModelSafety) {
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, jobID, req.DisplayJobName, models.ActionCreateBenchMarkTask)
task, err := models.GetCloudbrainByJobID(jobID)
if err == nil {
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, fmt.Sprint(task.ID), req.DisplayJobName, models.ActionCreateBenchMarkTask)
}
} else {
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, jobID, req.DisplayJobName, models.ActionCreateInferenceTask)
}


+ 0
- 3
routers/repo/cloudbrain.go View File

@@ -742,9 +742,6 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName, jobType models.Jo
task, err = models.GetCloudbrainByJobID(ctx.Params(":jobid"))
} else {
task, err = models.GetCloudbrainByIDWithDeleted(ctx.Params(":id"))
if task == nil || err != nil {
task, err = models.GetCloudbrainByJobID(ctx.Params(":id"))
}
}
if task.JobType == string(models.JobTypeModelSafety) {
GetAiSafetyTaskTmpl(ctx)


Loading…
Cancel
Save