@daocloud-proto/baize 0.108.0 → 0.108.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.
@@ -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"})
@@ -8,6 +8,12 @@ import * as BaizeCommonCommon from "../../../common/common.pb"
8
8
  import * as fm from "../../../fetch.pb"
9
9
  import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
10
10
 
11
+ export enum Scope {
12
+ SCOPE_UNKNOWN = "SCOPE_UNKNOWN",
13
+ SCOPE_GLOBAL = "SCOPE_GLOBAL",
14
+ SCOPE_WORKSPACE = "SCOPE_WORKSPACE",
15
+ }
16
+
11
17
  export enum RegistryType {
12
18
  REGISTRY_TYPE_UNSPECIFIED = "REGISTRY_TYPE_UNSPECIFIED",
13
19
  REGISTRY_TYPE_HARBOR = "REGISTRY_TYPE_HARBOR",
@@ -15,8 +21,14 @@ export enum RegistryType {
15
21
  REGISTRY_TYPE_JFROG = "REGISTRY_TYPE_JFROG",
16
22
  }
17
23
 
24
+ export enum Visibility {
25
+ VISIBLE_UNKNOWN = "VISIBLE_UNKNOWN",
26
+ VISIBLE_PUBLIC = "VISIBLE_PUBLIC",
27
+ VISIBLE_PRIVATE = "VISIBLE_PRIVATE",
28
+ }
29
+
18
30
  export type ListRegistriesRequest = {
19
- workspace?: string
31
+ workspace?: number
20
32
  global?: boolean
21
33
  page?: BaizeCommonCommon.Pagination
22
34
  }
@@ -30,10 +42,11 @@ export type Registry = {
30
42
  host?: string
31
43
  name?: string
32
44
  type?: RegistryType
45
+ scope?: Scope
33
46
  }
34
47
 
35
48
  export type ListProjectsRequest = {
36
- workspace?: string
49
+ workspace?: number
37
50
  registry?: string
38
51
  public?: boolean
39
52
  page?: BaizeCommonCommon.Pagination
@@ -48,13 +61,13 @@ export type ListProjectsResponse = {
48
61
 
49
62
  export type Project = {
50
63
  name?: string
64
+ visible?: Visibility
51
65
  }
52
66
 
53
67
  export type ListRepositoriesRequest = {
54
- workspace?: string
68
+ workspace?: number
55
69
  registry?: string
56
70
  project?: string
57
- showArtifacts?: boolean
58
71
  page?: BaizeCommonCommon.Pagination
59
72
  }
60
73
 
@@ -65,13 +78,11 @@ export type ListRepositoriesResponse = {
65
78
 
66
79
  export type Repository = {
67
80
  name?: string
68
- public?: boolean
69
81
  updateTimestamp?: GoogleProtobufTimestamp.Timestamp
70
- artifacts?: Artifact[]
71
82
  }
72
83
 
73
84
  export type ListArtifactsRequest = {
74
- workspace?: string
85
+ workspace?: number
75
86
  registry?: string
76
87
  project?: string
77
88
  repository?: string
@@ -90,19 +101,45 @@ export type Artifact = {
90
101
  creationTimestamp?: GoogleProtobufTimestamp.Timestamp
91
102
  }
92
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
+
93
116
  export type Tag = {
94
117
  name?: string
95
118
  creationTimestamp?: GoogleProtobufTimestamp.Timestamp
96
119
  }
97
120
 
98
- export type ImageInfo = {
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 = {
99
137
  registry?: string
100
138
  project?: string
101
139
  image?: string
102
140
  tag?: string
103
- public?: boolean
104
- global?: boolean
105
- origin?: string
141
+ meta?: KangarooImageMetadata
142
+ registryName?: string
106
143
  }
107
144
 
108
145
  export class ImageService {
@@ -61,10 +61,14 @@ export type JobCreationBaseConfig = {
61
61
  workingDir?: string
62
62
  shmSize?: number
63
63
  noOverrideEnvPath?: boolean
64
- imageInfo?: BaizeManagement_apiImageV1alpha1Image.ImageInfo
64
+ imageConfig?: BaizeManagement_apiImageV1alpha1Image.ImageConfig
65
65
  }
66
66
 
67
67
  export type JobRoleDifferenceConfig = {
68
68
  replicas?: number
69
69
  resources?: BaizeCommonK8s.Resources
70
+ }
71
+
72
+ export type RecoveryConfig = {
73
+ enable?: boolean
70
74
  }
@@ -65,6 +65,7 @@ export type Job = {
65
65
  totalResources?: BaizeCommonK8s.Resources
66
66
  analysis?: BaizeManagement_apiAnalysisV1alpha1Analysis.AnalysisConfig
67
67
  trainingConfig?: TrainingConfig
68
+ recoveryConfig?: BaizeManagement_apiJobV1alpha1Common.RecoveryConfig
68
69
  }
69
70
 
70
71
  export type ListJobsRequest = {
@@ -104,6 +105,7 @@ export type CreateJobRequest = {
104
105
  roleConfig?: {[key: string]: BaizeManagement_apiJobV1alpha1Common.JobRoleDifferenceConfig}
105
106
  analysis?: BaizeManagement_apiAnalysisV1alpha1Analysis.AnalysisConfig
106
107
  trainingConfig?: TrainingConfig
108
+ recoveryConfig?: BaizeManagement_apiJobV1alpha1Common.RecoveryConfig
107
109
  }
108
110
 
109
111
 
@@ -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
  }
@@ -71,7 +71,7 @@ export type NotebookConfig = {
71
71
  enableSSH?: boolean
72
72
  affinity?: BaizeCommonK8s.Affinity
73
73
  tolerationSeconds?: string
74
- imageInfo?: BaizeManagement_apiImageV1alpha1Image.ImageInfo
74
+ imageConfig?: BaizeManagement_apiImageV1alpha1Image.ImageConfig
75
75
  }
76
76
 
77
77
  export type NotebookStatus = {
@@ -93,6 +93,7 @@ export type Notebook = {
93
93
  priorityClass?: string
94
94
  analysis?: BaizeManagement_apiAnalysisV1alpha1Analysis.AnalysisConfig
95
95
  description?: string
96
+ snapshotConfig?: SnapshotConfig
96
97
  }
97
98
 
98
99
  export type ListNotebooksResponse = {
@@ -122,6 +123,12 @@ export type CreateNotebookRequest = {
122
123
  priorityClass?: string
123
124
  analysis?: BaizeManagement_apiAnalysisV1alpha1Analysis.AnalysisConfig
124
125
  description?: string
126
+ snapshotConfig?: SnapshotConfig
127
+ }
128
+
129
+ export type SnapshotConfig = {
130
+ autoSaveOnTermination?: boolean
131
+ imageConfig?: BaizeManagement_apiImageV1alpha1Image.ImageConfig
125
132
  }
126
133
 
127
134
  export type UpdateNotebookRequest = {
@@ -134,6 +141,7 @@ export type UpdateNotebookRequest = {
134
141
  priorityClass?: string
135
142
  analysis?: BaizeManagement_apiAnalysisV1alpha1Analysis.AnalysisConfig
136
143
  description?: string
144
+ snapshotConfig?: SnapshotConfig
137
145
  }
138
146
 
139
147
  export type NotebookActionRequest = {
@@ -144,6 +152,21 @@ export type NotebookActionRequest = {
144
152
  action?: NotebookActionRequestAction
145
153
  }
146
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
+
147
170
  export type NotebookImage = {
148
171
  name?: string
149
172
  type?: NotebookType
@@ -173,6 +196,9 @@ export class NotebookService {
173
196
  static NotebookDoAction(req: NotebookActionRequest, initReq?: fm.InitReq): Promise<Notebook> {
174
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)})
175
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
+ }
176
202
  static DeleteNotebook(req: SingleNotebookRequest, initReq?: fm.InitReq): Promise<Notebook> {
177
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)})
178
204
  }
@@ -23,6 +23,27 @@ export enum QueueStrategy {
23
23
  BEST_EFFORT_FIFO = "BEST_EFFORT_FIFO",
24
24
  }
25
25
 
26
+ export enum QueuePreemptionWithinClusterQueuePolicy {
27
+ QUEUE_PREEMPTION_WITHIN_CLUSTER_QUEUE_POLICY_UNSPECIFIED = "QUEUE_PREEMPTION_WITHIN_CLUSTER_QUEUE_POLICY_UNSPECIFIED",
28
+ QUEUE_PREEMPTION_WITHIN_CLUSTER_QUEUE_POLICY_NEVER = "QUEUE_PREEMPTION_WITHIN_CLUSTER_QUEUE_POLICY_NEVER",
29
+ QUEUE_PREEMPTION_WITHIN_CLUSTER_QUEUE_POLICY_LOWER_PRIORITY = "QUEUE_PREEMPTION_WITHIN_CLUSTER_QUEUE_POLICY_LOWER_PRIORITY",
30
+ QUEUE_PREEMPTION_WITHIN_CLUSTER_QUEUE_POLICY_LOWER_OR_NEWER_EQUALPRIORITY = "QUEUE_PREEMPTION_WITHIN_CLUSTER_QUEUE_POLICY_LOWER_OR_NEWER_EQUALPRIORITY",
31
+ QUEUE_PREEMPTION_WITHIN_CLUSTER_QUEUE_POLICY_ANY = "QUEUE_PREEMPTION_WITHIN_CLUSTER_QUEUE_POLICY_ANY",
32
+ }
33
+
34
+ export enum QueuePreemptionReclaimWithinCohortPolicy {
35
+ QUEUE_PREEMPTION_RECLAIM_WITHIN_COHORT_POLICY_UNSPECIFIED = "QUEUE_PREEMPTION_RECLAIM_WITHIN_COHORT_POLICY_UNSPECIFIED",
36
+ QUEUE_PREEMPTION_RECLAIM_WITHIN_COHORT_POLICY_NEVER = "QUEUE_PREEMPTION_RECLAIM_WITHIN_COHORT_POLICY_NEVER",
37
+ QUEUE_PREEMPTION_RECLAIM_WITHIN_COHORT_POLICY_ANY = "QUEUE_PREEMPTION_RECLAIM_WITHIN_COHORT_POLICY_ANY",
38
+ QUEUE_PREEMPTION_RECLAIM_WITHIN_COHORT_POLICY_LOWER_PRIORITY = "QUEUE_PREEMPTION_RECLAIM_WITHIN_COHORT_POLICY_LOWER_PRIORITY",
39
+ }
40
+
41
+ export enum QueuePreemptionBorrowWithinCohortPolicy {
42
+ QUEUE_PREEMPTION_BORROW_WITHIN_COHORT_POLICY_UNSPECIFIED = "QUEUE_PREEMPTION_BORROW_WITHIN_COHORT_POLICY_UNSPECIFIED",
43
+ QUEUE_PREEMPTION_BORROW_WITHIN_COHORT_POLICY_NEVER = "QUEUE_PREEMPTION_BORROW_WITHIN_COHORT_POLICY_NEVER",
44
+ QUEUE_PREEMPTION_BORROW_WITHIN_COHORT_POLICY_LOWER_PRIORITY = "QUEUE_PREEMPTION_BORROW_WITHIN_COHORT_POLICY_LOWER_PRIORITY",
45
+ }
46
+
26
47
  export type QueueResource = {
27
48
  name?: string
28
49
  value?: string
@@ -74,6 +95,7 @@ export type CreateQueueRequest = {
74
95
  strategy?: QueueStrategy
75
96
  labels?: {[key: string]: string}
76
97
  annotations?: {[key: string]: string}
98
+ preemptionWithinClusterQueue?: QueuePreemptionWithinClusterQueuePolicy
77
99
  }
78
100
 
79
101
  export type UpdateQueueRequest = {
@@ -86,6 +108,7 @@ export type UpdateQueueRequest = {
86
108
  strategy?: QueueStrategy
87
109
  labels?: {[key: string]: string}
88
110
  annotations?: {[key: string]: string}
111
+ preemptionWithinClusterQueue?: QueuePreemptionWithinClusterQueuePolicy
89
112
  }
90
113
 
91
114
  export type GetQueueRequest = {
@@ -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.108.0",
3
+ "version": "v0.108.2",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"