@daocloud-proto/baize 0.105.0 → 0.105.2

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.
@@ -4,16 +4,54 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
+ import * as BaizeCommonCommon from "../../../common/common.pb"
7
8
  import * as BaizeCommonK8s from "../../../common/k8s.pb"
9
+ import * as fm from "../../../fetch.pb"
8
10
 
9
- export enum AnalysisConfigType {
11
+ export enum AnalysisType {
10
12
  TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
11
13
  TENSORBOARD = "TENSORBOARD",
12
14
  }
13
15
 
14
16
  export type AnalysisConfig = {
15
17
  enabled?: boolean
16
- type?: AnalysisConfigType
18
+ type?: AnalysisType
17
19
  kubeVolumes?: BaizeCommonK8s.KubeVolume[]
18
20
  logPath?: string
21
+ }
22
+
23
+ export type AnalysisStatus = {
24
+ accessUrl?: string
25
+ message?: string
26
+ }
27
+
28
+ export type Analysis = {
29
+ workspace?: number
30
+ cluster?: string
31
+ namespace?: string
32
+ name?: string
33
+ queueName?: string
34
+ type?: AnalysisType
35
+ kubeVolumes?: BaizeCommonK8s.KubeVolume[]
36
+ logPath?: string
37
+ status?: AnalysisStatus
38
+ }
39
+
40
+ export type ListAnalysisRequest = {
41
+ workspace?: number
42
+ cluster?: string
43
+ namespace?: string
44
+ queueName?: string
45
+ page?: BaizeCommonCommon.Pagination
46
+ }
47
+
48
+ export type ListAnalysisResponse = {
49
+ items?: Analysis[]
50
+ page?: BaizeCommonCommon.Pagination
51
+ }
52
+
53
+ export class AnalysisManagement {
54
+ static ListAnalysis(req: ListAnalysisRequest, initReq?: fm.InitReq): Promise<ListAnalysisResponse> {
55
+ return fm.fetchReq<ListAnalysisRequest, ListAnalysisResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/analysis?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
56
+ }
19
57
  }
@@ -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
@@ -52,6 +52,8 @@ export type JobCreationBaseConfig = {
52
52
  podConfig?: BaizeCommonK8s.PodConfig
53
53
  labels?: {[key: string]: string}
54
54
  annotations?: {[key: string]: string}
55
+ workingDir?: string
56
+ shmSize?: number
55
57
  }
56
58
 
57
59
  export type JobRoleDifferenceConfig = {
@@ -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,9 +28,15 @@ 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
- STOP = "STOP",
39
+ RESTART = "RESTART",
25
40
  }
26
41
 
27
42
  export enum JobSchedulersResponseSchedulerFeature {
@@ -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?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
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
  }
@@ -58,6 +58,8 @@ export type NotebookConfig = {
58
58
  runAsRoot?: boolean
59
59
  serviceType?: NotebookConfigServiceType
60
60
  enableSSH?: boolean
61
+ affinity?: BaizeCommonK8s.Affinity
62
+ tolerationSeconds?: string
61
63
  }
62
64
 
63
65
  export type NotebookStatus = {
@@ -15,6 +15,7 @@ export enum ResourceType {
15
15
  TENSORFLOW = "TENSORFLOW",
16
16
  PADDLE = "PADDLE",
17
17
  NOTEBOOK = "NOTEBOOK",
18
+ INFERENCE = "INFERENCE",
18
19
  }
19
20
 
20
21
  export type PodRequest = {
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/baize",
3
- "version": "v0.105.0",
3
+ "version": "v0.105.2",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"