@daocloud-proto/hydra 0.5.0-dev-2 → 0.5.0-dev-4
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.
|
@@ -24,6 +24,12 @@ export enum ModelServingStatus {
|
|
|
24
24
|
STOPPED = "STOPPED",
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
export enum DeployDetectConditionType {
|
|
28
|
+
DEPLOY_DETECT_CONDITION_TYPE_UNSPECIFIED = "DEPLOY_DETECT_CONDITION_TYPE_UNSPECIFIED",
|
|
29
|
+
CLUSTER_RESOURCE_AVAILABLE = "CLUSTER_RESOURCE_AVAILABLE",
|
|
30
|
+
MODEL_IMAGE_DOWNLOADED = "MODEL_IMAGE_DOWNLOADED",
|
|
31
|
+
}
|
|
32
|
+
|
|
27
33
|
export enum ModelServingActionRequestAction {
|
|
28
34
|
MODEL_SERVING_ACTION_UNSPECIFIED = "MODEL_SERVING_ACTION_UNSPECIFIED",
|
|
29
35
|
START = "START",
|
|
@@ -32,6 +38,7 @@ export enum ModelServingActionRequestAction {
|
|
|
32
38
|
export enum WSModelServingActionRequestAction {
|
|
33
39
|
MODEL_SERVING_ACTION_UNSPECIFIED = "MODEL_SERVING_ACTION_UNSPECIFIED",
|
|
34
40
|
START = "START",
|
|
41
|
+
STOP = "STOP",
|
|
35
42
|
}
|
|
36
43
|
|
|
37
44
|
export type CreateModelServingRequest = {
|
|
@@ -159,6 +166,23 @@ export type WSModelServingActionRequest = {
|
|
|
159
166
|
action?: WSModelServingActionRequestAction
|
|
160
167
|
}
|
|
161
168
|
|
|
169
|
+
export type WSModelServingDeployDetectionRequest = {
|
|
170
|
+
workspace?: number
|
|
171
|
+
modelId?: string
|
|
172
|
+
cluster?: string
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export type ModelServingDeployDetectionResponse = {
|
|
176
|
+
ready?: boolean
|
|
177
|
+
conditions?: DeployDetectCondition[]
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export type DeployDetectCondition = {
|
|
181
|
+
type?: DeployDetectConditionType
|
|
182
|
+
ready?: boolean
|
|
183
|
+
message?: string
|
|
184
|
+
}
|
|
185
|
+
|
|
162
186
|
export class ModelServingManagement {
|
|
163
187
|
static CreateModelServing(req: CreateModelServingRequest, initReq?: fm.InitReq): Promise<ModelServing> {
|
|
164
188
|
return fm.fetchReq<CreateModelServingRequest, ModelServing>(`/apis/hydra.io/v1alpha1/model-serving`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
@@ -180,6 +204,9 @@ export class ModelServingManagement {
|
|
|
180
204
|
}
|
|
181
205
|
}
|
|
182
206
|
export class WSModelServingManagement {
|
|
207
|
+
static DetectWSModelServing(req: WSModelServingDeployDetectionRequest, initReq?: fm.InitReq): Promise<ModelServingDeployDetectionResponse> {
|
|
208
|
+
return fm.fetchReq<WSModelServingDeployDetectionRequest, ModelServingDeployDetectionResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/detect`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
209
|
+
}
|
|
183
210
|
static CreateWSModelServing(req: CreateWSModelServingRequest, initReq?: fm.InitReq): Promise<WSModelServing> {
|
|
184
211
|
return fm.fetchReq<CreateWSModelServingRequest, WSModelServing>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/model-serving`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
185
212
|
}
|