Browse Source

解决OBS下载多个文件时多了一个斜杠问题。

Signed-off-by: zouap <zouap@pcl.ac.cn>
pull/3437/head
zouap 2 years ago
parent
commit
12af2c2771
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      routers/repo/modelarts.go

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

@@ -2594,7 +2594,7 @@ func inferenceJobErrorNewDataPrepare(ctx *context.Context, form auth.CreateModel
waitCount := cloudbrain.GetWaitingCloudbrainCount(models.TypeCloudBrainTwo, "")
ctx.Data["WaitCount"] = waitCount
NotStopTaskCount, _ := cloudbrainTask.GetNotFinalStatusTaskCount(ctx.User.ID, models.TypeCloudBrainTwo, string(models.JobTypeInference))
ctx.Data["NotStopTaskCount"] = NotStopTaskCount
ctx.Data["NotStopTaskCount"] = NotStopTaskCount
return nil
}
func InferenceJobShow(ctx *context.Context) {
@@ -2674,6 +2674,8 @@ func MultiModelDownload(ctx *context.Context) {

if task.ComputeResource == models.NPUResource {
path := strings.TrimPrefix(path.Join(setting.TrainJobModelPath, task.JobName, setting.OutPutPath, versionName, parentDir), "/")
path = strings.TrimSuffix(path, "/")
path += "/"
allFile, err := storage.GetAllObjectByBucketAndPrefix(setting.Bucket, path)
if err == nil {
returnFileName := task.DisplayJobName + ".zip"


Loading…
Cancel
Save