@daocloud-proto/hydra 0.11.0-dev-13 → 0.11.0-dev-17
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.
|
@@ -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
|
import * as HydraManagement_apiModelV1alpha1Model from "../../../management-api/model/v1alpha1/model.pb"
|
|
11
12
|
|
|
@@ -121,6 +122,15 @@ export type AddDeployTemplatesRequest = {
|
|
|
121
122
|
deployTemplates?: HydraManagement_apiModelV1alpha1Model.DeployTemplate[]
|
|
122
123
|
}
|
|
123
124
|
|
|
125
|
+
export type ModelTemplate = {
|
|
126
|
+
templateId?: string
|
|
127
|
+
modelId?: string
|
|
128
|
+
workspace?: number
|
|
129
|
+
spec?: HydraManagement_apiModelV1alpha1Model.DeployTemplate
|
|
130
|
+
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
131
|
+
updateTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
132
|
+
}
|
|
133
|
+
|
|
124
134
|
export type UpdateDeployTemplatesRequest = {
|
|
125
135
|
modelId?: string
|
|
126
136
|
deployTemplates?: HydraManagement_apiModelV1alpha1Model.DeployTemplate[]
|
|
@@ -160,4 +170,21 @@ export class AdminModelManagement {
|
|
|
160
170
|
static UpdateDeployTemplates(req: UpdateDeployTemplatesRequest, initReq?: fm.InitReq): Promise<Model> {
|
|
161
171
|
return fm.fetchReq<UpdateDeployTemplatesRequest, Model>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/deploy_templates`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
162
172
|
}
|
|
173
|
+
}
|
|
174
|
+
export class AdminModelTemplateManagement {
|
|
175
|
+
static CreateModelTemplate(req: HydraManagement_apiModelV1alpha1Model.CreateModelTemplateRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiModelV1alpha1Model.ModelTemplate> {
|
|
176
|
+
return fm.fetchReq<HydraManagement_apiModelV1alpha1Model.CreateModelTemplateRequest, HydraManagement_apiModelV1alpha1Model.ModelTemplate>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/model-templates`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
177
|
+
}
|
|
178
|
+
static GetModelTemplate(req: HydraManagement_apiModelV1alpha1Model.GetModelTemplateRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiModelV1alpha1Model.ModelTemplate> {
|
|
179
|
+
return fm.fetchReq<HydraManagement_apiModelV1alpha1Model.GetModelTemplateRequest, HydraManagement_apiModelV1alpha1Model.ModelTemplate>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/model-templates/${req["templateId"]}?${fm.renderURLSearchParams(req, ["modelId", "templateId"])}`, {...initReq, method: "GET"})
|
|
180
|
+
}
|
|
181
|
+
static UpdateModelTemplate(req: HydraManagement_apiModelV1alpha1Model.UpdateModelTemplateRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiModelV1alpha1Model.ModelTemplate> {
|
|
182
|
+
return fm.fetchReq<HydraManagement_apiModelV1alpha1Model.UpdateModelTemplateRequest, HydraManagement_apiModelV1alpha1Model.ModelTemplate>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/model-templates/${req["templateId"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
183
|
+
}
|
|
184
|
+
static DeleteModelTemplate(req: HydraManagement_apiModelV1alpha1Model.DeleteModelTemplateRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
185
|
+
return fm.fetchReq<HydraManagement_apiModelV1alpha1Model.DeleteModelTemplateRequest, GoogleProtobufEmpty.Empty>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/model-templates/${req["templateId"]}`, {...initReq, method: "DELETE"})
|
|
186
|
+
}
|
|
187
|
+
static ListModelTemplates(req: HydraManagement_apiModelV1alpha1Model.ListModelTemplatesRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiModelV1alpha1Model.ListModelTemplatesResponse> {
|
|
188
|
+
return fm.fetchReq<HydraManagement_apiModelV1alpha1Model.ListModelTemplatesRequest, HydraManagement_apiModelV1alpha1Model.ListModelTemplatesResponse>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/model-templates?${fm.renderURLSearchParams(req, ["modelId"])}`, {...initReq, method: "GET"})
|
|
189
|
+
}
|
|
163
190
|
}
|
|
@@ -27,7 +27,7 @@ export enum PrePullActionRequestAction {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export type FilesStorageStatus = {
|
|
30
|
-
phase?:
|
|
30
|
+
phase?: HydraManagement_apiStorageV1alpha1Filesstorage.PvcPhase
|
|
31
31
|
reason?: string
|
|
32
32
|
pvcName?: string
|
|
33
33
|
pvcNamespace?: string
|
|
@@ -90,10 +90,19 @@ export type ListFilesRequest = {
|
|
|
90
90
|
name?: string
|
|
91
91
|
path?: string
|
|
92
92
|
type?: HydraStorageserverV1alpha1Storage_server.FileType
|
|
93
|
+
searchKeyword?: string
|
|
94
|
+
page?: HydraCommonCommon.Pagination
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export type DeleteFileRequest = {
|
|
98
|
+
name?: string
|
|
99
|
+
fileName?: string
|
|
100
|
+
path?: string
|
|
93
101
|
}
|
|
94
102
|
|
|
95
103
|
export type ListFilesResponse = {
|
|
96
104
|
files?: FileInfo[]
|
|
105
|
+
page?: HydraCommonCommon.Pagination
|
|
97
106
|
}
|
|
98
107
|
|
|
99
108
|
export type CreateFolderRequest = {
|
|
@@ -180,6 +189,13 @@ export type SinglePrePullRequest = {
|
|
|
180
189
|
prepullName?: string
|
|
181
190
|
}
|
|
182
191
|
|
|
192
|
+
export type ListFilesStorageClustersRequest = {
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export type ListFilesStorageClustersResponse = {
|
|
196
|
+
clusters?: string[]
|
|
197
|
+
}
|
|
198
|
+
|
|
183
199
|
export class AdminFilesStorageService {
|
|
184
200
|
static ListFilesStorages(req: ListFilesStoragesRequest, initReq?: fm.InitReq): Promise<ListFilesStoragesResponse> {
|
|
185
201
|
return fm.fetchReq<ListFilesStoragesRequest, ListFilesStoragesResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -199,6 +215,12 @@ export class AdminFilesStorageService {
|
|
|
199
215
|
static ListFiles(req: ListFilesRequest, initReq?: fm.InitReq): Promise<ListFilesResponse> {
|
|
200
216
|
return fm.fetchReq<ListFilesRequest, ListFilesResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}/files?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
|
|
201
217
|
}
|
|
218
|
+
static DeleteFile(req: DeleteFileRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
219
|
+
return fm.fetchReq<DeleteFileRequest, GoogleProtobufEmpty.Empty>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}/files/${req["fileName"]}`, {...initReq, method: "DELETE"})
|
|
220
|
+
}
|
|
221
|
+
static ListFilesStorageClusters(req: ListFilesStorageClustersRequest, initReq?: fm.InitReq): Promise<ListFilesStorageClustersResponse> {
|
|
222
|
+
return fm.fetchReq<ListFilesStorageClustersRequest, ListFilesStorageClustersResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorage-clusters?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
223
|
+
}
|
|
202
224
|
static CreateFolder(req: CreateFolderRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
203
225
|
return fm.fetchReq<CreateFolderRequest, GoogleProtobufEmpty.Empty>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}/folders/${req["folderName"]}`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
204
226
|
}
|
|
@@ -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 {
|
|
@@ -114,6 +115,7 @@ export type DeployTemplate = {
|
|
|
114
115
|
customDeployArgs?: string[]
|
|
115
116
|
env?: EnvVar[]
|
|
116
117
|
inferenceRuntime?: string
|
|
118
|
+
runtimeCommand?: string
|
|
117
119
|
}
|
|
118
120
|
|
|
119
121
|
export type EnvVar = {
|
|
@@ -121,6 +123,15 @@ export type EnvVar = {
|
|
|
121
123
|
value?: string
|
|
122
124
|
}
|
|
123
125
|
|
|
126
|
+
export type ModelTemplate = {
|
|
127
|
+
templateId?: string
|
|
128
|
+
modelId?: string
|
|
129
|
+
workspace?: number
|
|
130
|
+
spec?: DeployTemplate
|
|
131
|
+
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
132
|
+
updateTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
133
|
+
}
|
|
134
|
+
|
|
124
135
|
export type ListWSModelRequest = {
|
|
125
136
|
workspace?: number
|
|
126
137
|
page?: HydraCommonCommon.Pagination
|
|
@@ -182,6 +193,43 @@ export type ListPrivateModelRequest = {
|
|
|
182
193
|
page?: HydraCommonCommon.Pagination
|
|
183
194
|
}
|
|
184
195
|
|
|
196
|
+
export type CreateModelTemplateRequest = {
|
|
197
|
+
workspace?: number
|
|
198
|
+
modelId?: string
|
|
199
|
+
spec?: DeployTemplate
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export type GetModelTemplateRequest = {
|
|
203
|
+
workspace?: number
|
|
204
|
+
templateId?: string
|
|
205
|
+
modelId?: string
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export type UpdateModelTemplateRequest = {
|
|
209
|
+
workspace?: number
|
|
210
|
+
templateId?: string
|
|
211
|
+
spec?: DeployTemplate
|
|
212
|
+
modelId?: string
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export type DeleteModelTemplateRequest = {
|
|
216
|
+
workspace?: number
|
|
217
|
+
templateId?: string
|
|
218
|
+
modelId?: string
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export type ListModelTemplatesRequest = {
|
|
222
|
+
workspace?: number
|
|
223
|
+
modelId?: string
|
|
224
|
+
inferenceRuntime?: string
|
|
225
|
+
page?: HydraCommonCommon.Pagination
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export type ListModelTemplatesResponse = {
|
|
229
|
+
items?: ModelTemplate[]
|
|
230
|
+
page?: HydraCommonCommon.Pagination
|
|
231
|
+
}
|
|
232
|
+
|
|
185
233
|
export class ModelManagement {
|
|
186
234
|
static GetModel(req: SingleModelRequest, initReq?: fm.InitReq): Promise<Model> {
|
|
187
235
|
return fm.fetchReq<SingleModelRequest, Model>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}?${fm.renderURLSearchParams(req, ["modelId"])}`, {...initReq, method: "GET"})
|
|
@@ -212,4 +260,21 @@ export class WSModelManagement {
|
|
|
212
260
|
static DeletePrivateModel(req: SingleWSModelRequest, initReq?: fm.InitReq): Promise<WSModel> {
|
|
213
261
|
return fm.fetchReq<SingleWSModelRequest, WSModel>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/private-models/${req["modelId"]}`, {...initReq, method: "DELETE"})
|
|
214
262
|
}
|
|
263
|
+
}
|
|
264
|
+
export class WSModelTemplateManagement {
|
|
265
|
+
static CreateWSModelTemplate(req: CreateModelTemplateRequest, initReq?: fm.InitReq): Promise<ModelTemplate> {
|
|
266
|
+
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)})
|
|
267
|
+
}
|
|
268
|
+
static GetWSModelTemplate(req: GetModelTemplateRequest, initReq?: fm.InitReq): Promise<ModelTemplate> {
|
|
269
|
+
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"})
|
|
270
|
+
}
|
|
271
|
+
static UpdateWSModelTemplate(req: UpdateModelTemplateRequest, initReq?: fm.InitReq): Promise<ModelTemplate> {
|
|
272
|
+
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)})
|
|
273
|
+
}
|
|
274
|
+
static DeleteWSModelTemplate(req: DeleteModelTemplateRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
275
|
+
return fm.fetchReq<DeleteModelTemplateRequest, GoogleProtobufEmpty.Empty>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/models/${req["modelId"]}/model-templates/${req["templateId"]}`, {...initReq, method: "DELETE"})
|
|
276
|
+
}
|
|
277
|
+
static ListWSModelTemplates(req: ListModelTemplatesRequest, initReq?: fm.InitReq): Promise<ListModelTemplatesResponse> {
|
|
278
|
+
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"})
|
|
279
|
+
}
|
|
215
280
|
}
|
|
@@ -20,6 +20,14 @@ type OneOf<T> =
|
|
|
20
20
|
: never)
|
|
21
21
|
: never);
|
|
22
22
|
|
|
23
|
+
export enum PvcPhase {
|
|
24
|
+
PvcPhaseUnknown = "PvcPhaseUnknown",
|
|
25
|
+
PvcPhaseBound = "PvcPhaseBound",
|
|
26
|
+
PvcPhasePending = "PvcPhasePending",
|
|
27
|
+
PvcPhaseLost = "PvcPhaseLost",
|
|
28
|
+
PvcPhaseFailed = "PvcPhaseFailed",
|
|
29
|
+
}
|
|
30
|
+
|
|
23
31
|
export enum DataSourceType {
|
|
24
32
|
DATA_SOURCE_TYPE_UNSPECIFIED = "DATA_SOURCE_TYPE_UNSPECIFIED",
|
|
25
33
|
GIT = "GIT",
|
|
@@ -63,7 +71,7 @@ export enum PrePullActionRequestAction {
|
|
|
63
71
|
}
|
|
64
72
|
|
|
65
73
|
export type FilesStorageStatus = {
|
|
66
|
-
phase?:
|
|
74
|
+
phase?: PvcPhase
|
|
67
75
|
reason?: string
|
|
68
76
|
pvcName?: string
|
|
69
77
|
pvcNamespace?: string
|
|
@@ -133,10 +141,13 @@ export type ListFilesRequest = {
|
|
|
133
141
|
name?: string
|
|
134
142
|
path?: string
|
|
135
143
|
type?: HydraStorageserverV1alpha1Storage_server.FileType
|
|
144
|
+
searchKeyword?: string
|
|
145
|
+
page?: HydraCommonCommon.Pagination
|
|
136
146
|
}
|
|
137
147
|
|
|
138
148
|
export type ListFilesResponse = {
|
|
139
149
|
files?: FileInfo[]
|
|
150
|
+
page?: HydraCommonCommon.Pagination
|
|
140
151
|
}
|
|
141
152
|
|
|
142
153
|
export type CreateFolderRequest = {
|
|
@@ -146,6 +157,13 @@ export type CreateFolderRequest = {
|
|
|
146
157
|
path?: string
|
|
147
158
|
}
|
|
148
159
|
|
|
160
|
+
export type DeleteFileRequest = {
|
|
161
|
+
workspace?: number
|
|
162
|
+
name?: string
|
|
163
|
+
fileName?: string
|
|
164
|
+
path?: string
|
|
165
|
+
}
|
|
166
|
+
|
|
149
167
|
export type DataSource = {
|
|
150
168
|
type?: DataSourceType
|
|
151
169
|
uri?: string
|
|
@@ -354,10 +372,21 @@ export type PodInstanceListResponse = {
|
|
|
354
372
|
page?: HydraCommonCommon.Pagination
|
|
355
373
|
}
|
|
356
374
|
|
|
375
|
+
export type ListWSFilesStorageClustersRequest = {
|
|
376
|
+
workspace?: number
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
export type ListWSFilesStorageClustersResponse = {
|
|
380
|
+
clusters?: string[]
|
|
381
|
+
}
|
|
382
|
+
|
|
357
383
|
export class WSFilesStorageService {
|
|
358
384
|
static ListWSFilesStorages(req: ListFilesStoragesRequest, initReq?: fm.InitReq): Promise<ListFilesStoragesResponse> {
|
|
359
385
|
return fm.fetchReq<ListFilesStoragesRequest, ListFilesStoragesResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
360
386
|
}
|
|
387
|
+
static ListWSFilesStorageClusters(req: ListWSFilesStorageClustersRequest, initReq?: fm.InitReq): Promise<ListWSFilesStorageClustersResponse> {
|
|
388
|
+
return fm.fetchReq<ListWSFilesStorageClustersRequest, ListWSFilesStorageClustersResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorage-clusters?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
389
|
+
}
|
|
361
390
|
static GetWSFilesStorage(req: GetFilesStorageRequest, initReq?: fm.InitReq): Promise<FilesStorage> {
|
|
362
391
|
return fm.fetchReq<GetFilesStorageRequest, FilesStorage>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "name"])}`, {...initReq, method: "GET"})
|
|
363
392
|
}
|
|
@@ -373,6 +402,9 @@ export class WSFilesStorageService {
|
|
|
373
402
|
static ListWSFiles(req: ListFilesRequest, initReq?: fm.InitReq): Promise<ListFilesResponse> {
|
|
374
403
|
return fm.fetchReq<ListFilesRequest, ListFilesResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}/files?${fm.renderURLSearchParams(req, ["workspace", "name"])}`, {...initReq, method: "GET"})
|
|
375
404
|
}
|
|
405
|
+
static DeleteWSFile(req: DeleteFileRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
406
|
+
return fm.fetchReq<DeleteFileRequest, GoogleProtobufEmpty.Empty>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}/files/${req["fileName"]}`, {...initReq, method: "DELETE"})
|
|
407
|
+
}
|
|
376
408
|
static CreateWSFolder(req: CreateFolderRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
377
409
|
return fm.fetchReq<CreateFolderRequest, GoogleProtobufEmpty.Empty>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}/folders/${req["folderName"]}`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
378
410
|
}
|