@daocloud-proto/hydra 0.11.0-dev-28 → 0.11.0-dev-32

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.
@@ -25,6 +25,7 @@ export type ModelWeightsVolume = {
25
25
  mountPath?: string
26
26
  creationTimestamp?: GoogleProtobufTimestamp.Timestamp
27
27
  updateTimestamp?: GoogleProtobufTimestamp.Timestamp
28
+ referenced?: boolean
28
29
  }
29
30
 
30
31
  export type CreateModelWeightsVolumeRequest = {
@@ -0,0 +1,142 @@
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 RegistryType {
12
+ REGISTRY_TYPE_UNSPECIFIED = "REGISTRY_TYPE_UNSPECIFIED",
13
+ REGISTRY_TYPE_HARBOR = "REGISTRY_TYPE_HARBOR",
14
+ REGISTRY_TYPE_DOCKER = "REGISTRY_TYPE_DOCKER",
15
+ REGISTRY_TYPE_JFROG = "REGISTRY_TYPE_JFROG",
16
+ }
17
+
18
+ export enum Scope {
19
+ SCOPE_UNKNOWN = "SCOPE_UNKNOWN",
20
+ SCOPE_GLOBAL = "SCOPE_GLOBAL",
21
+ SCOPE_WORKSPACE = "SCOPE_WORKSPACE",
22
+ }
23
+
24
+ export enum Visibility {
25
+ VISIBLE_UNKNOWN = "VISIBLE_UNKNOWN",
26
+ VISIBLE_PUBLIC = "VISIBLE_PUBLIC",
27
+ VISIBLE_PRIVATE = "VISIBLE_PRIVATE",
28
+ }
29
+
30
+ export type ListRegistriesRequest = {
31
+ workspace?: number
32
+ global?: boolean
33
+ page?: HydraCommonCommon.Pagination
34
+ }
35
+
36
+ export type Registry = {
37
+ host?: string
38
+ name?: string
39
+ type?: RegistryType
40
+ scope?: Scope
41
+ }
42
+
43
+ export type ListRegistriesResponse = {
44
+ items?: Registry[]
45
+ page?: HydraCommonCommon.Pagination
46
+ }
47
+
48
+ export type ListProjectsRequest = {
49
+ workspace?: number
50
+ registry?: string
51
+ public?: boolean
52
+ page?: HydraCommonCommon.Pagination
53
+ onlyBind?: boolean
54
+ all?: boolean
55
+ }
56
+
57
+ export type Project = {
58
+ name?: string
59
+ visible?: Visibility
60
+ }
61
+
62
+ export type ListProjectsResponse = {
63
+ items?: Project[]
64
+ page?: HydraCommonCommon.Pagination
65
+ }
66
+
67
+ export type ListRepositoriesRequest = {
68
+ workspace?: number
69
+ registry?: string
70
+ project?: string
71
+ page?: HydraCommonCommon.Pagination
72
+ }
73
+
74
+ export type Tag = {
75
+ name?: string
76
+ creationTimestamp?: GoogleProtobufTimestamp.Timestamp
77
+ }
78
+
79
+ export type Repository = {
80
+ name?: string
81
+ updateTimestamp?: GoogleProtobufTimestamp.Timestamp
82
+ }
83
+
84
+ export type ListRepositoriesResponse = {
85
+ items?: Repository[]
86
+ page?: HydraCommonCommon.Pagination
87
+ }
88
+
89
+ export type ListArtifactsRequest = {
90
+ workspace?: number
91
+ registry?: string
92
+ project?: string
93
+ repository?: string
94
+ page?: HydraCommonCommon.Pagination
95
+ }
96
+
97
+ export type Artifact = {
98
+ digest?: string
99
+ tags?: Tag[]
100
+ imageSize?: string
101
+ creationTimestamp?: GoogleProtobufTimestamp.Timestamp
102
+ }
103
+
104
+ export type ListArtifactsResponse = {
105
+ items?: Artifact[]
106
+ page?: HydraCommonCommon.Pagination
107
+ }
108
+
109
+ export type ListSecretsRequest = {
110
+ cluster?: string
111
+ namespace?: string
112
+ type?: string
113
+ }
114
+
115
+ export type Secret = {
116
+ name?: string
117
+ namespace?: string
118
+ cluster?: string
119
+ type?: string
120
+ }
121
+
122
+ export type ListSecretsResponse = {
123
+ items?: Secret[]
124
+ }
125
+
126
+ export class Image {
127
+ static ListRegistries(req: ListRegistriesRequest, initReq?: fm.InitReq): Promise<ListRegistriesResponse> {
128
+ return fm.fetchReq<ListRegistriesRequest, ListRegistriesResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/registries?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
129
+ }
130
+ static ListProjects(req: ListProjectsRequest, initReq?: fm.InitReq): Promise<ListProjectsResponse> {
131
+ return fm.fetchReq<ListProjectsRequest, ListProjectsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/projects?${fm.renderURLSearchParams(req, ["workspace", "registry"])}`, {...initReq, method: "GET"})
132
+ }
133
+ static ListRepositories(req: ListRepositoriesRequest, initReq?: fm.InitReq): Promise<ListRepositoriesResponse> {
134
+ return fm.fetchReq<ListRepositoriesRequest, ListRepositoriesResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/repositories?${fm.renderURLSearchParams(req, ["workspace", "registry"])}`, {...initReq, method: "GET"})
135
+ }
136
+ static ListArtifacts(req: ListArtifactsRequest, initReq?: fm.InitReq): Promise<ListArtifactsResponse> {
137
+ return fm.fetchReq<ListArtifactsRequest, ListArtifactsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/repositories/${req["repository"]}/artifacts?${fm.renderURLSearchParams(req, ["workspace", "registry", "repository"])}`, {...initReq, method: "GET"})
138
+ }
139
+ static ListSecrets(req: ListSecretsRequest, initReq?: fm.InitReq): Promise<ListSecretsResponse> {
140
+ return fm.fetchReq<ListSecretsRequest, ListSecretsResponse>(`/apis/hydra.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/secrets?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
141
+ }
142
+ }
@@ -25,6 +25,7 @@ export type WSModelWeightsVolume = {
25
25
  mountPath?: string
26
26
  creationTimestamp?: GoogleProtobufTimestamp.Timestamp
27
27
  updateTimestamp?: GoogleProtobufTimestamp.Timestamp
28
+ referenced?: boolean
28
29
  }
