Browse Source

增加接口

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.21.12.1^2
zouap 4 years ago
parent
commit
b799ca409c
1 changed files with 24 additions and 0 deletions
  1. +24
    -0
      routers/repo/ai_model_manage.go

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

@@ -257,6 +257,30 @@ func DownloadMultiModelFile(ctx *context.Context) {
}
}

func QueryTrainJobVersionList(ctx *context.Context) {
log.Info("query train job version list. start.")
JobID := ctx.Query("JobID")

VersionListTasks, count, err := models.CloudbrainsVersionList(&models.CloudbrainsOptions{
ListOptions: models.ListOptions{
Page: -1,
PageSize: -1,
},
RepoID: -1,
Type: -1,
JobType: "",
JobID: JobID,
})

log.Info("query return count=" + fmt.Sprint(count))

if err != nil {
ctx.ServerError("QueryTrainJobList:", err)
} else {
ctx.JSON(200, VersionListTasks)
}
}

func QueryTrainJobList(ctx *context.Context) {
log.Info("query train job list. start.")
repoId := ctx.QueryInt64("repoId")


Loading…
Cancel
Save