@daocloud-proto/hydra 0.11.0 → 0.15.0
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/admin-api/core/v1alpha1/core.pb.ts +59 -0
- package/admin-api/guardrails/v1alpha1/guardrails.pb.ts +180 -0
- package/admin-api/maas/v1alpha1/maas.pb.ts +3 -0
- package/admin-api/model/v1alpha1/model.pb.ts +51 -0
- package/admin-api/model/v1alpha1/model_weights_volume.pb.ts +96 -0
- package/admin-api/storage/v1alpha1/filesstorage.pb.ts +261 -0
- package/admin-api/workspace-quota/v1alpha1/workspace_quota.pb.ts +61 -0
- package/common/common.pb.ts +55 -0
- package/common/errorcode.ts +2 -2
- package/management-api/agent/v1alpha1/event.pb.ts +59 -0
- package/management-api/agent/v1alpha1/server_registration.pb.ts +33 -0
- package/management-api/agent/v1alpha1/sftp_user.pb.ts +39 -0
- package/management-api/apikey/v1alpha1/apikey.pb.ts +70 -2
- package/management-api/cluster/v1alpha1/cluster.pb.ts +28 -0
- package/management-api/core/v1alpha1/image.pb.ts +174 -0
- package/management-api/core/v1alpha1/management.pb.ts +17 -0
- package/management-api/core/v1alpha1/permissions.pb.ts +33 -11
- package/management-api/dataset/v1alpha1/dataset.pb.ts +110 -0
- package/management-api/dataset/v1alpha1/dataset_volume.pb.ts +107 -0
- package/management-api/event/v1alpha1/event.pb.ts +38 -0
- package/management-api/finetune/v1alpha1/common.pb.ts +14 -0
- package/management-api/finetune/v1alpha1/evaljob.pb.ts +130 -0
- package/management-api/finetune/v1alpha1/export_job.pb.ts +89 -0
- package/management-api/finetune/v1alpha1/finetuneconfig.pb.ts +239 -0
- package/management-api/finetune/v1alpha1/finetunejob.pb.ts +107 -0
- package/management-api/model/v1alpha1/model.pb.ts +114 -9
- package/management-api/model/v1alpha1/model_weights_volume.pb.ts +101 -0
- package/management-api/model_serving/v1alpha1/model_serving.pb.ts +103 -5
- package/management-api/model_type/v1alpha1/model_type.pb.ts +20 -0
- package/management-api/queue/v1alpha1/queue.pb.ts +121 -0
- package/management-api/storage/v1alpha1/filesstorage.pb.ts +495 -0
- package/management-api/workspace/v1alpha1/workspace.pb.ts +8 -0
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import * as HydraCommonCommon from "../../../common/common.pb"
|
|
8
8
|
import * as fm from "../../../fetch.pb"
|
|
9
|
+
import * as GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
|
|
9
10
|
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
10
11
|
|
|
11
12
|
export enum ModelSupportFeature {
|
|
@@ -29,14 +30,6 @@ export enum PublicModelConfigRateLimitLimitedBy {
|
|
|
29
30
|
API_KEY = "API_KEY",
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
export enum DeployTemplateGPUType {
|
|
33
|
-
GPU_TYPE_UNSPECIFIED = "GPU_TYPE_UNSPECIFIED",
|
|
34
|
-
NVIDIA_GPU = "NVIDIA_GPU",
|
|
35
|
-
NVIDIA_vGPU = "NVIDIA_vGPU",
|
|
36
|
-
NO_GPU = "NO_GPU",
|
|
37
|
-
METAX_GPU = "METAX_GPU",
|
|
38
|
-
}
|
|
39
|
-
|
|
40
33
|
export enum DeployTemplateInferenceRuntime {
|
|
41
34
|
INFERENCE_RUNTIME_UNSPECIFIED = "INFERENCE_RUNTIME_UNSPECIFIED",
|
|
42
35
|
VLLM = "VLLM",
|
|
@@ -48,6 +41,7 @@ export type ModelPrice = {
|
|
|
48
41
|
inputPerKTokens?: string
|
|
49
42
|
outputPerKTokens?: string
|
|
50
43
|
perImage?: string
|
|
44
|
+
cachedPerKTokens?: string
|
|
51
45
|
}
|
|
52
46
|
|
|
53
47
|
export type Model = {
|
|
@@ -68,6 +62,7 @@ export type Model = {
|
|
|
68
62
|
readme?: HydraCommonCommon.I18nName
|
|
69
63
|
publicModelConfig?: PublicModelConfig
|
|
70
64
|
modelDeploymentsExists?: boolean
|
|
65
|
+
visible?: string
|
|
71
66
|
}
|
|
72
67
|
|
|
73
68
|
export type ListModelRequest = {
|
|
@@ -101,9 +96,10 @@ export type ModelServingSpec = {
|
|
|
101
96
|
export type DeployTemplateResourcesRequirements = {
|
|
102
97
|
cpu?: number
|
|
103
98
|
memory?: number
|
|
104
|
-
gpuType?:
|
|
99
|
+
gpuType?: string
|
|
105
100
|
gpuCount?: number
|
|
106
101
|
perGpuMemory?: number
|
|
102
|
+
gpuCores?: number
|
|
107
103
|
}
|
|
108
104
|
|
|
109
105
|
export type DeployTemplate = {
|
|
@@ -113,6 +109,9 @@ export type DeployTemplate = {
|
|
|
113
109
|
customDeployArgs?: string[]
|
|
114
110
|
env?: EnvVar[]
|
|
115
111
|
inferenceRuntime?: string
|
|
112
|
+
runtimeCommand?: string
|
|
113
|
+
templateName?: string
|
|
114
|
+
templateDescription?: string
|
|
116
115
|
}
|
|
117
116
|
|
|
118
117
|
export type EnvVar = {
|
|
@@ -120,6 +119,15 @@ export type EnvVar = {
|
|
|
120
119
|
value?: string
|
|
121
120
|
}
|
|
122
121
|
|
|
122
|
+
export type ModelTemplate = {
|
|
123
|
+
templateId?: string
|
|
124
|
+
modelId?: string
|
|
125
|
+
workspace?: number
|
|
126
|
+
spec?: DeployTemplate
|
|
127
|
+
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
128
|
+
updateTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
129
|
+
}
|
|
130
|
+
|
|
123
131
|
export type ListWSModelRequest = {
|
|
124
132
|
workspace?: number
|
|
125
133
|
page?: HydraCommonCommon.Pagination
|
|
@@ -152,6 +160,71 @@ export type WSModel = {
|
|
|
152
160
|
readme?: HydraCommonCommon.I18nName
|
|
153
161
|
publicModelConfig?: PublicModelConfig
|
|
154
162
|
modelDeploymentsExists?: boolean
|
|
163
|
+
visible?: string
|
|
164
|
+
tokenWeight?: string
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export type CreatePrivateModelRequest = {
|
|
168
|
+
workspace?: number
|
|
169
|
+
modelAvatar?: string
|
|
170
|
+
modelName?: string
|
|
171
|
+
modelDescription?: HydraCommonCommon.I18nName
|
|
172
|
+
modelSupportFeature?: ModelSupportFeature[]
|
|
173
|
+
readme?: HydraCommonCommon.I18nName
|
|
174
|
+
servingSpec?: ModelServingSpec
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export type UpdatePrivateModelRequest = {
|
|
178
|
+
workspace?: number
|
|
179
|
+
modelId?: string
|
|
180
|
+
modelAvatar?: string
|
|
181
|
+
modelName?: string
|
|
182
|
+
modelDescription?: HydraCommonCommon.I18nName
|
|
183
|
+
modelSupportFeature?: ModelSupportFeature[]
|
|
184
|
+
readme?: HydraCommonCommon.I18nName
|
|
185
|
+
servingSpec?: ModelServingSpec
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export type ListPrivateModelRequest = {
|
|
189
|
+
workspace?: number
|
|
190
|
+
page?: HydraCommonCommon.Pagination
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export type CreateModelTemplateRequest = {
|
|
194
|
+
workspace?: number
|
|
195
|
+
modelId?: string
|
|
196
|
+
spec?: DeployTemplate
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export type GetModelTemplateRequest = {
|
|
200
|
+
workspace?: number
|
|
201
|
+
templateId?: string
|
|
202
|
+
modelId?: string
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export type UpdateModelTemplateRequest = {
|
|
206
|
+
workspace?: number
|
|
207
|
+
templateId?: string
|
|
208
|
+
spec?: DeployTemplate
|
|
209
|
+
modelId?: string
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export type DeleteModelTemplateRequest = {
|
|
213
|
+
workspace?: number
|
|
214
|
+
templateId?: string
|
|
215
|
+
modelId?: string
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export type ListModelTemplatesRequest = {
|
|
219
|
+
workspace?: number
|
|
220
|
+
modelId?: string
|
|
221
|
+
inferenceRuntime?: string
|
|
222
|
+
page?: HydraCommonCommon.Pagination
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export type ListModelTemplatesResponse = {
|
|
226
|
+
items?: ModelTemplate[]
|
|
227
|
+
page?: HydraCommonCommon.Pagination
|
|
155
228
|
}
|
|
156
229
|
|
|
157
230
|
export class ModelManagement {
|
|
@@ -169,4 +242,36 @@ export class WSModelManagement {
|
|
|
169
242
|
static ListWSModels(req: ListWSModelRequest, initReq?: fm.InitReq): Promise<ListWSModelResponse> {
|
|
170
243
|
return fm.fetchReq<ListWSModelRequest, ListWSModelResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/models?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
171
244
|
}
|
|
245
|
+
static ListPrivateModels(req: ListPrivateModelRequest, initReq?: fm.InitReq): Promise<ListWSModelResponse> {
|
|
246
|
+
return fm.fetchReq<ListPrivateModelRequest, ListWSModelResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/private-models?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
247
|
+
}
|
|
248
|
+
static GetPrivateModel(req: SingleWSModelRequest, initReq?: fm.InitReq): Promise<WSModel> {
|
|
249
|
+
return fm.fetchReq<SingleWSModelRequest, WSModel>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/private-models/${req["modelId"]}?${fm.renderURLSearchParams(req, ["workspace", "modelId"])}`, {...initReq, method: "GET"})
|
|
250
|
+
}
|
|
251
|
+
static CreatePrivateModel(req: CreatePrivateModelRequest, initReq?: fm.InitReq): Promise<WSModel> {
|
|
252
|
+
return fm.fetchReq<CreatePrivateModelRequest, WSModel>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/private-models`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
253
|
+
}
|
|
254
|
+
static UpdatePrivateModel(req: UpdatePrivateModelRequest, initReq?: fm.InitReq): Promise<WSModel> {
|
|
255
|
+
return fm.fetchReq<UpdatePrivateModelRequest, WSModel>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/private-models/${req["modelId"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
256
|
+
}
|
|
257
|
+
static DeletePrivateModel(req: SingleWSModelRequest, initReq?: fm.InitReq): Promise<WSModel> {
|
|
258
|
+
return fm.fetchReq<SingleWSModelRequest, WSModel>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/private-models/${req["modelId"]}`, {...initReq, method: "DELETE"})
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
export class WSModelTemplateManagement {
|
|
262
|
+
static CreateWSModelTemplate(req: CreateModelTemplateRequest, initReq?: fm.InitReq): Promise<ModelTemplate> {
|
|
263
|
+
return fm.fetchReq<CreateModelTemplateRequest, ModelTemplate>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/models/${req["modelId"]}/model-templates`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
264
|
+
}
|
|
265
|
+
static GetWSModelTemplate(req: GetModelTemplateRequest, initReq?: fm.InitReq): Promise<ModelTemplate> {
|
|
266
|
+
return fm.fetchReq<GetModelTemplateRequest, ModelTemplate>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/models/${req["modelId"]}/model-templates/${req["templateId"]}?${fm.renderURLSearchParams(req, ["workspace", "modelId", "templateId"])}`, {...initReq, method: "GET"})
|
|
267
|
+
}
|
|
268
|
+
static UpdateWSModelTemplate(req: UpdateModelTemplateRequest, initReq?: fm.InitReq): Promise<ModelTemplate> {
|
|
269
|
+
return fm.fetchReq<UpdateModelTemplateRequest, ModelTemplate>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/models/${req["modelId"]}/model-templates/${req["templateId"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
270
|
+
}
|
|
271
|
+
static DeleteWSModelTemplate(req: DeleteModelTemplateRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
272
|
+
return fm.fetchReq<DeleteModelTemplateRequest, GoogleProtobufEmpty.Empty>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/models/${req["modelId"]}/model-templates/${req["templateId"]}`, {...initReq, method: "DELETE"})
|
|
273
|
+
}
|
|
274
|
+
static ListWSModelTemplates(req: ListModelTemplatesRequest, initReq?: fm.InitReq): Promise<ListModelTemplatesResponse> {
|
|
275
|
+
return fm.fetchReq<ListModelTemplatesRequest, ListModelTemplatesResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/models/${req["modelId"]}/model-templates?${fm.renderURLSearchParams(req, ["workspace", "modelId"])}`, {...initReq, method: "GET"})
|
|
276
|
+
}
|
|
172
277
|
}
|
|
@@ -0,0 +1,101 @@
|
|
|
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
|
+
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
10
|
+
|
|
11
|
+
export enum StorageSourceType {
|
|
12
|
+
STORAGE_SOURCE_TYPE_UNSPECIFIED = "STORAGE_SOURCE_TYPE_UNSPECIFIED",
|
|
13
|
+
FILES_STORAGE = "FILES_STORAGE",
|
|
14
|
+
PVC_STORAGE = "PVC_STORAGE",
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type WSModelWeightsVolume = {
|
|
18
|
+
id?: string
|
|
19
|
+
modelId?: string
|
|
20
|
+
modelTag?: string
|
|
21
|
+
clusterName?: string
|
|
22
|
+
storageSource?: StorageSourceType
|
|
23
|
+
storageRef?: string
|
|
24
|
+
subPath?: string
|
|
25
|
+
mountPath?: string
|
|
26
|
+
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
27
|
+
updateTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
28
|
+
referenced?: boolean
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type CreateWSModelWeightsVolumeRequest = {
|
|
32
|
+
workspace?: number
|
|
33
|
+
id?: string
|
|
34
|
+
modelId?: string
|
|
35
|
+
clusterName?: string
|
|
36
|
+
modelTag?: string
|
|
37
|
+
storageSource?: StorageSourceType
|
|
38
|
+
storageRef?: string
|
|
39
|
+
subPath?: string
|
|
40
|
+
mountPath?: string
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type UpdateWSModelWeightsVolumeRequest = {
|
|
44
|
+
workspace?: number
|
|
45
|
+
id?: string
|
|
46
|
+
modelId?: string
|
|
47
|
+
clusterName?: string
|
|
48
|
+
modelTag?: string
|
|
49
|
+
storageSource?: StorageSourceType
|
|
50
|
+
storageRef?: string
|
|
51
|
+
subPath?: string
|
|
52
|
+
mountPath?: string
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type SingleWSModelWeightsVolumeRequest = {
|
|
56
|
+
workspace?: number
|
|
57
|
+
id?: string
|
|
58
|
+
modelId?: string
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type ListWSModelWeightsVolumesRequest = {
|
|
62
|
+
workspace?: number
|
|
63
|
+
modelId?: string
|
|
64
|
+
page?: HydraCommonCommon.Pagination
|
|
65
|
+
clusterName?: string
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export type ListWSModelWeightsVolumesResponse = {
|
|
69
|
+
items?: WSModelWeightsVolume[]
|
|
70
|
+
page?: HydraCommonCommon.Pagination
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export type GetWSStorageSourceRequest = {
|
|
74
|
+
workspace?: number
|
|
75
|
+
modelId?: string
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type GetWSStorageSourceResponse = {
|
|
79
|
+
sources?: {[key: string]: number}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export class WSModelWeightsVolumeManagement {
|
|
83
|
+
static CreateWSModelWeightsVolume(req: CreateWSModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<WSModelWeightsVolume> {
|
|
84
|
+
return fm.fetchReq<CreateWSModelWeightsVolumeRequest, WSModelWeightsVolume>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
85
|
+
}
|
|
86
|
+
static UpdateWSModelWeightsVolume(req: UpdateWSModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<WSModelWeightsVolume> {
|
|
87
|
+
return fm.fetchReq<UpdateWSModelWeightsVolumeRequest, WSModelWeightsVolume>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
88
|
+
}
|
|
89
|
+
static DeleteWSModelWeightsVolume(req: SingleWSModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<WSModelWeightsVolume> {
|
|
90
|
+
return fm.fetchReq<SingleWSModelWeightsVolumeRequest, WSModelWeightsVolume>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights/${req["id"]}`, {...initReq, method: "DELETE"})
|
|
91
|
+
}
|
|
92
|
+
static GetWSModelWeightsVolume(req: SingleWSModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<WSModelWeightsVolume> {
|
|
93
|
+
return fm.fetchReq<SingleWSModelWeightsVolumeRequest, WSModelWeightsVolume>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights/${req["id"]}?${fm.renderURLSearchParams(req, ["modelId", "workspace", "id"])}`, {...initReq, method: "GET"})
|
|
94
|
+
}
|
|
95
|
+
static ListWSModelWeightsVolumes(req: ListWSModelWeightsVolumesRequest, initReq?: fm.InitReq): Promise<ListWSModelWeightsVolumesResponse> {
|
|
96
|
+
return fm.fetchReq<ListWSModelWeightsVolumesRequest, ListWSModelWeightsVolumesResponse>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights?${fm.renderURLSearchParams(req, ["modelId", "workspace"])}`, {...initReq, method: "GET"})
|
|
97
|
+
}
|
|
98
|
+
static GetWSStorageSource(req: GetWSStorageSourceRequest, initReq?: fm.InitReq): Promise<GetWSStorageSourceResponse> {
|
|
99
|
+
return fm.fetchReq<GetWSStorageSourceRequest, GetWSStorageSourceResponse>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights:storage-source?${fm.renderURLSearchParams(req, ["modelId", "workspace"])}`, {...initReq, method: "GET"})
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -8,12 +8,28 @@ 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 PlacementPolicy {
|
|
28
|
+
PLACEMENT_POLICY_UNSPECIFIED = "PLACEMENT_POLICY_UNSPECIFIED",
|
|
29
|
+
BALANCED = "BALANCED",
|
|
30
|
+
GROUPED = "GROUPED",
|
|
31
|
+
}
|
|
32
|
+
|
|
17
33
|
export enum ModelServingStatus {
|
|
18
34
|
STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
|
|
19
35
|
DEPLOYING = "DEPLOYING",
|
|
@@ -24,6 +40,12 @@ export enum ModelServingStatus {
|
|
|
24
40
|
STOPPED = "STOPPED",
|
|
25
41
|
}
|
|
26
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
|
+
|
|
27
49
|
export enum DeployDetectConditionType {
|
|
28
50
|
DEPLOY_DETECT_CONDITION_TYPE_UNSPECIFIED = "DEPLOY_DETECT_CONDITION_TYPE_UNSPECIFIED",
|
|
29
51
|
CLUSTER_RESOURCE_AVAILABLE = "CLUSTER_RESOURCE_AVAILABLE",
|
|
@@ -41,6 +63,53 @@ export enum WSModelServingActionRequestAction {
|
|
|
41
63
|
STOP = "STOP",
|
|
42
64
|
}
|
|
43
65
|
|
|
66
|
+
export type SchedulingConfig = {
|
|
67
|
+
queueName?: string
|
|
68
|
+
priorityClass?: string
|
|
69
|
+
placementPolicy?: PlacementPolicy
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export type PreflightConfig = {
|
|
73
|
+
enabled?: boolean
|
|
74
|
+
nodeCheckIbHcas?: string[]
|
|
75
|
+
nodeCheckBusbwThresholdGbps?: string
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type WeightVolumeConfig = {
|
|
79
|
+
modelId?: string
|
|
80
|
+
modelTag?: string
|
|
81
|
+
storageSource?: HydraManagement_apiModelV1alpha1Model_weights_volume.StorageSourceType
|
|
82
|
+
storageRef?: string
|
|
83
|
+
subPath?: string
|
|
84
|
+
mountPath?: string
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
/* hydra modified */ export type BaseResourceConfig = {
|
|
89
|
+
cpu?: number
|
|
90
|
+
memory?: number
|
|
91
|
+
gpuType?: string
|
|
92
|
+
gpuCount?: number
|
|
93
|
+
perGpuMemory?: number
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type ResourceConfig = BaseResourceConfig
|
|
97
|
+
& OneOf<{ gpuCores: number }>
|
|
98
|
+
|
|
99
|
+
export type EnvVar = {
|
|
100
|
+
name?: string
|
|
101
|
+
value?: string
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export type RuntimeConfig = {
|
|
105
|
+
runtimeType?: string
|
|
106
|
+
runtimeImage?: string
|
|
107
|
+
versionRequired?: string
|
|
108
|
+
imagePullSecretName?: string[]
|
|
109
|
+
runtimeCommand?: string
|
|
110
|
+
env?: EnvVar[]
|
|
111
|
+
}
|
|
112
|
+
|
|
44
113
|
export type CreateModelServingRequest = {
|
|
45
114
|
name?: string
|
|
46
115
|
modelId?: string
|
|
@@ -50,15 +119,26 @@ export type CreateModelServingRequest = {
|
|
|
50
119
|
paymentMethods?: PaymentMethod
|
|
51
120
|
}
|
|
52
121
|
|
|
53
|
-
|
|
122
|
+
|
|
123
|
+
/* hydra modified */ export type BaseCreateWSModelServingRequest = {
|
|
54
124
|
name?: string
|
|
55
125
|
modelId?: string
|
|
56
126
|
workspace?: number
|
|
57
127
|
cluster?: string
|
|
58
128
|
namespace?: string
|
|
59
129
|
replicas?: number
|
|
130
|
+
nodeSize?: number
|
|
131
|
+
weightVolumeId?: string
|
|
132
|
+
resourceConfig?: ResourceConfig
|
|
133
|
+
runtimeConfig?: RuntimeConfig
|
|
134
|
+
tokenWeight?: string
|
|
60
135
|
}
|
|
61
136
|
|
|
137
|
+
export type CreateWSModelServingRequest = BaseCreateWSModelServingRequest
|
|
138
|
+
& OneOf<{ weightVolumeConfig: WeightVolumeConfig }>
|
|
139
|
+
& OneOf<{ schedulingConfig: SchedulingConfig }>
|
|
140
|
+
& OneOf<{ preflight: PreflightConfig }>
|
|
141
|
+
|
|
62
142
|
export type ModelServing = {
|
|
63
143
|
id?: string
|
|
64
144
|
name?: string
|
|
@@ -81,13 +161,15 @@ export type ModelServing = {
|
|
|
81
161
|
modelSupportFeature?: HydraManagement_apiModelV1alpha1Model.ModelSupportFeature[]
|
|
82
162
|
}
|
|
83
163
|
|
|
84
|
-
|
|
164
|
+
|
|
165
|
+
/* hydra modified */ export type BaseWSModelServing = {
|
|
85
166
|
id?: string
|
|
86
167
|
name?: string
|
|
87
168
|
modelId?: string
|
|
88
169
|
modelName?: string
|
|
89
170
|
cluster?: string
|
|
90
171
|
replicas?: number
|
|
172
|
+
nodeSize?: number
|
|
91
173
|
status?: ModelServingStatus
|
|
92
174
|
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
93
175
|
accessModelName?: string
|
|
@@ -95,8 +177,17 @@ export type WSModelServing = {
|
|
|
95
177
|
address?: string
|
|
96
178
|
modelAvatar?: string
|
|
97
179
|
modelSupportFeature?: HydraManagement_apiModelV1alpha1Model.ModelSupportFeature[]
|
|
180
|
+
resourceConfig?: ResourceConfig
|
|
181
|
+
runtimeConfig?: RuntimeConfig
|
|
182
|
+
weightVolumeConfig?: WeightVolumeConfig
|
|
183
|
+
modelVisible?: ModelVisible
|
|
184
|
+
tokenWeight?: string
|
|
185
|
+
preflight?: PreflightConfig
|
|
98
186
|
}
|
|
99
187
|
|
|
188
|
+
export type WSModelServing = BaseWSModelServing
|
|
189
|
+
& OneOf<{ schedulingConfig: SchedulingConfig }>
|
|
190
|
+
|
|
100
191
|
export type ListModelServingRequest = {
|
|
101
192
|
page?: HydraCommonCommon.Pagination
|
|
102
193
|
}
|
|
@@ -120,8 +211,6 @@ export type ListWSModelServingResponse = {
|
|
|
120
211
|
|
|
121
212
|
export type GetWSModelServingRequest = {
|
|
122
213
|
workspace?: number
|
|
123
|
-
cluster?: string
|
|
124
|
-
namespace?: string
|
|
125
214
|
id?: string
|
|
126
215
|
}
|
|
127
216
|
|
|
@@ -166,13 +255,22 @@ export type WSModelServingActionRequest = {
|
|
|
166
255
|
action?: WSModelServingActionRequestAction
|
|
167
256
|
}
|
|
168
257
|
|
|
169
|
-
|
|
258
|
+
|
|
259
|
+
/* hydra modified */ export type BaseWSModelServingDeployDetectionRequest = {
|
|
170
260
|
workspace?: number
|
|
171
261
|
modelId?: string
|
|
172
262
|
cluster?: string
|
|
173
263
|
namespace?: string
|
|
264
|
+
nodeSize?: number
|
|
265
|
+
weightVolumeId?: string
|
|
266
|
+
resourceConfig?: ResourceConfig
|
|
267
|
+
runtimeConfig?: RuntimeConfig
|
|
174
268
|
}
|
|
175
269
|
|
|
270
|
+
export type WSModelServingDeployDetectionRequest = BaseWSModelServingDeployDetectionRequest
|
|
271
|
+
& OneOf<{ weightVolumeConfig: WeightVolumeConfig }>
|
|
272
|
+
& OneOf<{ schedulingConfig: SchedulingConfig }>
|
|
273
|
+
|
|
176
274
|
export type ModelServingDeployDetectionResponse = {
|
|
177
275
|
ready?: boolean
|
|
178
276
|
conditions?: DeployDetectCondition[]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export enum RequestModelType {
|
|
8
|
+
REQUEST_MODEL_TYPE_UNSPECIFIED = "REQUEST_MODEL_TYPE_UNSPECIFIED",
|
|
9
|
+
TEXT_GENERATION = "TEXT_GENERATION",
|
|
10
|
+
VIDEO_TO_TEXT = "VIDEO_TO_TEXT",
|
|
11
|
+
TEXT_TO_VIDEO = "TEXT_TO_VIDEO",
|
|
12
|
+
IMAGE_TO_IMAGE = "IMAGE_TO_IMAGE",
|
|
13
|
+
IMAGE_TO_TEXT = "IMAGE_TO_TEXT",
|
|
14
|
+
TEXT_TO_IMAGE = "TEXT_TO_IMAGE",
|
|
15
|
+
EMBEDDING = "EMBEDDING",
|
|
16
|
+
RERANK_MODEL = "RERANK_MODEL",
|
|
17
|
+
AUDIO_TO_AUDIO = "AUDIO_TO_AUDIO",
|
|
18
|
+
AUDIO_TO_TEXT = "AUDIO_TO_TEXT",
|
|
19
|
+
TEXT_TO_AUDIO = "TEXT_TO_AUDIO",
|
|
20
|
+
}
|
|
@@ -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
|
+
}
|