|
|
|
@@ -428,7 +428,7 @@ func sendGPUInferenceResultToTest(job *models.Cloudbrain) { |
|
|
|
if jsonContent != "" { |
|
|
|
sendHttpReqToBeihang(job, jsonContent, req) |
|
|
|
} else { |
|
|
|
updateJobFailed(job) |
|
|
|
updateJobFailed(job, "推理生成的Json数据为空,无法进行评测。") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@@ -464,13 +464,14 @@ func sendNPUInferenceResultToTest(job *models.Cloudbrain) { |
|
|
|
if jsonContent != "" { |
|
|
|
sendHttpReqToBeihang(job, jsonContent, req) |
|
|
|
} else { |
|
|
|
updateJobFailed(job) |
|
|
|
updateJobFailed(job, "推理生成的Json数据为空,无法进行评测。") |
|
|
|
} |
|
|
|
} |
|
|
|
func updateJobFailed(job *models.Cloudbrain) { |
|
|
|
func updateJobFailed(job *models.Cloudbrain, msg string) { |
|
|
|
log.Info("The json is null. so set it failed.") |
|
|
|
//update task failed. |
|
|
|
job.Status = string(models.ModelArtsTrainJobFailed) |
|
|
|
job.ResultJson = msg |
|
|
|
err := models.UpdateJob(job) |
|
|
|
if err != nil { |
|
|
|
log.Error("UpdateJob failed:", err) |
|
|
|
@@ -858,7 +859,7 @@ func createForGPU(ctx *context.Context, jobName string) { |
|
|
|
ckptUrl := setting.Attachment.Minio.RealPath + TrainUrl + CkptName |
|
|
|
log.Info("ckpt url:" + ckptUrl) |
|
|
|
spec, err := resource.GetAndCheckSpec(ctx.User.ID, specId, models.FindSpecsOptions{ |
|
|
|
JobType: models.JobTypeTrain, |
|
|
|
JobType: models.JobTypeBenchmark, |
|
|
|
ComputeResource: models.GPU, |
|
|
|
Cluster: models.OpenICluster, |
|
|
|
AiCenterCode: models.AICenterOfCloudBrainOne}) |
|
|
|
|