@daocloud-proto/baize 0.104.3 → 0.105.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/management-api/dataset/v1alpha1/dataset.pb.ts +17 -1
- package/management-api/job/v1alpha1/common.pb.ts +16 -17
- package/management-api/job/v1alpha1/job.pb.ts +54 -17
- package/management-api/notebook/v1alpha1/notebook.pb.ts +3 -0
- package/management-api/pod/v1alpha1/pod.pb.ts +1 -0
- package/management-api/serving/v1alpha1/serving.pb.ts +1 -0
- package/package.json +1 -1
- package/management-api/job/v1alpha1/paddle.pb.ts +0 -34
- package/management-api/job/v1alpha1/pytorch.pb.ts +0 -34
- package/management-api/job/v1alpha1/tfjob.pb.ts +0 -36
|
@@ -24,6 +24,7 @@ export enum DataSourceType {
|
|
|
24
24
|
HTTP = "HTTP",
|
|
25
25
|
PVC = "PVC",
|
|
26
26
|
NFS = "NFS",
|
|
27
|
+
CONDA = "CONDA",
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export enum DatasetStatusPhase {
|
|
@@ -34,6 +35,12 @@ export enum DatasetStatusPhase {
|
|
|
34
35
|
FAILED = "FAILED",
|
|
35
36
|
}
|
|
36
37
|
|
|
38
|
+
export enum DataSourceOptionsCondaPackageManager {
|
|
39
|
+
PACKAGE_MANAGER_UNSPECIFIED = "PACKAGE_MANAGER_UNSPECIFIED",
|
|
40
|
+
PIP = "PIP",
|
|
41
|
+
CONDA = "CONDA",
|
|
42
|
+
}
|
|
43
|
+
|
|
37
44
|
export enum SecretOptionsAuthType {
|
|
38
45
|
AUTH_TYPE_UNSPECIFIED = "AUTH_TYPE_UNSPECIFIED",
|
|
39
46
|
BASIC = "BASIC",
|
|
@@ -94,12 +101,21 @@ export type DataSourceOptionsHttp = {
|
|
|
94
101
|
headers?: {[key: string]: string}
|
|
95
102
|
}
|
|
96
103
|
|
|
104
|
+
export type DataSourceOptionsConda = {
|
|
105
|
+
pythonVersion?: string
|
|
106
|
+
packageManager?: DataSourceOptionsCondaPackageManager
|
|
107
|
+
condaEnvironmentYml?: string
|
|
108
|
+
pipRequirementsTxt?: string
|
|
109
|
+
pipIndexUrl?: string
|
|
110
|
+
gpuType?: string
|
|
111
|
+
}
|
|
112
|
+
|
|
97
113
|
|
|
98
114
|
/* baize modified */ export type BaseDataSourceOptions = {
|
|
99
115
|
}
|
|
100
116
|
|
|
101
117
|
export type DataSourceOptions = BaseDataSourceOptions
|
|
102
|
-
& OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp }>
|
|
118
|
+
& OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda }>
|
|
103
119
|
|
|
104
120
|
export type SecretOptionsBasicAuth = {
|
|
105
121
|
username?: string
|
|
@@ -6,15 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
import * as BaizeCommonK8s from "../../../common/k8s.pb"
|
|
8
8
|
|
|
9
|
-
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
10
|
-
type OneOf<T> =
|
|
11
|
-
| { [k in keyof T]?: undefined }
|
|
12
|
-
| (
|
|
13
|
-
keyof T extends infer K ?
|
|
14
|
-
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
15
|
-
: never)
|
|
16
|
-
: never);
|
|
17
|
-
|
|
18
9
|
export enum QueueType {
|
|
19
10
|
QUEUE_TYPE_UNSPECIFIED = "QUEUE_TYPE_UNSPECIFIED",
|
|
20
11
|
KUEUE = "KUEUE",
|
|
@@ -35,28 +26,36 @@ export enum JobPhase {
|
|
|
35
26
|
SUSPENDED = "SUSPENDED",
|
|
36
27
|
}
|
|
37
28
|
|
|
29
|
+
export enum JobRole {
|
|
30
|
+
JOB_ROLE_UNSPECIFIED = "JOB_ROLE_UNSPECIFIED",
|
|
31
|
+
MASTER = "MASTER",
|
|
32
|
+
WORKER = "WORKER",
|
|
33
|
+
TF_CHIEF = "TF_CHIEF",
|
|
34
|
+
TF_PS = "TF_PS",
|
|
35
|
+
TF_WORKER = "TF_WORKER",
|
|
36
|
+
TF_EVALUATOR = "TF_EVALUATOR",
|
|
37
|
+
PD_MASTER = "PD_MASTER",
|
|
38
|
+
PD_WORKER = "PD_WORKER",
|
|
39
|
+
}
|
|
40
|
+
|
|
38
41
|
export type CommonConfig = {
|
|
39
42
|
queueType?: QueueType
|
|
40
43
|
taskQueue?: string
|
|
41
44
|
description?: string
|
|
42
45
|
}
|
|
43
46
|
|
|
44
|
-
|
|
45
|
-
/* baize modified */ export type BaseJobCreationBaseConfig = {
|
|
47
|
+
export type JobCreationBaseConfig = {
|
|
46
48
|
image?: string
|
|
47
49
|
imagePullSecret?: string
|
|
48
50
|
command?: string[]
|
|
49
51
|
args?: string[]
|
|
52
|
+
podConfig?: BaizeCommonK8s.PodConfig
|
|
50
53
|
labels?: {[key: string]: string}
|
|
51
54
|
annotations?: {[key: string]: string}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
affinity?: BaizeCommonK8s.Affinity
|
|
55
|
+
workingDir?: string
|
|
56
|
+
shmSize?: number
|
|
55
57
|
}
|
|
56
58
|
|
|
57
|
-
export type JobCreationBaseConfig = BaseJobCreationBaseConfig
|
|
58
|
-
& OneOf<{ tolerationSeconds: string }>
|
|
59
|
-
|
|
60
59
|
export type JobRoleDifferenceConfig = {
|
|
61
60
|
replicas?: number
|
|
62
61
|
resources?: BaizeCommonK8s.Resources
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
import * as BaizeCommonCommon from "../../../common/common.pb"
|
|
8
8
|
import * as BaizeCommonK8s from "../../../common/k8s.pb"
|
|
9
9
|
import * as fm from "../../../fetch.pb"
|
|
10
|
+
import * as GoogleProtobufStruct from "../../../google/protobuf/struct.pb"
|
|
11
|
+
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
10
12
|
import * as BaizeManagement_apiAnalysisV1alpha1Analysis from "../../analysis/v1alpha1/analysis.pb"
|
|
11
|
-
import * as
|
|
12
|
-
import * as BaizeManagement_apiJobV1alpha1Pytorch from "./pytorch.pb"
|
|
13
|
-
import * as BaizeManagement_apiJobV1alpha1Tfjob from "./tfjob.pb"
|
|
13
|
+
import * as BaizeManagement_apiJobV1alpha1Common from "./common.pb"
|
|
14
14
|
|
|
15
15
|
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
16
16
|
type OneOf<T> =
|
|
@@ -28,26 +28,42 @@ export enum JobType {
|
|
|
28
28
|
PADDLE = "PADDLE",
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
export enum RestartPolicy {
|
|
32
|
+
RESTART_POLICY_UNSPECIFIED = "RESTART_POLICY_UNSPECIFIED",
|
|
33
|
+
RESTART_POLICY_NEVER = "RESTART_POLICY_NEVER",
|
|
34
|
+
RESTART_POLICY_ON_FAILURE = "RESTART_POLICY_ON_FAILURE",
|
|
35
|
+
}
|
|
36
|
+
|
|
31
37
|
export enum JobActionRequestAction {
|
|
32
38
|
JOB_ACTION_UNSPECIFIED = "JOB_ACTION_UNSPECIFIED",
|
|
33
39
|
STOP = "STOP",
|
|
34
40
|
}
|
|
35
41
|
|
|
42
|
+
export enum JobSchedulersResponseSchedulerFeature {
|
|
43
|
+
FEATURE_UNSPECIFIED = "FEATURE_UNSPECIFIED",
|
|
44
|
+
BINPACK = "BINPACK",
|
|
45
|
+
GANG = "GANG",
|
|
46
|
+
FAIR = "FAIR",
|
|
47
|
+
}
|
|
36
48
|
|
|
37
|
-
|
|
49
|
+
export type Job = {
|
|
38
50
|
type?: JobType
|
|
39
|
-
|
|
40
|
-
|
|
51
|
+
cluster?: string
|
|
52
|
+
namespace?: string
|
|
53
|
+
name?: string
|
|
54
|
+
trainingMode?: BaizeManagement_apiJobV1alpha1Common.TrainingMode
|
|
55
|
+
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
56
|
+
jobSpec?: GoogleProtobufStruct.Struct
|
|
57
|
+
description?: string
|
|
58
|
+
baseConfig?: BaizeManagement_apiJobV1alpha1Common.JobCreationBaseConfig
|
|
59
|
+
roleConfig?: {[key: string]: BaizeManagement_apiJobV1alpha1Common.JobRoleDifferenceConfig}
|
|
60
|
+
phase?: BaizeManagement_apiJobV1alpha1Common.JobPhase
|
|
41
61
|
runningDuration?: number
|
|
42
62
|
totalResources?: BaizeCommonK8s.Resources
|
|
43
|
-
affinity?: BaizeCommonK8s.Affinity
|
|
44
63
|
analysis?: BaizeManagement_apiAnalysisV1alpha1Analysis.AnalysisConfig
|
|
64
|
+
trainingConfig?: TrainingConfig
|
|
45
65
|
}
|
|
46
66
|
|
|
47
|
-
export type Job = BaseJob
|
|
48
|
-
& OneOf<{ pytorch: BaizeManagement_apiJobV1alpha1Pytorch.PyTorchJob; tensorflow: BaizeManagement_apiJobV1alpha1Tfjob.TFJob; paddle: BaizeManagement_apiJobV1alpha1Paddle.PaddleJob }>
|
|
49
|
-
& OneOf<{ tolerationSeconds: string }>
|
|
50
|
-
|
|
51
67
|
export type ListJobsRequest = {
|
|
52
68
|
workspace?: number
|
|
53
69
|
type?: JobType
|
|
@@ -69,21 +85,28 @@ export type SingleJobRequest = {
|
|
|
69
85
|
name?: string
|
|
70
86
|
}
|
|
71
87
|
|
|
72
|
-
|
|
73
|
-
/* baize modified */ export type BaseCreateJobRequest = {
|
|
88
|
+
export type CreateJobRequest = {
|
|
74
89
|
workspace?: number
|
|
75
90
|
type?: JobType
|
|
76
91
|
cluster?: string
|
|
77
92
|
namespace?: string
|
|
78
93
|
name?: string
|
|
79
94
|
description?: string
|
|
80
|
-
|
|
81
|
-
|
|
95
|
+
baseConfig?: BaizeManagement_apiJobV1alpha1Common.JobCreationBaseConfig
|
|
96
|
+
trainingMode?: BaizeManagement_apiJobV1alpha1Common.TrainingMode
|
|
97
|
+
roleConfig?: {[key: string]: BaizeManagement_apiJobV1alpha1Common.JobRoleDifferenceConfig}
|
|
82
98
|
analysis?: BaizeManagement_apiAnalysisV1alpha1Analysis.AnalysisConfig
|
|
99
|
+
trainingConfig?: TrainingConfig
|
|
83
100
|
}
|
|
84
101
|
|
|
85
|
-
|
|
86
|
-
|
|
102
|
+
|
|
103
|
+
/* baize modified */ export type BaseTrainingConfig = {
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export type TrainingConfig = BaseTrainingConfig
|
|
107
|
+
& OneOf<{ restartPolicy: RestartPolicy }>
|
|
108
|
+
& OneOf<{ maxRetries: number }>
|
|
109
|
+
& OneOf<{ maxTrainingDuration: string }>
|
|
87
110
|
|
|
88
111
|
export type JobActionRequest = {
|
|
89
112
|
workspace?: number
|
|
@@ -94,6 +117,17 @@ export type JobActionRequest = {
|
|
|
94
117
|
action?: JobActionRequestAction
|
|
95
118
|
}
|
|
96
119
|
|
|
120
|
+
export type JobSchedulersResponseScheduler = {
|
|
121
|
+
default?: boolean
|
|
122
|
+
name?: string
|
|
123
|
+
alias?: string
|
|
124
|
+
enabledFeatures?: JobSchedulersResponseSchedulerFeature[]
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export type JobSchedulersResponse = {
|
|
128
|
+
items?: JobSchedulersResponseScheduler[]
|
|
129
|
+
}
|
|
130
|
+
|
|
97
131
|
export class JobsManagement {
|
|
98
132
|
static ListJobs(req: ListJobsRequest, initReq?: fm.InitReq): Promise<ListJobsResponse> {
|
|
99
133
|
return fm.fetchReq<ListJobsRequest, ListJobsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/jobs?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
@@ -110,4 +144,7 @@ export class JobsManagement {
|
|
|
110
144
|
static DoJobAction(req: JobActionRequest, initReq?: fm.InitReq): Promise<Job> {
|
|
111
145
|
return fm.fetchReq<JobActionRequest, Job>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/jobs/${req["name"]}/actions`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
112
146
|
}
|
|
147
|
+
static ListSchedulers(req: CreateJobRequest, initReq?: fm.InitReq): Promise<JobSchedulersResponse> {
|
|
148
|
+
return fm.fetchReq<CreateJobRequest, JobSchedulersResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/jobs/${req["name"]}/schedulers`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
149
|
+
}
|
|
113
150
|
}
|
|
@@ -57,6 +57,9 @@ export type NotebookConfig = {
|
|
|
57
57
|
kubeVolumes?: BaizeCommonK8s.KubeVolume[]
|
|
58
58
|
runAsRoot?: boolean
|
|
59
59
|
serviceType?: NotebookConfigServiceType
|
|
60
|
+
enableSSH?: boolean
|
|
61
|
+
affinity?: BaizeCommonK8s.Affinity
|
|
62
|
+
tolerationSeconds?: string
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
export type NotebookStatus = {
|
|
@@ -119,6 +119,7 @@ export type InferenceServing = {
|
|
|
119
119
|
podConfig?: BaizeCommonK8s.PodConfig
|
|
120
120
|
status?: InferenceServingStatus
|
|
121
121
|
lastUpdated?: GoogleProtobufTimestamp.Timestamp
|
|
122
|
+
authType?: ServingAuthAuthType
|
|
122
123
|
}
|
|
123
124
|
|
|
124
125
|
export type InferenceServingStatusModelStatus = {
|
package/package.json
CHANGED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
/*
|
|
4
|
-
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import * as GoogleProtobufStruct from "../../../google/protobuf/struct.pb"
|
|
8
|
-
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
9
|
-
import * as BaizeManagement_apiJobV1alpha1Common from "./common.pb"
|
|
10
|
-
|
|
11
|
-
export enum PaddleRole {
|
|
12
|
-
PADDLE_ROLE_UNSPECIFIED = "PADDLE_ROLE_UNSPECIFIED",
|
|
13
|
-
PD_MASTER = "PD_MASTER",
|
|
14
|
-
PD_WORKER = "PD_WORKER",
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export type PaddleJob = {
|
|
18
|
-
cluster?: string
|
|
19
|
-
namespace?: string
|
|
20
|
-
name?: string
|
|
21
|
-
trainingMode?: BaizeManagement_apiJobV1alpha1Common.TrainingMode
|
|
22
|
-
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
23
|
-
phase?: BaizeManagement_apiJobV1alpha1Common.JobPhase
|
|
24
|
-
labels?: {[key: string]: string}
|
|
25
|
-
annotations?: {[key: string]: string}
|
|
26
|
-
jobSpec?: GoogleProtobufStruct.Struct
|
|
27
|
-
description?: string
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export type PaddleJobCreationConfig = {
|
|
31
|
-
trainingMode?: BaizeManagement_apiJobV1alpha1Common.TrainingMode
|
|
32
|
-
baseConfig?: BaizeManagement_apiJobV1alpha1Common.JobCreationBaseConfig
|
|
33
|
-
roleConfig?: {[key: string]: BaizeManagement_apiJobV1alpha1Common.JobRoleDifferenceConfig}
|
|
34
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
/*
|
|
4
|
-
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import * as GoogleProtobufStruct from "../../../google/protobuf/struct.pb"
|
|
8
|
-
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
9
|
-
import * as BaizeManagement_apiJobV1alpha1Common from "./common.pb"
|
|
10
|
-
|
|
11
|
-
export enum PyTorchRole {
|
|
12
|
-
PYTORCH_ROLE_UNSPECIFIED = "PYTORCH_ROLE_UNSPECIFIED",
|
|
13
|
-
MASTER = "MASTER",
|
|
14
|
-
WORKER = "WORKER",
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export type PyTorchJob = {
|
|
18
|
-
cluster?: string
|
|
19
|
-
namespace?: string
|
|
20
|
-
name?: string
|
|
21
|
-
trainingMode?: BaizeManagement_apiJobV1alpha1Common.TrainingMode
|
|
22
|
-
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
23
|
-
phase?: BaizeManagement_apiJobV1alpha1Common.JobPhase
|
|
24
|
-
labels?: {[key: string]: string}
|
|
25
|
-
annotations?: {[key: string]: string}
|
|
26
|
-
jobSpec?: GoogleProtobufStruct.Struct
|
|
27
|
-
description?: string
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export type PytorchJobCreationConfig = {
|
|
31
|
-
trainingMode?: BaizeManagement_apiJobV1alpha1Common.TrainingMode
|
|
32
|
-
baseConfig?: BaizeManagement_apiJobV1alpha1Common.JobCreationBaseConfig
|
|
33
|
-
roleConfig?: {[key: string]: BaizeManagement_apiJobV1alpha1Common.JobRoleDifferenceConfig}
|
|
34
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
/*
|
|
4
|
-
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import * as GoogleProtobufStruct from "../../../google/protobuf/struct.pb"
|
|
8
|
-
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
9
|
-
import * as BaizeManagement_apiJobV1alpha1Common from "./common.pb"
|
|
10
|
-
|
|
11
|
-
export enum TFRole {
|
|
12
|
-
TF_ROLE_UNSPECIFIED = "TF_ROLE_UNSPECIFIED",
|
|
13
|
-
TF_CHIEF = "TF_CHIEF",
|
|
14
|
-
TF_PS = "TF_PS",
|
|
15
|
-
TF_WORKER = "TF_WORKER",
|
|
16
|
-
TF_EVALUATOR = "TF_EVALUATOR",
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type TFJob = {
|
|
20
|
-
cluster?: string
|
|
21
|
-
namespace?: string
|
|
22
|
-
name?: string
|
|
23
|
-
trainingMode?: BaizeManagement_apiJobV1alpha1Common.TrainingMode
|
|
24
|
-
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
25
|
-
phase?: BaizeManagement_apiJobV1alpha1Common.JobPhase
|
|
26
|
-
labels?: {[key: string]: string}
|
|
27
|
-
annotations?: {[key: string]: string}
|
|
28
|
-
jobSpec?: GoogleProtobufStruct.Struct
|
|
29
|
-
description?: string
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export type TFJobCreationConfig = {
|
|
33
|
-
trainingMode?: BaizeManagement_apiJobV1alpha1Common.TrainingMode
|
|
34
|
-
baseConfig?: BaizeManagement_apiJobV1alpha1Common.JobCreationBaseConfig
|
|
35
|
-
roleConfig?: {[key: string]: BaizeManagement_apiJobV1alpha1Common.JobRoleDifferenceConfig}
|
|
36
|
-
}
|