@daocloud-proto/hydra 0.16.0-dev-11 → 0.16.0-dev-12

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.
@@ -9,6 +9,15 @@ import * as fm from "../../../fetch.pb"
9
9
  import * as GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
10
10
  import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
11
11
 
12
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
13
+ type OneOf<T> =
14
+ | { [k in keyof T]?: undefined }
15
+ | (
16
+ keyof T extends infer K ?
17
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
18
+ : never)
19
+ : never);
20
+
12
21
  export enum ModelSupportFeature {
13
22
  MODEL_SUPPORT_TYPE_UNSPECIFIED = "MODEL_SUPPORT_TYPE_UNSPECIFIED",
14
23
  TEXT_GENERATION = "TEXT_GENERATION",
@@ -148,6 +157,9 @@ export type DeployTemplate = {
148
157
  runtimeCommand?: string
149
158
  templateName?: string
150
159
  templateDescription?: string
160
+ workerCommand?: string
161
+ workerEnv?: EnvVar[]
162
+ distributed?: boolean
151
163
  }
152
164
 
153
165
  export type EnvVar = {
@@ -251,13 +263,17 @@ export type DeleteModelTemplateRequest = {
251
263
  modelId?: string
252
264
  }
253
265
 
254
- export type ListModelTemplatesRequest = {
266
+
267
+ /* hydra modified */ export type BaseListModelTemplatesRequest = {
255
268
  workspace?: number
256
269
  modelId?: string
257
270
  inferenceRuntime?: string
258
271
  page?: HydraCommonCommon.Pagination
259
272
  }
260
273
 
274
+ export type ListModelTemplatesRequest = BaseListModelTemplatesRequest
275
+ & OneOf<{ distributed: boolean }>
276
+
261
277
  export type ListModelTemplatesResponse = {
262
278
  items?: ModelTemplate[]
263
279
  page?: HydraCommonCommon.Pagination
@@ -65,6 +65,13 @@ export enum DeployDetectConditionType {
65
65
  MODEL_IMAGE_DOWNLOADED = "MODEL_IMAGE_DOWNLOADED",
66
66
  }
67
67
 
68
+ export enum BuiltinEnvVarScope {
69
+ SCOPE_ALL = "SCOPE_ALL",
70
+ SCOPE_DISTRIBUTED = "SCOPE_DISTRIBUTED",
71
+ SCOPE_LEADER = "SCOPE_LEADER",
72
+ SCOPE_WORKER = "SCOPE_WORKER",
73
+ }
74
+
68
75
  export enum ModelServingActionRequestAction {
69
76
  MODEL_SERVING_ACTION_UNSPECIFIED = "MODEL_SERVING_ACTION_UNSPECIFIED",
70
77
  START = "START",
@@ -157,6 +164,8 @@ export type RuntimeConfig = {
157
164
  imagePullSecretName?: string[]
158
165
  runtimeCommand?: string
159
166
  env?: EnvVar[]
167
+ workerCommand?: string
168
+ workerEnv?: EnvVar[]
160
169
  }
161
170
 
162
171
  export type CreateModelServingRequest = {
@@ -349,7 +358,9 @@ export type BuiltinEnvVar = {
349
358
  }
350
359
 
351
360
  export type ListBuiltinEnvVarsResponse = {
352
- items?: BuiltinEnvVar[]
361
+ single?: BuiltinEnvVar[]
362
+ leader?: BuiltinEnvVar[]
363
+ worker?: BuiltinEnvVar[]
353
364
  }
354
365
 
355
366
  export class ModelServingManagement {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/hydra",
3
- "version": "v0.16.0-dev-11",
3
+ "version": "v0.16.0-dev-12",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"