@daocloud-proto/hydra 0.5.0-dev-2 → 0.5.0-dev-3

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",
@@ -159,6 +165,23 @@ export type WSModelServingActionRequest = {
159
165
  action?: WSModelServingActionRequestAction
160
166
  }
161
167
 
168
+ export type WSModelServingDeployDetectionRequest = {
169
+ workspace?: number
170
+ modelId?: string
171
+ cluster?: string
172
+ }
173
+
174
+ export type ModelServingDeployDetectionResponse = {
175
+ ready?: boolean
176
+ conditions?: DeployDetectCondition[]
177
+ }
178
+
179
+ export type DeployDetectCondition = {
180
+ type?: DeployDetectConditionType
181
+ ready?: boolean
182
+ message?: string
183
+ }
184
+
162
185
  export class ModelServingManagement {
163
186
  static CreateModelServing(req: CreateModelServingRequest, initReq?: fm.InitReq): Promise<ModelServing> {
164
187
  return fm.fetchReq<CreateModelServingRequest, ModelServing>(`/apis/hydra.io/v1alpha1/model-serving`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
@@ -180,6 +203,9 @@ export class ModelServingManagement {
180
203
  }
181
204
  }
182
205
  export class WSModelServingManagement {
206
+ static DetectWSModelServing(req: WSModelServingDeployDetectionRequest, initReq?: fm.InitReq): Promise<ModelServingDeployDetectionResponse> {
207
+ return fm.fetchReq<WSModelServingDeployDetectionRequest, ModelServingDeployDetectionResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/detect`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
208
+ }
183
209
  static CreateWSModelServing(req: CreateWSModelServingRequest, initReq?: fm.InitReq): Promise<WSModelServing> {
184
210
  return fm.fetchReq<CreateWSModelServingRequest, WSModelServing>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/model-serving`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
185
211
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/hydra",
3
- "version": "v0.5.0-dev-2",
3
+ "version": "v0.5.0-dev-3",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"