Browse Source

模型状态过滤。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.9.2^2
zouap 3 years ago
parent
commit
f3f7729fc2
2 changed files with 5 additions and 1 deletions
  1. +3
    -0
      routers/repo/ai_model_manage.go
  2. +2
    -1
      routers/repo/modelarts.go

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

@@ -348,6 +348,7 @@ func QueryModelByParameters(repoId int64, page int) ([]*models.AiModelManage, in
RepoID: repoId,
Type: -1,
New: MODEL_LATEST,
Status: -1,
})
}

@@ -701,6 +702,7 @@ func SetModelCount(ctx *context.Context) {
RepoID: repoId,
Type: Type,
New: MODEL_LATEST,
Status: -1,
})
ctx.Data["MODEL_COUNT"] = count
}
@@ -774,6 +776,7 @@ func ShowModelPageInfo(ctx *context.Context) {
RepoID: repoId,
Type: Type,
New: MODEL_LATEST,
Status: -1,
})
if err != nil {
ctx.ServerError("Cloudbrain", err)


+ 2
- 1
routers/repo/modelarts.go View File

@@ -1551,7 +1551,6 @@ func TrainJobCreateVersion(ctx *context.Context, form auth.CreateModelArtsTrainJ
})
}


task, err := models.GetCloudbrainByJobIDAndVersionName(jobID, PreVersionName)
if err != nil {
log.Error("GetCloudbrainByJobIDAndVersionName(%s) failed:%v", jobID, err.Error())
@@ -2322,6 +2321,7 @@ func InferenceJobIndex(ctx *context.Context) {
RepoID: repoId,
Type: Type,
New: MODEL_LATEST,
Status: 0,
})
ctx.Data["MODEL_COUNT"] = model_count

@@ -2402,6 +2402,7 @@ func inferenceJobNewDataPrepare(ctx *context.Context) error {
RepoID: repoId,
Type: Type,
New: MODEL_LATEST,
Status: 0,
})
ctx.Data["MODEL_COUNT"] = model_count
ctx.Data["datasetType"] = models.TypeCloudBrainTwo


Loading…
Cancel
Save