@daocloud-proto/baize 0.105.0 → 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 +2 -0
- package/management-api/job/v1alpha1/job.pb.ts +27 -1
- package/management-api/notebook/v1alpha1/notebook.pb.ts +2 -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
|
@@ -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
|
|
@@ -12,6 +12,15 @@ import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
|
12
12
|
import * as BaizeManagement_apiAnalysisV1alpha1Analysis from "../../analysis/v1alpha1/analysis.pb"
|
|
13
13
|
import * as BaizeManagement_apiJobV1alpha1Common from "./common.pb"
|
|
14
14
|
|
|
15
|
+
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
16
|
+
type OneOf<T> =
|
|
17
|
+
| { [k in keyof T]?: undefined }
|
|
18
|
+
| (
|
|
19
|
+
keyof T extends infer K ?
|
|
20
|
+
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
21
|
+
: never)
|
|
22
|
+
: never);
|
|
23
|
+
|
|
15
24
|
export enum JobType {
|
|
16
25
|
JOB_TYPE_UNSPECIFIED = "JOB_TYPE_UNSPECIFIED",
|
|
17
26
|
PYTORCH = "PYTORCH",
|
|
@@ -19,6 +28,12 @@ export enum JobType {
|
|
|
19
28
|
PADDLE = "PADDLE",
|
|
20
29
|
}
|
|
21
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
|
+
|
|
22
37
|
export enum JobActionRequestAction {
|
|
23
38
|
JOB_ACTION_UNSPECIFIED = "JOB_ACTION_UNSPECIFIED",
|
|
24
39
|
STOP = "STOP",
|
|
@@ -46,6 +61,7 @@ export type Job = {
|
|
|
46
61
|
runningDuration?: number
|
|
47
62
|
totalResources?: BaizeCommonK8s.Resources
|
|
48
63
|
analysis?: BaizeManagement_apiAnalysisV1alpha1Analysis.AnalysisConfig
|
|
64
|
+
trainingConfig?: TrainingConfig
|
|
49
65
|
}
|
|
50
66
|
|
|
51
67
|
export type ListJobsRequest = {
|
|
@@ -80,8 +96,18 @@ export type CreateJobRequest = {
|
|
|
80
96
|
trainingMode?: BaizeManagement_apiJobV1alpha1Common.TrainingMode
|
|
81
97
|
roleConfig?: {[key: string]: BaizeManagement_apiJobV1alpha1Common.JobRoleDifferenceConfig}
|
|
82
98
|
analysis?: BaizeManagement_apiAnalysisV1alpha1Analysis.AnalysisConfig
|
|
99
|
+
trainingConfig?: TrainingConfig
|
|
83
100
|
}
|
|
84
101
|
|
|
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 }>
|
|
110
|
+
|
|
85
111
|
export type JobActionRequest = {
|
|
86
112
|
workspace?: number
|
|
87
113
|
type?: JobType
|
|
@@ -119,6 +145,6 @@ export class JobsManagement {
|
|
|
119
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)})
|
|
120
146
|
}
|
|
121
147
|
static ListSchedulers(req: CreateJobRequest, initReq?: fm.InitReq): Promise<JobSchedulersResponse> {
|
|
122
|
-
return fm.fetchReq<CreateJobRequest, JobSchedulersResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/jobs/${req["name"]}/schedulers
|
|
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)})
|
|
123
149
|
}
|
|
124
150
|
}
|
|
@@ -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 = {
|