Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.7.1
zouap 3 years ago
parent
commit
10406ae432
3 changed files with 4 additions and 2 deletions
  1. +1
    -0
      modules/storage/obs.go
  2. +2
    -1
      routers/repo/ai_model_manage.go
  3. +1
    -1
      templates/repo/modelmanage/index.tmpl

+ 1
- 0
modules/storage/obs.go View File

@@ -424,6 +424,7 @@ func GetObsListObject(jobName, outPutPath, parentDir, versionName string) ([]Fil
input := &obs.ListObjectsInput{} input := &obs.ListObjectsInput{}
input.Bucket = setting.Bucket input.Bucket = setting.Bucket
input.Prefix = strings.TrimPrefix(path.Join(setting.TrainJobModelPath, jobName, outPutPath, versionName, parentDir), "/") input.Prefix = strings.TrimPrefix(path.Join(setting.TrainJobModelPath, jobName, outPutPath, versionName, parentDir), "/")
log.Info("bucket=" + input.Bucket + " Prefix=" + input.Prefix)
strPrefix := strings.Split(input.Prefix, "/") strPrefix := strings.Split(input.Prefix, "/")
output, err := ObsCli.ListObjects(input) output, err := ObsCli.ListObjects(input)
fileInfos := make([]FileInfo, 0) fileInfos := make([]FileInfo, 0)


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

@@ -463,8 +463,9 @@ func QueryTrainModelList(ctx *context.Context) {
log.Info("query train job list. start.") log.Info("query train job list. start.")
jobName := ctx.Query("jobName") jobName := ctx.Query("jobName")
taskType := ctx.QueryInt("type") taskType := ctx.QueryInt("type")
VersionName := ctx.Query("VersionName")
if taskType == models.TypeCloudBrainTwo { if taskType == models.TypeCloudBrainTwo {
objectkey := strings.TrimPrefix(path.Join(setting.TrainJobModelPath, jobName, setting.OutPutPath), "/")
objectkey := strings.TrimPrefix(path.Join(setting.TrainJobModelPath, jobName, setting.OutPutPath, VersionName, ""), "/")
modelDbResult, err := storage.GetAllObjectByBucketAndPrefix(setting.Bucket, objectkey) modelDbResult, err := storage.GetAllObjectByBucketAndPrefix(setting.Bucket, objectkey)
log.Info("bucket=" + setting.Bucket + " objectkey=" + objectkey) log.Info("bucket=" + setting.Bucket + " objectkey=" + objectkey)
if err != nil { if err != nil {


+ 1
- 1
templates/repo/modelmanage/index.tmpl View File

@@ -439,7 +439,7 @@
if(trainJob ==null || trainJob ==""){ if(trainJob ==null || trainJob ==""){
console.log("trainJob is null"); console.log("trainJob is null");
}else{ }else{
$.get(`${repolink}/modelmanage/query_train_model?jobName=${trainJob.JobName}&type=${trainJob.Type}`, (data) => {
$.get(`${repolink}/modelmanage/query_train_model?jobName=${trainJob.JobName}&type=${trainJob.Type}&VersionName=${trainJob.VersionName}`, (data) => {
const n_length = data.length const n_length = data.length
let file_html='' let file_html=''
let firstFileName ='' let firstFileName =''


Loading…
Cancel
Save