@daocloud-proto/baize 0.111.0 → 0.111.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.
|
@@ -236,10 +236,11 @@ export type SingleDatasetRequest = {
|
|
|
236
236
|
secretOptions?: SecretOptions
|
|
237
237
|
share?: boolean
|
|
238
238
|
sharedStoWorkspaces?: number[]
|
|
239
|
+
uri?: string
|
|
239
240
|
}
|
|
240
241
|
|
|
241
242
|
export type UpdateDatasetRequest = BaseUpdateDatasetRequest
|
|
242
|
-
& OneOf<{ conda: DataSourceOptionsConda }>
|
|
243
|
+
& OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope }>
|
|
243
244
|
|
|
244
245
|
export type DatasetActionRequest = {
|
|
245
246
|
workspace?: number
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as BaizeCommonCommon from "../../../common/common.pb"
|
|
8
|
+
import * as BaizeCommonK8s from "../../../common/k8s.pb"
|
|
8
9
|
import * as fm from "../../../fetch.pb"
|
|
10
|
+
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
9
11
|
|
|
10
12
|
export enum QueueType {
|
|
11
13
|
QUEUE_TYPE_UNSPECIFIED = "QUEUE_TYPE_UNSPECIFIED",
|
|
@@ -44,6 +46,12 @@ export enum QueuePreemptionBorrowWithinCohortPolicy {
|
|
|
44
46
|
QUEUE_PREEMPTION_BORROW_WITHIN_COHORT_POLICY_LOWER_PRIORITY = "QUEUE_PREEMPTION_BORROW_WITHIN_COHORT_POLICY_LOWER_PRIORITY",
|
|
45
47
|
}
|
|
46
48
|
|
|
49
|
+
export enum QueueWorkloadPhase {
|
|
50
|
+
PHASE_UNSPECIFIED = "PHASE_UNSPECIFIED",
|
|
51
|
+
PENDING = "PENDING",
|
|
52
|
+
ADMITTED = "ADMITTED",
|
|
53
|
+
}
|
|
54
|
+
|
|
47
55
|
export type QueueResource = {
|
|
48
56
|
name?: string
|
|
49
57
|
value?: string
|
|
@@ -153,6 +161,34 @@ export type CreateLocalQueueResponse = {
|
|
|
153
161
|
status?: QueueStatus
|
|
154
162
|
}
|
|
155
163
|
|
|
164
|
+
export type QueueWorkload = {
|
|
165
|
+
cluster?: string
|
|
166
|
+
namespace?: string
|
|
167
|
+
queueName?: string
|
|
168
|
+
name?: string
|
|
169
|
+
totalPods?: number
|
|
170
|
+
totalResources?: BaizeCommonK8s.Resources
|
|
171
|
+
priorityClassName?: string
|
|
172
|
+
priority?: number
|
|
173
|
+
schedulerName?: string
|
|
174
|
+
preemptionPolicy?: string
|
|
175
|
+
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
176
|
+
phase?: QueueWorkloadPhase
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export type ListQueueWorkloadRequest = {
|
|
180
|
+
cluster?: string
|
|
181
|
+
namespace?: string
|
|
182
|
+
queueName?: string
|
|
183
|
+
type?: QueueType
|
|
184
|
+
page?: BaizeCommonCommon.Pagination
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export type ListQueueWorkloadResponse = {
|
|
188
|
+
items?: QueueWorkload[]
|
|
189
|
+
page?: BaizeCommonCommon.Pagination
|
|
190
|
+
}
|
|
191
|
+
|
|
156
192
|
export class QueueManagement {
|
|
157
193
|
static ListQueues(req: ListQueueRequest, initReq?: fm.InitReq): Promise<ListQueueResponse> {
|
|
158
194
|
return fm.fetchReq<ListQueueRequest, ListQueueResponse>(`/apis/baize.io/v1alpha1/queues?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -178,4 +214,7 @@ export class QueueManagement {
|
|
|
178
214
|
static CreateLocalQueue(req: CreateLocalQueueRequest, initReq?: fm.InitReq): Promise<CreateLocalQueueResponse> {
|
|
179
215
|
return fm.fetchReq<CreateLocalQueueRequest, CreateLocalQueueResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/localqueues`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
180
216
|
}
|
|
217
|
+
static ListQueueWorkloads(req: ListQueueWorkloadRequest, initReq?: fm.InitReq): Promise<ListQueueWorkloadResponse> {
|
|
218
|
+
return fm.fetchReq<ListQueueWorkloadRequest, ListQueueWorkloadResponse>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/queues/${req["queueName"]}/workloads?${fm.renderURLSearchParams(req, ["cluster", "queueName"])}`, {...initReq, method: "GET"})
|
|
219
|
+
}
|
|
181
220
|
}
|