@daocloud-proto/hydra 0.11.0-dev-40 → 0.11.0-dev-41
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/common.pb.ts
CHANGED
|
@@ -18,6 +18,13 @@ export enum Mode {
|
|
|
18
18
|
Any = "Any",
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
export enum NodePhase {
|
|
22
|
+
NODE_PHASE_UNSPECIFIED = "NODE_PHASE_UNSPECIFIED",
|
|
23
|
+
Ready = "Ready",
|
|
24
|
+
Not_Ready = "Not_Ready",
|
|
25
|
+
Unknown = "Unknown",
|
|
26
|
+
}
|
|
27
|
+
|
|
21
28
|
export enum SearchIndexFieldBuilderType {
|
|
22
29
|
FIELD_TYPE_UNSPECIFIED = "FIELD_TYPE_UNSPECIFIED",
|
|
23
30
|
FILED = "FILED",
|
|
@@ -101,4 +108,52 @@ export type AuditObject = {
|
|
|
101
108
|
kind?: string
|
|
102
109
|
group?: string
|
|
103
110
|
version?: string
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export type Node = {
|
|
114
|
+
name?: string
|
|
115
|
+
arch?: string
|
|
116
|
+
labels?: {[key: string]: string}
|
|
117
|
+
gpuModels?: string[]
|
|
118
|
+
status?: NodeStatus
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export type NodeStatus = {
|
|
122
|
+
phase?: NodePhase
|
|
123
|
+
addresses?: NodeAddress[]
|
|
124
|
+
cpuCapacity?: string
|
|
125
|
+
cpuAllocated?: number
|
|
126
|
+
cpuUsage?: number
|
|
127
|
+
memoryCapacity?: string
|
|
128
|
+
memoryAllocated?: number
|
|
129
|
+
memoryUsage?: number
|
|
130
|
+
systemInfo?: NodeSystemInfo
|
|
131
|
+
allowedPodNumber?: number
|
|
132
|
+
podAllocated?: number
|
|
133
|
+
readyPodNumber?: number
|
|
134
|
+
storageCapacity?: string
|
|
135
|
+
storageAllocated?: string
|
|
136
|
+
storageUsage?: number
|
|
137
|
+
storageDriver?: string
|
|
138
|
+
gpuTotal?: string
|
|
139
|
+
gpuAllocated?: string
|
|
140
|
+
gpuMemoryTotal?: string
|
|
141
|
+
gpuMemoryAllocated?: string
|
|
142
|
+
gpuCoreUsage?: number
|
|
143
|
+
gpuMemoryUsage?: number
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export type NodeAddress = {
|
|
147
|
+
type?: string
|
|
148
|
+
address?: string
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export type NodeSystemInfo = {
|
|
152
|
+
kernelVersion?: string
|
|
153
|
+
osImage?: string
|
|
154
|
+
containerRuntimeVersion?: string
|
|
155
|
+
kubeletVersion?: string
|
|
156
|
+
kubeProxyVersion?: string
|
|
157
|
+
operatingSystem?: string
|
|
158
|
+
architecture?: string
|
|
104
159
|
}
|
|
@@ -24,6 +24,12 @@ export enum PaymentMethod {
|
|
|
24
24
|
PAY_AS_YOU_GO = "PAY_AS_YOU_GO",
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
export enum PlacementPolicy {
|
|
28
|
+
PLACEMENT_POLICY_UNSPECIFIED = "PLACEMENT_POLICY_UNSPECIFIED",
|
|
29
|
+
BALANCED = "BALANCED",
|
|
30
|
+
GROUPED = "GROUPED",
|
|
31
|
+
}
|
|
32
|
+
|
|
27
33
|
export enum ModelServingStatus {
|
|
28
34
|
STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
|
|
29
35
|
DEPLOYING = "DEPLOYING",
|
|
@@ -34,6 +40,12 @@ export enum ModelServingStatus {
|
|
|
34
40
|
STOPPED = "STOPPED",
|
|
35
41
|
}
|
|
36
42
|
|
|
43
|
+
export enum ModelVisible {
|
|
44
|
+
MODEL_VISIBLE_UNSPECIFIED = "MODEL_VISIBLE_UNSPECIFIED",
|
|
45
|
+
MODEL_VISIBLE_PUBLIC = "MODEL_VISIBLE_PUBLIC",
|
|
46
|
+
MODEL_VISIBLE_PRIVATE = "MODEL_VISIBLE_PRIVATE",
|
|
47
|
+
}
|
|
48
|
+
|
|
37
49
|
export enum DeployDetectConditionType {
|
|
38
50
|
DEPLOY_DETECT_CONDITION_TYPE_UNSPECIFIED = "DEPLOY_DETECT_CONDITION_TYPE_UNSPECIFIED",
|
|
39
51
|
CLUSTER_RESOURCE_AVAILABLE = "CLUSTER_RESOURCE_AVAILABLE",
|
|
@@ -51,6 +63,12 @@ export enum WSModelServingActionRequestAction {
|
|
|
51
63
|
STOP = "STOP",
|
|
52
64
|
}
|
|
53
65
|
|
|
66
|
+
export type SchedulingConfig = {
|
|
67
|
+
queueName?: string
|
|
68
|
+
priorityClass?: string
|
|
69
|
+
placementPolicy?: PlacementPolicy
|
|
70
|
+
}
|
|
71
|
+
|
|
54
72
|
export type WeightVolumeConfig = {
|
|
55
73
|
modelId?: string
|
|
56
74
|
modelTag?: string
|
|
@@ -111,6 +129,7 @@ export type CreateModelServingRequest = {
|
|
|
111
129
|
|
|
112
130
|
export type CreateWSModelServingRequest = BaseCreateWSModelServingRequest
|
|
113
131
|
& OneOf<{ weightVolumeConfig: WeightVolumeConfig }>
|
|
132
|
+
& OneOf<{ schedulingConfig: SchedulingConfig }>
|
|
114
133
|
|
|
115
134
|
export type ModelServing = {
|
|
116
135
|
id?: string
|
|
@@ -134,7 +153,8 @@ export type ModelServing = {
|
|
|
134
153
|
modelSupportFeature?: HydraManagement_apiModelV1alpha1Model.ModelSupportFeature[]
|
|
135
154
|
}
|
|
136
155
|
|
|
137
|
-
|
|
156
|
+
|
|
157
|
+
/* hydra modified */ export type BaseWSModelServing = {
|
|
138
158
|
id?: string
|
|
139
159
|
name?: string
|
|
140
160
|
modelId?: string
|
|
@@ -152,8 +172,12 @@ export type WSModelServing = {
|
|
|
152
172
|
resourceConfig?: ResourceConfig
|
|
153
173
|
runtimeConfig?: RuntimeConfig
|
|
154
174
|
weightVolumeConfig?: WeightVolumeConfig
|
|
175
|
+
modelVisible?: ModelVisible
|
|
155
176
|
}
|
|
156
177
|
|
|
178
|
+
export type WSModelServing = BaseWSModelServing
|
|
179
|
+
& OneOf<{ schedulingConfig: SchedulingConfig }>
|
|
180
|
+
|
|
157
181
|
export type ListModelServingRequest = {
|
|
158
182
|
page?: HydraCommonCommon.Pagination
|
|
159
183
|
}
|
|
@@ -237,6 +261,7 @@ export type WSModelServingActionRequest = {
|
|
|
237
261
|
|
|
238
262
|
export type WSModelServingDeployDetectionRequest = BaseWSModelServingDeployDetectionRequest
|
|
239
263
|
& OneOf<{ weightVolumeConfig: WeightVolumeConfig }>
|
|
264
|
+
& OneOf<{ schedulingConfig: SchedulingConfig }>
|
|
240
265
|
|
|
241
266
|
export type ModelServingDeployDetectionResponse = {
|
|
242
267
|
ready?: boolean
|
|
@@ -0,0 +1,121 @@
|
|
|
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 HydraCommonCommon from "../../../common/common.pb"
|
|
8
|
+
import * as fm from "../../../fetch.pb"
|
|
9
|
+
|
|
10
|
+
export enum QueueType {
|
|
11
|
+
QUEUE_TYPE_UNSPECIFIED = "QUEUE_TYPE_UNSPECIFIED",
|
|
12
|
+
KUEUE = "KUEUE",
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export enum QueuePhase {
|
|
16
|
+
QUEUE_PHASE_UNSPECIFIED = "QUEUE_PHASE_UNSPECIFIED",
|
|
17
|
+
READY = "READY",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export enum QueueStrategy {
|
|
21
|
+
QUEUE_STRATEGY_UNSPECIFIED = "QUEUE_STRATEGY_UNSPECIFIED",
|
|
22
|
+
STRICT_FIFO = "STRICT_FIFO",
|
|
23
|
+
BEST_EFFORT_FIFO = "BEST_EFFORT_FIFO",
|
|
24
|
+
}
|
|
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 type CheckQueueRequest = {
|
|
35
|
+
type?: QueueType
|
|
36
|
+
workspace?: number
|
|
37
|
+
cluster?: string
|
|
38
|
+
namespace?: string
|
|
39
|
+
name?: string
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type CheckQueueResponse = {
|
|
43
|
+
type?: QueueType
|
|
44
|
+
exist?: boolean
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type CreateLocalQueueRequest = {
|
|
48
|
+
type?: QueueType
|
|
49
|
+
workspace?: number
|
|
50
|
+
cluster?: string
|
|
51
|
+
namespace?: string
|
|
52
|
+
name?: string
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type QueueStatus = {
|
|
56
|
+
phase?: QueuePhase
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type CreateLocalQueueResponse = {
|
|
60
|
+
type?: QueueType
|
|
61
|
+
workspace?: number
|
|
62
|
+
cluster?: string
|
|
63
|
+
namespace?: string
|
|
64
|
+
name?: string
|
|
65
|
+
status?: QueueStatus
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export type ListQueueRequest = {
|
|
69
|
+
workspace?: number
|
|
70
|
+
cluster?: string
|
|
71
|
+
type?: QueueType
|
|
72
|
+
page?: HydraCommonCommon.Pagination
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export type ListQueueResponse = {
|
|
76
|
+
items?: Queue[]
|
|
77
|
+
page?: HydraCommonCommon.Pagination
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export type QueueResource = {
|
|
81
|
+
name?: string
|
|
82
|
+
value?: string
|
|
83
|
+
borrowingLimit?: string
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export type QueueFlavor = {
|
|
87
|
+
name?: string
|
|
88
|
+
resources?: QueueResource[]
|
|
89
|
+
resourcesAvailable?: QueueResource[]
|
|
90
|
+
nodes?: HydraCommonCommon.Node[]
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export type Queue = {
|
|
94
|
+
type?: QueueType
|
|
95
|
+
cluster?: string
|
|
96
|
+
name?: string
|
|
97
|
+
workspace?: number
|
|
98
|
+
description?: string
|
|
99
|
+
resources?: QueueResource[]
|
|
100
|
+
resourcesAvailable?: QueueResource[]
|
|
101
|
+
labels?: {[key: string]: string}
|
|
102
|
+
annotations?: {[key: string]: string}
|
|
103
|
+
status?: QueueStatus
|
|
104
|
+
strategy?: QueueStrategy
|
|
105
|
+
workspaceAlias?: string
|
|
106
|
+
preemptionWithinClusterQueue?: QueuePreemptionWithinClusterQueuePolicy
|
|
107
|
+
flavors?: QueueFlavor[]
|
|
108
|
+
tasEnabled?: boolean
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export class QueueManagement {
|
|
112
|
+
static CheckQueue(req: CheckQueueRequest, initReq?: fm.InitReq): Promise<CheckQueueResponse> {
|
|
113
|
+
return fm.fetchReq<CheckQueueRequest, CheckQueueResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/queues/${req["name"]}/capacites?${fm.renderURLSearchParams(req, ["workspace", "cluster", "name"])}`, {...initReq, method: "GET"})
|
|
114
|
+
}
|
|
115
|
+
static CreateLocalQueue(req: CreateLocalQueueRequest, initReq?: fm.InitReq): Promise<CreateLocalQueueResponse> {
|
|
116
|
+
return fm.fetchReq<CreateLocalQueueRequest, CreateLocalQueueResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/localqueues`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
117
|
+
}
|
|
118
|
+
static ListQueues(req: ListQueueRequest, initReq?: fm.InitReq): Promise<ListQueueResponse> {
|
|
119
|
+
return fm.fetchReq<ListQueueRequest, ListQueueResponse>(`/apis/hydra.io/v1alpha1/queues?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
120
|
+
}
|
|
121
|
+
}
|