Browse Source

debug

tags/v1.22.11.1^2
lewis 3 years ago
parent
commit
c9a131c823
2 changed files with 2 additions and 0 deletions
  1. +1
    -0
      modules/storage/obs.go
  2. +1
    -0
      routers/api/v1/repo/modelarts.go

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

@@ -421,6 +421,7 @@ func GetOneLevelAllObjectUnderDir(bucket string, prefixRootPath string, relative
input := &obs.ListObjectsInput{}
input.Bucket = bucket
input.Prefix = prefixRootPath + relativePath
log.Info(input.Prefix)
if !strings.HasSuffix(input.Prefix, "/") {
input.Prefix += "/"
}


+ 1
- 0
routers/api/v1/repo/modelarts.go View File

@@ -472,6 +472,7 @@ func ModelList(ctx *context.APIContext) {
if task.ComputeResource == models.NPUResource {
//fileInfos, err = storage.GetObsListObject(task.JobName, "output/", parentDir, versionName)
prefix := strings.TrimPrefix(path.Join(setting.TrainJobModelPath, task.JobName, setting.OutPutPath, versionName), "/")
log.Info(prefix)
fileInfos, err = storage.GetOneLevelAllObjectUnderDir(setting.Bucket, prefix, parentDir)
if err != nil {
log.Info("get TrainJobListModel failed:", err)


Loading…
Cancel
Save