|
|
|
@@ -93,7 +93,7 @@ func saveModelByParameters(jobId string, versionName string, name string, versio |
|
|
|
log.Info("accuracyJson=" + string(accuracyJson)) |
|
|
|
aiTask.ContainerIp = "" |
|
|
|
aiTaskJson, _ := json.Marshal(aiTask) |
|
|
|
|
|
|
|
isPrivate := ctx.QueryBool("isPrivate") |
|
|
|
model := &models.AiModelManage{ |
|
|
|
ID: id, |
|
|
|
Version: version, |
|
|
|
@@ -114,6 +114,7 @@ func saveModelByParameters(jobId string, versionName string, name string, versio |
|
|
|
TrainTaskInfo: string(aiTaskJson), |
|
|
|
Accuracy: string(accuracyJson), |
|
|
|
Status: STATUS_COPY_MODEL, |
|
|
|
IsPrivate: isPrivate, |
|
|
|
} |
|
|
|
|
|
|
|
err = models.SaveModelToDb(model) |
|
|
|
@@ -216,6 +217,7 @@ func SaveLocalModel(ctx *context.Context) { |
|
|
|
description := ctx.Query("description") |
|
|
|
engine := ctx.QueryInt("engine") |
|
|
|
taskType := ctx.QueryInt("type") |
|
|
|
isPrivate := ctx.QueryBool("isPrivate") |
|
|
|
modelActualPath := "" |
|
|
|
if taskType == models.TypeCloudBrainOne { |
|
|
|
destKeyNamePrefix := Model_prefix + models.AttachmentRelativePath(id) + "/" |
|
|
|
@@ -262,6 +264,7 @@ func SaveLocalModel(ctx *context.Context) { |
|
|
|
TrainTaskInfo: "", |
|
|
|
Accuracy: "", |
|
|
|
Status: STATUS_FINISHED, |
|
|
|
IsPrivate: isPrivate, |
|
|
|
} |
|
|
|
|
|
|
|
err := models.SaveModelToDb(model) |
|
|
|
|