29
30
 
30
31
  export type CreateWSModelWeightsVolumeRequest = {
@@ -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,41 @@ 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 RuntimeConfig = {
89
+ runtimeType?: InferenceRuntime
90
+ runtimeImage?: string
91
+ versionRequired?: string
92
+ imagePullSecretName?: string[]
93
+ runtimeCommand?: string
94
+ env?: EnvVar[]
95
+ }
96
+
44
97
  export type CreateModelServingRequest = {
45
98
  name?: string
46
99
  modelId?: string
@@ -50,15 +103,23 @@ export type CreateModelServingRequest = {
50
103
  paymentMethods?: PaymentMethod
51
104
  }
52
105
 
53
- export type CreateWSModelServingRequest = {
106
+
107
+ /* hydra modified */ export type BaseCreateWSModelServingRequest = {
54
108
  name?: string
55
109
  modelId?: string
56
110
  workspace?: number
57
111
  cluster?: string
58
112
  namespace?: string
59
113
  replicas?: number
114
+ nodeSize?: number
115
+ weightVolumeId?: string
116
+ resourceConfig?: ResourceConfig
117
+ runtimeConfig?: RuntimeConfig
60
118
  }
61
119
 
120
+ export type CreateWSModelServingRequest = BaseCreateWSModelServingRequest
121
+ & OneOf<{ weightVolumeConfig: WeightVolumeConfig }>
122
+
62
123
  export type ModelServing = {
63
124
  id?: string
64
125
  name?: string
@@ -88,6 +149,7 @@ export type WSModelServing = {
88
149
  modelName?: string
89
150
  cluster?: string
90
151
  replicas?: number
152
+ nodeSize?: number
91
153
  status?: ModelServingStatus
92
154
  creationTimestamp?: GoogleProtobufTimestamp.Timestamp
93
155
  accessModelName?: string
@@ -95,6 +157,9 @@ export type WSModelServing = {
95
157
  address?: string
96
158
  modelAvatar?: string
97
159
  modelSupportFeature?: HydraManagement_apiModelV1alpha1Model.ModelSupportFeature[]
160
+ resourceConfig?: ResourceConfig
161
+ runtimeConfig?: RuntimeConfig
162
+ weightVolumeConfig?: WeightVolumeConfig
98
163
  }
99
164
 
100
165
  export type ListModelServingRequest = {
@@ -166,13 +231,21 @@ export type WSModelServingActionRequest = {
166
231
  action?: WSModelServingActionRequestAction
167
232
  }
168
233
 
169
- export type WSModelServingDeployDetectionRequest = {
234
+
235
+ /* hydra modified */ export type BaseWSModelServingDeployDetectionRequest = {
170
236
  workspace?: number
171
237
  modelId?: string
172
238
  cluster?: string
173
239
  namespace?: string
240
+ nodeSize?: number
241
+ weightVolumeId?: string
242
+ resourceConfig?: ResourceConfig
243
+ runtimeConfig?: RuntimeConfig
174
244
  }
175
245
 
246
+ export type WSModelServingDeployDetectionRequest = BaseWSModelServingDeployDetectionRequest
247
+ & OneOf<{ weightVolumeConfig: WeightVolumeConfig }>
248
+
176
249
  export type ModelServingDeployDetectionResponse = {
177
250
  ready?: boolean
178
251
  conditions?: DeployDetectCondition[]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/hydra",
3
- "version": "v0.11.0-dev-28",
3
+ "version": "v0.11.0-dev-32",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"