@daocloud-proto/hydra 0.11.0-dev-28 → 0.11.0-dev-29
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.
|
@@ -8,12 +8,30 @@ import * as HydraCommonCommon from "../../../common/common.pb"
|
|
|
8
8
|
import * as fm from "../../../fetch.pb"
|
|
9
9
|
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
10
10
|
import * as HydraManagement_apiModelV1alpha1Model from "../../model/v1alpha1/model.pb"
|
|
11
|
+
import * as HydraManagement_apiModelV1alpha1Model_weights_volume from "../../model/v1alpha1/model_weights_volume.pb"
|
|
12
|
+
|
|
13
|
+
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
14
|
+
type OneOf<T> =
|
|
15
|
+
| { [k in keyof T]?: undefined }
|
|
16
|
+
| (
|
|
17
|
+
keyof T extends infer K ?
|
|
18
|
+
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
19
|
+
: never)
|
|
20
|
+
: never);
|
|
11
21
|
|
|
12
22
|
export enum PaymentMethod {
|
|
13
23
|
PAYMENT_METHOD_UNSPECIFIED = "PAYMENT_METHOD_UNSPECIFIED",
|
|
14
24
|
PAY_AS_YOU_GO = "PAY_AS_YOU_GO",
|
|
15
25
|
}
|
|
16
26
|
|
|
27
|
+
export enum InferenceRuntime {
|
|
28
|
+
INFERENCE_RUNTIME_UNSPECIFIED = "INFERENCE_RUNTIME_UNSPECIFIED",
|
|
29
|
+
VLLM = "VLLM",
|
|
30
|
+
SGLANG = "SGLANG",
|
|
31
|
+
IMAGE_GEN = "IMAGE_GEN",
|
|
32
|
+
CUSTOM = "CUSTOM",
|
|
33
|
+
}
|
|
34
|
+
|
|
17
35
|
export enum ModelServingStatus {
|
|
18
36
|
STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
|
|
19
37
|
DEPLOYING = "DEPLOYING",
|
|
@@ -41,6 +59,46 @@ export enum WSModelServingActionRequestAction {
|
|
|
41
59
|
STOP = "STOP",
|
|
42
60
|
}
|
|
43
61
|
|
|
62
|
+
export type WeightVolumeConfig = {
|
|
63
|
+
modelId?: string
|
|
64
|
+
modelTag?: string
|
|
65
|
+
storageSource?: HydraManagement_apiModelV1alpha1Model_weights_volume.StorageSourceType
|
|
66
|
+
storageRef?: string
|
|
67
|
+
subPath?: string
|
|
68
|
+
mountPath?: string
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/* hydra modified */ export type BaseResourceConfig = {
|
|
73
|
+
cpu?: number
|
|
74
|
+
memory?: number
|
|
75
|
+
gpuType?: HydraManagement_apiModelV1alpha1Model.DeployTemplateGPUType
|
|
76
|
+
gpuCount?: number
|
|
77
|
+
perGpuMemory?: number
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export type ResourceConfig = BaseResourceConfig
|
|
81
|
+
& OneOf<{ gpuCores: number }>
|
|
82
|
+
|
|
83
|
+
export type EnvVar = {
|
|
84
|
+
name?: string
|
|
85
|
+
value?: string
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export type ImagePullSecret = {
|
|
89
|
+
username?: string
|
|
90
|
+
password?: string
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export type RuntimeConfig = {
|
|
94
|
+
runtimeType?: InferenceRuntime
|
|
95
|
+
runtimeImage?: string
|
|
96
|
+
versionRequired?: string
|
|
97
|
+
imagePullSecret?: ImagePullSecret
|
|
98
|
+
runtimeCommand?: string
|
|
99
|
+
env?: EnvVar[]
|
|
100
|
+
}
|
|
101
|
+
|
|
44
102
|
export type CreateModelServingRequest = {
|
|
45
103
|
name?: string
|
|
46
104
|
modelId?: string
|
|
@@ -50,15 +108,23 @@ export type CreateModelServingRequest = {
|
|
|
50
108
|
paymentMethods?: PaymentMethod
|
|
51
109
|
}
|
|
52
110
|
|
|
53
|
-
|
|
111
|
+
|
|
112
|
+
/* hydra modified */ export type BaseCreateWSModelServingRequest = {
|
|
54
113
|
name?: string
|
|
55
114
|
modelId?: string
|
|
56
115
|
workspace?: number
|
|
57
116
|
cluster?: string
|
|
58
117
|
namespace?: string
|
|
59
118
|
replicas?: number
|
|
119
|
+
nodeSize?: number
|
|
120
|
+
weightVolumeId?: string
|
|
121
|
+
resourceConfig?: ResourceConfig
|
|
122
|
+
runtimeConfig?: RuntimeConfig
|
|
60
123
|
}
|
|
61
124
|
|
|
125
|
+
export type CreateWSModelServingRequest = BaseCreateWSModelServingRequest
|
|
126
|
+
& OneOf<{ weightVolumeConfig: WeightVolumeConfig }>
|
|
127
|
+
|
|
62
128
|
export type ModelServing = {
|
|
63
129
|
id?: string
|
|
64
130
|
name?: string
|
|
@@ -88,6 +154,7 @@ export type WSModelServing = {
|
|
|
88
154
|
modelName?: string
|
|
89
155
|
cluster?: string
|
|
90
156
|
replicas?: number
|
|
157
|
+
nodeSize?: number
|
|
91
158
|
status?: ModelServingStatus
|
|
92
159
|
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
93
160
|
accessModelName?: string
|
|
@@ -95,6 +162,9 @@ export type WSModelServing = {
|
|
|
95
162
|
address?: string
|
|
96
163
|
modelAvatar?: string
|
|
97
164
|
modelSupportFeature?: HydraManagement_apiModelV1alpha1Model.ModelSupportFeature[]
|
|
165
|
+
resourceConfig?: ResourceConfig
|
|
166
|
+
runtimeConfig?: RuntimeConfig
|
|
167
|
+
weightVolumeConfig?: WeightVolumeConfig
|
|
98
168
|
}
|
|
99
169
|
|
|
100
170
|
export type ListModelServingRequest = {
|
|
@@ -166,13 +236,21 @@ export type WSModelServingActionRequest = {
|
|
|
166
236
|
action?: WSModelServingActionRequestAction
|
|
167
237
|
}
|
|
168
238
|
|
|
169
|
-
|
|
239
|
+
|
|
240
|
+
/* hydra modified */ export type BaseWSModelServingDeployDetectionRequest = {
|
|
170
241
|
workspace?: number
|
|
171
242
|
modelId?: string
|
|
172
243
|
cluster?: string
|
|
173
244
|
namespace?: string
|
|
245
|
+
nodeSize?: number
|
|
246
|
+
weightVolumeId?: string
|
|
247
|
+
resourceConfig?: ResourceConfig
|
|
248
|
+
runtimeConfig?: RuntimeConfig
|
|
174
249
|
}
|
|
175
250
|
|
|
251
|
+
export type WSModelServingDeployDetectionRequest = BaseWSModelServingDeployDetectionRequest
|
|
252
|
+
& OneOf<{ weightVolumeConfig: WeightVolumeConfig }>
|
|
253
|
+
|
|
176
254
|
export type ModelServingDeployDetectionResponse = {
|
|
177
255
|
ready?: boolean
|
|
178
256
|
conditions?: DeployDetectCondition[]
|