Browse Source

提交代码,解决获取变量问题。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.10.1^2
zouap 3 years ago
parent
commit
728873b87e
1 changed files with 11 additions and 10 deletions
  1. +11
    -10
      routers/repo/aisafety.go

+ 11
- 10
routers/repo/aisafety.go View File

@@ -665,17 +665,17 @@ func createForNPU(ctx *context.Context, jobName string) {
}

func createForGPU(ctx *context.Context, jobName string) {
BootFile := ctx.Query("BootFile")
displayJobName := ctx.Query("DisplayJobName")
description := ctx.Query("Description")
image := strings.TrimSpace(ctx.Query("Image"))
srcDataset := ctx.Query("srcDataset") //uuid
combatDataset := ctx.Query("combatDataset") //uuid
BootFile := ctx.Query("boot_file")
displayJobName := ctx.Query("display_job_name")
description := ctx.Query("description")
image := strings.TrimSpace(ctx.Query("image"))
srcDataset := ctx.Query("src_dataset") //uuid
combatDataset := ctx.Query("combat_dataset") //uuid
evaluationIndex := ctx.Query("evaluationIndex")
Params := ctx.Query("RunParaList")
specId := ctx.QueryInt64("SpecId")
TrainUrl := ctx.Query("TrainUrl")
CkptName := ctx.Query("CkptName")
Params := ctx.Query("run_para_list")
specId := ctx.QueryInt64("spec_id")
TrainUrl := ctx.Query("train_url")
CkptName := ctx.Query("ckpt_name")
ckptUrl := setting.Attachment.Minio.RealPath + TrainUrl + CkptName
log.Info("ckpt url:" + ckptUrl)
spec, err := resource.GetAndCheckSpec(ctx.User.ID, specId, models.FindSpecsOptions{
@@ -710,6 +710,7 @@ func createForGPU(ctx *context.Context, jobName string) {

uuid := srcDataset + ";" + combatDataset
datasetInfos, datasetNames, err := models.GetDatasetInfo(uuid)
log.Info("uuid=" + uuid)
if err != nil {
log.Error("GetDatasetInfo failed: %v", err, ctx.Data["MsgID"])
modelSafetyNewDataPrepare(ctx)


Loading…
Cancel
Save