Browse Source

mod notebook interface

tags/1.13.6
lewis 4 years ago
parent
commit
f8f0ce63a9
2 changed files with 17 additions and 1 deletions
  1. +7
    -0
      models/cloudbrain.go
  2. +10
    -1
      modules/modelarts/modelarts.go

+ 7
- 0
models/cloudbrain.go View File

@@ -301,6 +301,13 @@ type CreateNotebookParams struct {
Flavor string `json:"flavor"` Flavor string `json:"flavor"`
Spec Spec `json:"spec"` Spec Spec `json:"spec"`
Workspace Workspace `json:"workspace"` Workspace Workspace `json:"workspace"`
Pool Pool `json:"pool"`
}

type Pool struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
} }


type Workspace struct { type Workspace struct {


+ 10
- 1
modules/modelarts/modelarts.go View File

@@ -13,7 +13,11 @@ const (
storageTypeOBS = "obs" storageTypeOBS = "obs"
autoStopDuration = 4 * 60 * 60 autoStopDuration = 4 * 60 * 60
flavor = "modelarts.kat1.xlarge" flavor = "modelarts.kat1.xlarge"
profileID = "Python3-ascend910-arm"
//profileID = "Python3-ascend910-arm"
profileID = "efa847c0-7359-11eb-b34f-0255ac100057"
poolID = "pool1328035d"
poolName = "train-private-1"
poolType = "USER_DEFINED"


DataSetMountPath = "/home/ma-user/work" DataSetMountPath = "/home/ma-user/work"
NotebookEnv = "Python3" NotebookEnv = "Python3"
@@ -28,6 +32,11 @@ func GenerateTask(ctx *context.Context, jobName, uuid, description string) error
Description:description, Description:description,
ProfileID: profileID, ProfileID: profileID,
Flavor: flavor, Flavor: flavor,
Pool: models.Pool{
ID: poolID,
Name: poolName,
Type: poolType,
},
Spec: models.Spec{ Spec: models.Spec{
Storage: models.Storage{ Storage: models.Storage{
Type: storageTypeOBS, Type: storageTypeOBS,


Loading…
Cancel
Save