| @@ -632,6 +632,7 @@ func AiSafetyCreateForPost(ctx *context.Context) { | |||||
| } | } | ||||
| } | } | ||||
| BootFile := ctx.Query("boot_file") | BootFile := ctx.Query("boot_file") | ||||
| BootFile = strings.TrimSpace(BootFile) | |||||
| bootFileExist, err := ctx.Repo.FileExists(BootFile, cloudbrain.DefaultBranchName) | bootFileExist, err := ctx.Repo.FileExists(BootFile, cloudbrain.DefaultBranchName) | ||||
| if err != nil || !bootFileExist { | if err != nil || !bootFileExist { | ||||
| log.Error("Get bootfile error:", err) | log.Error("Get bootfile error:", err) | ||||
| @@ -656,6 +657,7 @@ func AiSafetyCreateForPost(ctx *context.Context) { | |||||
| func createForNPU(ctx *context.Context, jobName string) error { | func createForNPU(ctx *context.Context, jobName string) error { | ||||
| VersionOutputPath := modelarts.GetOutputPathByCount(modelarts.TotalVersionCount) | VersionOutputPath := modelarts.GetOutputPathByCount(modelarts.TotalVersionCount) | ||||
| BootFile := ctx.Query("boot_file") | BootFile := ctx.Query("boot_file") | ||||
| BootFile = strings.TrimSpace(BootFile) | |||||
| displayJobName := ctx.Query("display_job_name") | displayJobName := ctx.Query("display_job_name") | ||||
| description := ctx.Query("description") | description := ctx.Query("description") | ||||
| @@ -830,6 +832,7 @@ func createForNPU(ctx *context.Context, jobName string) error { | |||||
| func createForGPU(ctx *context.Context, jobName string) error { | func createForGPU(ctx *context.Context, jobName string) error { | ||||
| BootFile := ctx.Query("boot_file") | BootFile := ctx.Query("boot_file") | ||||
| BootFile = strings.TrimSpace(BootFile) | |||||
| displayJobName := ctx.Query("display_job_name") | displayJobName := ctx.Query("display_job_name") | ||||
| description := ctx.Query("description") | description := ctx.Query("description") | ||||
| image := strings.TrimSpace(ctx.Query("image")) | image := strings.TrimSpace(ctx.Query("image")) | ||||