Browse Source

add

tags/v1.22.12.1^2
Gitea 3 years ago
parent
commit
5055eb8e5f
2 changed files with 27 additions and 9 deletions
  1. +25
    -9
      modules/modelarts/modelarts.go
  2. +2
    -0
      modules/modelarts/resty.go

+ 25
- 9
modules/modelarts/modelarts.go View File

@@ -67,9 +67,11 @@ const (
ConfigTypeCustom = "custom"
TotalVersionCount = 1

VolumeID = "c6a73891-6a19-4a6a-a2e8-0d6baa72a7c5"
VolumeSourcePath = "192.168.0.30:/"
VolumeDestPath = "/cache/sfs"
NfsID = "c6a73891-6a19-4a6a-a2e8-0d6baa72a7c5"
NfsSourcePath = "192.168.0.30:/"
NfsDestPath = "/cache/sfs"
HostSourcePath = "/mnt/sfs_turbo/data"
HostDestPath = "/cache/host"
)

var (
@@ -380,9 +382,16 @@ func GenerateTrainJob(ctx *context.Context, req *GenerateTrainJobReq) (jobId str
Volumes: []models.Volumes{
{
Nfs: models.Nfs{
ID: VolumeID,
SourcePath: VolumeSourcePath,
DestPath: VolumeDestPath,
ID: NfsID,
SourcePath: NfsSourcePath,
DestPath: NfsDestPath,
ReadOnly: false,
},
},
{
HostPath: models.HostPath{
SourcePath: HostSourcePath,
DestPath: HostDestPath,
ReadOnly: false,
},
},
@@ -410,9 +419,16 @@ func GenerateTrainJob(ctx *context.Context, req *GenerateTrainJobReq) (jobId str
Volumes: []models.Volumes{
{
Nfs: models.Nfs{
ID: VolumeID,
SourcePath: VolumeSourcePath,
DestPath: VolumeDestPath,
ID: NfsID,
SourcePath: NfsSourcePath,
DestPath: NfsDestPath,
ReadOnly: false,
},
},
{
HostPath: models.HostPath{
SourcePath: HostSourcePath,
DestPath: HostDestPath,
ReadOnly: false,
},
},


+ 2
- 0
modules/modelarts/resty.go View File

@@ -546,6 +546,8 @@ func createTrainJob(createJobParams models.CreateTrainJobParams) (*models.Create

retry := 0

log.Info("postapi detail", createJobParams.Config.Volumes)

sendjob:
res, err := client.R().
SetHeader("Content-Type", "application/json").


Loading…
Cancel
Save