Browse Source

add

tags/v1.22.12.1^2
Gitea 3 years ago
parent
commit
b8281eb89b
2 changed files with 5 additions and 5 deletions
  1. +1
    -0
      models/cloudbrain.go
  2. +4
    -5
      modules/modelarts/resty.go

+ 1
- 0
models/cloudbrain.go View File

@@ -1181,6 +1181,7 @@ type CreateConfigParams struct {
LogUrl string `json:"log_url"`
Flavor Flavor `json:"flavor"`
PoolID string `json:"pool_id"`
Volumes Volumes `json:"volumes"`
}

type Parameter struct {


+ 4
- 5
modules/modelarts/resty.go View File

@@ -483,8 +483,7 @@ func createTrainJobUserImage(createJobParams models.CreateUserImageTrainJobParam
var result models.CreateTrainJobResult

retry := 0
log.Info("abcd", createJobParams)
fmt.Print("abcd", createJobParams)

sendjob:
res, err := client.R().
SetHeader("Content-Type", "application/json").
@@ -499,6 +498,7 @@ sendjob:

req, _ := json.Marshal(createJobParams)
log.Info("%s", req)
log.Info("postapi detail: %s", string(req))

if res.StatusCode() == http.StatusUnauthorized && retry < 1 {
retry++
@@ -544,9 +544,7 @@ func createTrainJob(createJobParams models.CreateTrainJobParams) (*models.Create
var result models.CreateTrainJobResult

retry := 0

log.Info("abcd", createJobParams)
fmt.Print("abcd", createJobParams)
log.Info("postapi detail: %s", createJobParams)

sendjob:
res, err := client.R().
@@ -759,6 +757,7 @@ func CreateTrainJobConfig(req models.CreateConfigParams) (*models.CreateTrainJob
var result models.CreateTrainJobConfigResult

retry := 0
log.Info("postapi detail: %s", req)

sendjob:
res, err := client.R().


Loading…
Cancel
Save