diff --git a/models/cloudbrain.go b/models/cloudbrain.go index cb2bd2837..a517a7edf 100755 --- a/models/cloudbrain.go +++ b/models/cloudbrain.go @@ -1045,7 +1045,7 @@ type CreateUserImageTrainJobParams struct { Description string `json:"job_desc"` Config UserImageConfig `json:"config"` WorkspaceID string `json:"workspace_id"` - Volume Volumes `json:"volumes"` + DataMount Nfs `json:"volumes"` } type UserImageConfig struct { @@ -1064,11 +1064,11 @@ type UserImageConfig struct { } type CreateTrainJobParams struct { - JobName string `json:"job_name"` - Description string `json:"job_desc"` - Config Config `json:"config"` - WorkspaceID string `json:"workspace_id"` - Volume Volumes `json:"volumes"` + JobName string `json:"job_name"` + Description string `json:"job_desc"` + Config Config `json:"config"` + WorkspaceID string `json:"workspace_id"` + DataMount Nfs `json:"volumes"` } type Config struct { @@ -1215,8 +1215,8 @@ type Volumes struct { type Nfs struct { ID string `json:"id"` - SourcePath string `json:"src_path"` - DestPath string `json:"dest_path"` + SourcePath string `json:"nfs_server_path"` + DestPath string `json:"local_path"` ReadOnly bool `json:"read_only"` } diff --git a/modules/modelarts/modelarts.go b/modules/modelarts/modelarts.go index 41d9c57d2..39fdb6afc 100755 --- a/modules/modelarts/modelarts.go +++ b/modules/modelarts/modelarts.go @@ -377,12 +377,10 @@ func GenerateTrainJob(ctx *context.Context, req *GenerateTrainJobReq) (jobId str UserImageUrl: req.UserImageUrl, UserCommand: req.UserCommand, }, - Volume: models.Volumes{ - Nfs: models.Nfs{ - SourcePath: VolumeSourcePath, - DestPath: VolumeDestPath, - ReadOnly: false, - }, + DataMount: models.Nfs{ + SourcePath: VolumeSourcePath, + DestPath: VolumeDestPath, + ReadOnly: false, }, }) } else { @@ -404,12 +402,10 @@ func GenerateTrainJob(ctx *context.Context, req *GenerateTrainJobReq) (jobId str }, Parameter: req.Parameters, }, - Volume: models.Volumes{ - Nfs: models.Nfs{ - SourcePath: VolumeSourcePath, - DestPath: VolumeDestPath, - ReadOnly: false, - }, + DataMount: models.Nfs{ + SourcePath: VolumeSourcePath, + DestPath: VolumeDestPath, + ReadOnly: false, }, }) }