@daocloud-proto/baize 0.107.4 → 0.108.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/common/k8s.pb.ts CHANGED
@@ -11,6 +11,12 @@ export enum KubeVolumeVolumeType {
11
11
  DATASET_RUNTIME_ENV = "DATASET_RUNTIME_ENV",
12
12
  }
13
13
 
14
+ export enum KubeVolumeDataDirection {
15
+ DATA_DIRECTION_UNSPECIFIED = "DATA_DIRECTION_UNSPECIFIED",
16
+ INPUT = "INPUT",
17
+ OUTPUT = "OUTPUT",
18
+ }
19
+
14
20
  export type Resources = {
15
21
  requests?: {[key: string]: string}
16
22
  limits?: {[key: string]: string}
@@ -26,6 +32,7 @@ export type KubeVolume = {
26
32
  name?: string
27
33
  mountPath?: string
28
34
  readOnly?: boolean
35
+ dataDirection?: KubeVolumeDataDirection
29
36
  }
30
37
 
31
38
  export type PodConfig = {
@@ -238,7 +238,7 @@ export type DatasetSyncProcess = {
238
238
 
239
239
  export class DatasetManagement {
240
240
  static ListDatasets(req: ListDatasetRequest, initReq?: fm.InitReq): Promise<ListDatasetResponse> {
241
- return fm.fetchReq<ListDatasetRequest, ListDatasetResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/datasets?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace"])}`, {...initReq, method: "GET"})
241
+ return fm.fetchReq<ListDatasetRequest, ListDatasetResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/datasets?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
242
242
  }
243
243
  static GetDataset(req: SingleDatasetRequest, initReq?: fm.InitReq): Promise<Dataset> {
244
244
  return fm.fetchReq<SingleDatasetRequest, Dataset>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/datasets/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
@@ -0,0 +1,158 @@
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 BaizeCommonCommon from "../../../common/common.pb"
8
+ import * as fm from "../../../fetch.pb"
9
+ import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
10
+
11
+ export enum Scope {
12
+ SCOPE_UNKNOWN = "SCOPE_UNKNOWN",
13
+ SCOPE_GLOBAL = "SCOPE_GLOBAL",
14
+ SCOPE_WORKSPACE = "SCOPE_WORKSPACE",
15
+ }
16
+
17
+ export enum RegistryType {
18
+ REGISTRY_TYPE_UNSPECIFIED = "REGISTRY_TYPE_UNSPECIFIED",
19
+ REGISTRY_TYPE_HARBOR = "REGISTRY_TYPE_HARBOR",
20
+ REGISTRY_TYPE_DOCKER = "REGISTRY_TYPE_DOCKER",
21
+ REGISTRY_TYPE_JFROG = "REGISTRY_TYPE_JFROG",
22
+ }
23
+
24
+ export enum Visibility {
25
+ VISIBLE_UNKNOWN = "VISIBLE_UNKNOWN",
26
+ VISIBLE_PUBLIC = "VISIBLE_PUBLIC",
27
+ VISIBLE_PRIVATE = "VISIBLE_PRIVATE",
28
+ }
29
+
30
+ export type ListRegistriesRequest = {
31
+ workspace?: number
32
+ global?: boolean
33
+ page?: BaizeCommonCommon.Pagination
34
+ }
35
+
36
+ export type ListRegistriesResponse = {
37
+ items?: Registry[]
38
+ page?: BaizeCommonCommon.Pagination
39
+ }
40
+
41
+ export type Registry = {
42
+ host?: string
43
+ name?: string
44
+ type?: RegistryType
45
+ scope?: Scope
46
+ }
47
+
48
+ export type ListProjectsRequest = {
49
+ workspace?: number
50
+ registry?: string
51
+ public?: boolean
52
+ page?: BaizeCommonCommon.Pagination
53
+ onlyBind?: boolean
54
+ all?: boolean
55
+ }
56
+
57
+ export type ListProjectsResponse = {
58
+ items?: Project[]
59
+ page?: BaizeCommonCommon.Pagination
60
+ }
61
+
62
+ export type Project = {
63
+ name?: string
64
+ visible?: Visibility
65
+ }
66
+
67
+ export type ListRepositoriesRequest = {
68
+ workspace?: number
69
+ registry?: string
70
+ project?: string
71
+ page?: BaizeCommonCommon.Pagination
72
+ }
73
+
74
+ export type ListRepositoriesResponse = {
75
+ items?: Repository[]
76
+ page?: BaizeCommonCommon.Pagination
77
+ }
78
+
79
+ export type Repository = {
80
+ name?: string
81
+ updateTimestamp?: GoogleProtobufTimestamp.Timestamp
82
+ }
83
+
84
+ export type ListArtifactsRequest = {
85
+ workspace?: number
86
+ registry?: string
87
+ project?: string
88
+ repository?: string
89
+ page?: BaizeCommonCommon.Pagination
90
+ }
91
+
92
+ export type ListArtifactsResponse = {
93
+ items?: Artifact[]
94
+ page?: BaizeCommonCommon.Pagination
95
+ }
96
+
97
+ export type Artifact = {
98
+ digest?: string
99
+ tags?: Tag[]
100
+ imageSize?: string
101
+ creationTimestamp?: GoogleProtobufTimestamp.Timestamp
102
+ }
103
+
104
+ export type ProjectInfo = {
105
+ registry?: Registry
106
+ project?: Project
107
+ }
108
+
109
+ export type ArtifactInfo = {
110
+ registry?: Registry
111
+ project?: Project
112
+ repository?: Repository
113
+ artifact?: Artifact
114
+ }
115
+
116
+ export type Tag = {
117
+ name?: string
118
+ creationTimestamp?: GoogleProtobufTimestamp.Timestamp
119
+ }
120
+
121
+ export type ImageConfig = {
122
+ input?: InputImage
123
+ kangaroo?: KangarooImage
124
+ }
125
+
126
+ export type InputImage = {
127
+ name?: string
128
+ pullSecret?: string
129
+ }
130
+
131
+ export type KangarooImageMetadata = {
132
+ visible?: Visibility
133
+ scope?: Scope
134
+ }
135
+
136
+ export type KangarooImage = {
137
+ registry?: string
138
+ project?: string
139
+ image?: string
140
+ tag?: string
141
+ meta?: KangarooImageMetadata
142
+ registryName?: string
143
+ }
144
+
145
+ export class ImageService {
146
+ static ListRegistries(req: ListRegistriesRequest, initReq?: fm.InitReq): Promise<ListRegistriesResponse> {
147
+ return fm.fetchReq<ListRegistriesRequest, ListRegistriesResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/registries?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
148
+ }
149
+ static ListProjects(req: ListProjectsRequest, initReq?: fm.InitReq): Promise<ListProjectsResponse> {
150
+ return fm.fetchReq<ListProjectsRequest, ListProjectsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/projects?${fm.renderURLSearchParams(req, ["workspace", "registry"])}`, {...initReq, method: "GET"})
151
+ }
152
+ static ListProjectRepositories(req: ListRepositoriesRequest, initReq?: fm.InitReq): Promise<ListRepositoriesResponse> {
153
+ return fm.fetchReq<ListRepositoriesRequest, ListRepositoriesResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/projects/${req["project"]}/repositories?${fm.renderURLSearchParams(req, ["workspace", "registry", "project"])}`, {...initReq, method: "GET"})
154
+ }
155
+ static ListArtifacts(req: ListArtifactsRequest, initReq?: fm.InitReq): Promise<ListArtifactsResponse> {
156
+ return fm.fetchReq<ListArtifactsRequest, ListArtifactsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/projects/${req["project"]}/repositories/${req["repository"]}/artifacts?${fm.renderURLSearchParams(req, ["workspace", "registry", "project", "repository"])}`, {...initReq, method: "GET"})
157
+ }
158
+ }
@@ -5,6 +5,7 @@
5
5
  */
6
6
 
7
7
  import * as BaizeCommonK8s from "../../../common/k8s.pb"
8
+ import * as BaizeManagement_apiImageV1alpha1Image from "../../image/v1alpha1/image.pb"
8
9
 
9
10
  export enum QueueType {
10
11
  QUEUE_TYPE_UNSPECIFIED = "QUEUE_TYPE_UNSPECIFIED",
@@ -60,6 +61,7 @@ export type JobCreationBaseConfig = {
60
61
  workingDir?: string
61
62
  shmSize?: number
62
63
  noOverrideEnvPath?: boolean
64
+ imageConfig?: BaizeManagement_apiImageV1alpha1Image.ImageConfig
63
65
  }
64
66
 
65
67
  export type JobRoleDifferenceConfig = {
@@ -149,6 +149,15 @@ export type WorkloadGrafanaDashboardRequest = {
149
149
  to?: string
150
150
  }
151
151
 
152
+ export type InferenceServiceGrafanaDashboardRequest = {
153
+ workspace?: number
154
+ cluster?: string
155
+ namespace?: string
156
+ inference?: string
157
+ from?: string
158
+ to?: string
159
+ }
160
+
152
161
  export type GrafanaDashboard = {
153
162
  urlEN?: string
154
163
  urlZH?: string
@@ -186,4 +195,7 @@ export class MetricsService {
186
195
  static GetWorkloadGrafanaDashboard(req: WorkloadGrafanaDashboardRequest, initReq?: fm.InitReq): Promise<GrafanaDashboard> {
187
196
  return fm.fetchReq<WorkloadGrafanaDashboardRequest, GrafanaDashboard>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/grafana-dashboards?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace"])}`, {...initReq, method: "GET"})
188
197
  }
198
+ static GetInferenceServiceGrafanaDashboard(req: InferenceServiceGrafanaDashboardRequest, initReq?: fm.InitReq): Promise<GrafanaDashboard> {
199
+ return fm.fetchReq<InferenceServiceGrafanaDashboardRequest, GrafanaDashboard>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/inference-serving/${req["inference"]}/service-grafana-dashboards?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "inference"])}`, {...initReq, method: "GET"})
200
+ }
189
201
  }
@@ -9,6 +9,7 @@ import * as BaizeCommonK8s from "../../../common/k8s.pb"
9
9
  import * as fm from "../../../fetch.pb"
10
10
  import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
11
11
  import * as BaizeManagement_apiAnalysisV1alpha1Analysis from "../../analysis/v1alpha1/analysis.pb"
12
+ import * as BaizeManagement_apiImageV1alpha1Image from "../../image/v1alpha1/image.pb"
12
13
 
13
14
  type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
14
15
  type OneOf<T> =
@@ -70,6 +71,7 @@ export type NotebookConfig = {
70
71
  enableSSH?: boolean
71
72
  affinity?: BaizeCommonK8s.Affinity
72
73
  tolerationSeconds?: string
74
+ imageConfig?: BaizeManagement_apiImageV1alpha1Image.ImageConfig
73
75
  }
74
76
 
75
77
  export type NotebookStatus = {
@@ -91,6 +93,7 @@ export type Notebook = {
91
93
  priorityClass?: string
92
94
  analysis?: BaizeManagement_apiAnalysisV1alpha1Analysis.AnalysisConfig
93
95
  description?: string
96
+ snapshotConfig?: SnapshotConfig
94
97
  }
95
98
 
96
99
  export type ListNotebooksResponse = {
@@ -120,6 +123,12 @@ export type CreateNotebookRequest = {
120
123
  priorityClass?: string
121
124
  analysis?: BaizeManagement_apiAnalysisV1alpha1Analysis.AnalysisConfig
122
125
  description?: string
126
+ snapshotConfig?: SnapshotConfig
127
+ }
128
+
129
+ export type SnapshotConfig = {
130
+ autoSaveOnTermination?: boolean
131
+ imageConfig?: BaizeManagement_apiImageV1alpha1Image.ImageConfig
123
132
  }
124
133
 
125
134
  export type UpdateNotebookRequest = {
@@ -132,6 +141,7 @@ export type UpdateNotebookRequest = {
132
141
  priorityClass?: string
133
142
  analysis?: BaizeManagement_apiAnalysisV1alpha1Analysis.AnalysisConfig
134
143
  description?: string
144
+ snapshotConfig?: SnapshotConfig
135
145
  }
136
146
 
137
147
  export type NotebookActionRequest = {
@@ -142,6 +152,21 @@ export type NotebookActionRequest = {
142
152
  action?: NotebookActionRequestAction
143
153
  }
144
154
 
155
+ export type CreateNotebookSnapshotTaskRequest = {
156
+ workspace?: number
157
+ cluster?: string
158
+ namespace?: string
159
+ name?: string
160
+ }
161
+
162
+ export type SnapshotTask = {
163
+ workspace?: number
164
+ cluster?: string
165
+ namespace?: string
166
+ name?: string
167
+ triggerRound?: number
168
+ }
169
+
145
170
  export type NotebookImage = {
146
171
  name?: string
147
172
  type?: NotebookType
@@ -171,6 +196,9 @@ export class NotebookService {
171
196
  static NotebookDoAction(req: NotebookActionRequest, initReq?: fm.InitReq): Promise<Notebook> {
172
197
  return fm.fetchReq<NotebookActionRequest, Notebook>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/notebooks/${req["name"]}/actions`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
173
198
  }
199
+ static CreateNotebookSnapshotTask(req: CreateNotebookSnapshotTaskRequest, initReq?: fm.InitReq): Promise<SnapshotTask> {
200
+ return fm.fetchReq<CreateNotebookSnapshotTaskRequest, SnapshotTask>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/notebooks/${req["name"]}/snapshot`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
201
+ }
174
202
  static DeleteNotebook(req: SingleNotebookRequest, initReq?: fm.InitReq): Promise<Notebook> {
175
203
  return fm.fetchReq<SingleNotebookRequest, Notebook>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/notebooks/${req["name"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req, fm.replacer)})
176
204
  }
@@ -14,10 +14,11 @@ export enum ResourceType {
14
14
  PYTORCH = "PYTORCH",
15
15
  TENSORFLOW = "TENSORFLOW",
16
16
  PADDLE = "PADDLE",
17
- NOTEBOOK = "NOTEBOOK",
18
- INFERENCE = "INFERENCE",
19
17
  MXNET = "MXNET",
20
18
  MPI = "MPI",
19
+ NOTEBOOK = "NOTEBOOK",
20
+ INFERENCE = "INFERENCE",
21
+ DATASET = "DATASET",
21
22
  }
22
23
 
23
24
  export type PodRequest = {
@@ -216,7 +216,7 @@ export class InferenceServingManagement {
216
216
  return fm.fetchReq<SingleInferenceServingRequest, InferenceServing>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/inference-serving/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
217
217
  }
218
218
  static ListInferenceServings(req: ListInferenceServingsRequest, initReq?: fm.InitReq): Promise<ListInferenceServingsResponse> {
219
- return fm.fetchReq<ListInferenceServingsRequest, ListInferenceServingsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/inference-serving?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace"])}`, {...initReq, method: "GET"})
219
+ return fm.fetchReq<ListInferenceServingsRequest, ListInferenceServingsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/inference-serving?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
220
220
  }
221
221
  static UpdateInferenceServing(req: UpdateInferenceServingRequest, initReq?: fm.InitReq): Promise<InferenceServing> {
222
222
  return fm.fetchReq<UpdateInferenceServingRequest, InferenceServing>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/inference-serving/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/baize",
3
- "version": "v0.107.4",
3
+ "version": "v0.108.1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"