@daocloud-proto/hydra 0.11.0 → 0.15.0

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.
Files changed (33) hide show
  1. package/admin-api/core/v1alpha1/core.pb.ts +59 -0
  2. package/admin-api/guardrails/v1alpha1/guardrails.pb.ts +180 -0
  3. package/admin-api/maas/v1alpha1/maas.pb.ts +3 -0
  4. package/admin-api/model/v1alpha1/model.pb.ts +51 -0
  5. package/admin-api/model/v1alpha1/model_weights_volume.pb.ts +96 -0
  6. package/admin-api/storage/v1alpha1/filesstorage.pb.ts +261 -0
  7. package/admin-api/workspace-quota/v1alpha1/workspace_quota.pb.ts +61 -0
  8. package/common/common.pb.ts +55 -0
  9. package/common/errorcode.ts +2 -2
  10. package/management-api/agent/v1alpha1/event.pb.ts +59 -0
  11. package/management-api/agent/v1alpha1/server_registration.pb.ts +33 -0
  12. package/management-api/agent/v1alpha1/sftp_user.pb.ts +39 -0
  13. package/management-api/apikey/v1alpha1/apikey.pb.ts +70 -2
  14. package/management-api/cluster/v1alpha1/cluster.pb.ts +28 -0
  15. package/management-api/core/v1alpha1/image.pb.ts +174 -0
  16. package/management-api/core/v1alpha1/management.pb.ts +17 -0
  17. package/management-api/core/v1alpha1/permissions.pb.ts +33 -11
  18. package/management-api/dataset/v1alpha1/dataset.pb.ts +110 -0
  19. package/management-api/dataset/v1alpha1/dataset_volume.pb.ts +107 -0
  20. package/management-api/event/v1alpha1/event.pb.ts +38 -0
  21. package/management-api/finetune/v1alpha1/common.pb.ts +14 -0
  22. package/management-api/finetune/v1alpha1/evaljob.pb.ts +130 -0
  23. package/management-api/finetune/v1alpha1/export_job.pb.ts +89 -0
  24. package/management-api/finetune/v1alpha1/finetuneconfig.pb.ts +239 -0
  25. package/management-api/finetune/v1alpha1/finetunejob.pb.ts +107 -0
  26. package/management-api/model/v1alpha1/model.pb.ts +114 -9
  27. package/management-api/model/v1alpha1/model_weights_volume.pb.ts +101 -0
  28. package/management-api/model_serving/v1alpha1/model_serving.pb.ts +103 -5
  29. package/management-api/model_type/v1alpha1/model_type.pb.ts +20 -0
  30. package/management-api/queue/v1alpha1/queue.pb.ts +121 -0
  31. package/management-api/storage/v1alpha1/filesstorage.pb.ts +495 -0
  32. package/management-api/workspace/v1alpha1/workspace.pb.ts +8 -0
  33. package/package.json +1 -1
@@ -0,0 +1,261 @@
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 GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
10
+ import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
11
+ import * as EventV1alpha1Event from "../../../management-api/event/v1alpha1/event.pb"
12
+ import * as HydraManagement_apiStorageV1alpha1Filesstorage from "../../../management-api/storage/v1alpha1/filesstorage.pb"
13
+ import * as HydraStorageserverV1alpha1Storage_server from "../../../storageserver/v1alpha1/storage_server.pb"
14
+
15
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
16
+ type OneOf<T> =
17
+ | { [k in keyof T]?: undefined }
18
+ | (
19
+ keyof T extends infer K ?
20
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
21
+ : never)
22
+ : never);
23
+
24
+ export enum PrePullActionRequestAction {
25
+ ACTION_UNSPECIFIED = "ACTION_UNSPECIFIED",
26
+ RERUN = "RERUN",
27
+ }
28
+
29
+ export type FilesStorageStatus = {
30
+ phase?: HydraManagement_apiStorageV1alpha1Filesstorage.PvcPhase
31
+ reason?: string
32
+ pvcName?: string
33
+ pvcNamespace?: string
34
+ storageServer?: StorageServerStatus
35
+ }
36
+
37
+ export type FilesStorage = {
38
+ name?: string
39
+ cluster?: string
40
+ pvcNamespace?: string
41
+ storageClassName?: string
42
+ capacity?: string
43
+ status?: FilesStorageStatus
44
+ createTime?: GoogleProtobufTimestamp.Timestamp
45
+ description?: string
46
+ }
47
+
48
+ export type StorageServerStatus = {
49
+ phase?: string
50
+ name?: string
51
+ namespace?: string
52
+ }
53
+
54
+ export type ListFilesStoragesRequest = {
55
+ page?: HydraCommonCommon.Pagination
56
+ cluster?: string
57
+ }
58
+
59
+ export type ListFilesStoragesResponse = {
60
+ items?: FilesStorage[]
61
+ page?: HydraCommonCommon.Pagination
62
+ }
63
+
64
+ export type GetFilesStorageRequest = {
65
+ name?: string
66
+ }
67
+
68
+ export type CreateFilesStorageRequest = {
69
+ cluster?: string
70
+ description?: string
71
+ }
72
+
73
+ export type UpdateFilesStorageRequest = {
74
+ name?: string
75
+ description?: string
76
+ }
77
+
78
+ export type DeleteFilesStorageRequest = {
79
+ name?: string
80
+ }
81
+
82
+ export type FileInfo = {
83
+ name?: string
84
+ type?: HydraStorageserverV1alpha1Storage_server.FileType
85
+ size?: string
86
+ modificationTimestamp?: string
87
+ }
88
+
89
+ export type ListFilesRequest = {
90
+ name?: string
91
+ path?: string
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
101
+ }
102
+
103
+ export type ListFilesResponse = {
104
+ files?: FileInfo[]
105
+ page?: HydraCommonCommon.Pagination
106
+ }
107
+
108
+ export type CreateFolderRequest = {
109
+ name?: string
110
+ folderName?: string
111
+ path?: string
112
+ }
113
+
114
+ export type ListPrePullsRequest = {
115
+ storageName?: string
116
+ cluster?: string
117
+ page?: HydraCommonCommon.Pagination
118
+ }
119
+
120
+ export type ListPrePullsResponse = {
121
+ items?: HydraManagement_apiStorageV1alpha1Filesstorage.PrePull[]
122
+ page?: HydraCommonCommon.Pagination
123
+ }
124
+
125
+ export type CreatePrePullRequest = {
126
+ prepullName?: string
127
+ cluster?: string
128
+ path?: string
129
+ storageName?: string
130
+ description?: string
131
+ labels?: {[key: string]: string}
132
+ annotations?: {[key: string]: string}
133
+ source?: HydraManagement_apiStorageV1alpha1Filesstorage.DataSource
134
+ secretOptions?: HydraManagement_apiStorageV1alpha1Filesstorage.SecretOptions
135
+ }
136
+
137
+
138
+ type BaseUpdatePrePullRequest = {
139
+ cluster?: string
140
+ storageName?: string
141
+ prepullName?: string
142
+ description?: string
143
+ labels?: {[key: string]: string}
144
+ annotations?: {[key: string]: string}
145
+ secretOptions?: HydraManagement_apiStorageV1alpha1Filesstorage.SecretOptions
146
+ path?: string
147
+ }
148
+
149
+ export type UpdatePrePullRequest = BaseUpdatePrePullRequest
150
+ & OneOf<{ git: HydraManagement_apiStorageV1alpha1Filesstorage.DataSourceOptionsGit; s3: HydraManagement_apiStorageV1alpha1Filesstorage.DataSourceOptionsS3; http: HydraManagement_apiStorageV1alpha1Filesstorage.DataSourceOptionsHttp; huggingFace: HydraManagement_apiStorageV1alpha1Filesstorage.DataSourceOptionsHuggingFace; modelScope: HydraManagement_apiStorageV1alpha1Filesstorage.DataSourceOptionsModelScope }>
151
+
152
+ export type DeletePrePullRequest = {
153
+ storageName?: string
154
+ prepullName?: string
155
+ }
156
+
157
+ export type PrePullActionRequest = {
158
+ cluster?: string
159
+ storageName?: string
160
+ prepullName?: string
161
+ action?: PrePullActionRequestAction
162
+ }
163
+
164
+ export type RestartPrePullRequest = {
165
+ storageName?: string
166
+ prepullName?: string
167
+ }
168
+
169
+ export type ValidateDataSourceSecretsRequest = {
170
+ source?: HydraManagement_apiStorageV1alpha1Filesstorage.DataSource
171
+ secretOptions?: HydraManagement_apiStorageV1alpha1Filesstorage.SecretOptions
172
+ }
173
+
174
+ export type ValidateDataSourceSecretsResponse = {
175
+ valid?: boolean
176
+ message?: string
177
+ }
178
+
179
+ export type ListDatasetEventsRequest = {
180
+ cluster?: string
181
+ storageName?: string
182
+ prepullName?: string
183
+ page?: HydraCommonCommon.Pagination
184
+ }
185
+
186
+ export type SinglePrePullRequest = {
187
+ cluster?: string
188
+ storageName?: string
189
+ prepullName?: string
190
+ }
191
+
192
+ export type GetPrePullRequest = {
193
+ storageName?: string
194
+ prepullName?: string
195
+ }
196
+
197
+ export class AdminFilesStorageService {
198
+ static ListFilesStorages(req: ListFilesStoragesRequest, initReq?: fm.InitReq): Promise<ListFilesStoragesResponse> {
199
+ return fm.fetchReq<ListFilesStoragesRequest, ListFilesStoragesResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
200
+ }
201
+ static GetFilesStorage(req: GetFilesStorageRequest, initReq?: fm.InitReq): Promise<FilesStorage> {
202
+ return fm.fetchReq<GetFilesStorageRequest, FilesStorage>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
203
+ }
204
+ static CreateFilesStorage(req: CreateFilesStorageRequest, initReq?: fm.InitReq): Promise<FilesStorage> {
205
+ return fm.fetchReq<CreateFilesStorageRequest, FilesStorage>(`/apis/admin.hydra.io/v1alpha1/filesstorages`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
206
+ }
207
+ static UpdateFilesStorage(req: UpdateFilesStorageRequest, initReq?: fm.InitReq): Promise<FilesStorage> {
208
+ return fm.fetchReq<UpdateFilesStorageRequest, FilesStorage>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
209
+ }
210
+ static DeleteFilesStorage(req: DeleteFilesStorageRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
211
+ return fm.fetchReq<DeleteFilesStorageRequest, GoogleProtobufEmpty.Empty>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}`, {...initReq, method: "DELETE"})
212
+ }
213
+ static ListFiles(req: ListFilesRequest, initReq?: fm.InitReq): Promise<ListFilesResponse> {
214
+ return fm.fetchReq<ListFilesRequest, ListFilesResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}/files?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
215
+ }
216
+ static DeleteFile(req: DeleteFileRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
217
+ return fm.fetchReq<DeleteFileRequest, GoogleProtobufEmpty.Empty>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}/files/${req["fileName"]}:delete`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
218
+ }
219
+ static CreateFolder(req: CreateFolderRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
220
+ 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)})
221
+ }
222
+ static ListReferencedBy(req: HydraManagement_apiStorageV1alpha1Filesstorage.ListReferencedByRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.ListReferencedByResponse> {
223
+ return fm.fetchReq<HydraManagement_apiStorageV1alpha1Filesstorage.ListReferencedByRequest, HydraManagement_apiStorageV1alpha1Filesstorage.ListReferencedByResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}/referencedby/${req["itemType"]}?${fm.renderURLSearchParams(req, ["name", "itemType"])}`, {...initReq, method: "GET"})
224
+ }
225
+ static ListPrePulls(req: ListPrePullsRequest, initReq?: fm.InitReq): Promise<ListPrePullsResponse> {
226
+ return fm.fetchReq<ListPrePullsRequest, ListPrePullsResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls?${fm.renderURLSearchParams(req, ["storageName"])}`, {...initReq, method: "GET"})
227
+ }
228
+ static CreatePrePull(req: CreatePrePullRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.PrePull> {
229
+ return fm.fetchReq<CreatePrePullRequest, HydraManagement_apiStorageV1alpha1Filesstorage.PrePull>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
230
+ }
231
+ static UpdatePrePull(req: UpdatePrePullRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.PrePull> {
232
+ return fm.fetchReq<UpdatePrePullRequest, HydraManagement_apiStorageV1alpha1Filesstorage.PrePull>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
233
+ }
234
+ static DeletePrePull(req: DeletePrePullRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
235
+ return fm.fetchReq<DeletePrePullRequest, GoogleProtobufEmpty.Empty>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}`, {...initReq, method: "DELETE"})
236
+ }
237
+ static DatasetDoAction(req: PrePullActionRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.PrePull> {
238
+ return fm.fetchReq<PrePullActionRequest, HydraManagement_apiStorageV1alpha1Filesstorage.PrePull>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}/actions`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
239
+ }
240
+ static ListPrePullEvents(req: ListDatasetEventsRequest, initReq?: fm.InitReq): Promise<EventV1alpha1Event.ListEventsResponse> {
241
+ return fm.fetchReq<ListDatasetEventsRequest, EventV1alpha1Event.ListEventsResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}/events?${fm.renderURLSearchParams(req, ["storageName", "prepullName"])}`, {...initReq, method: "GET"})
242
+ }
243
+ static GetPrePullSyncProcess(req: SinglePrePullRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.PrePullSyncProcess> {
244
+ return fm.fetchReq<SinglePrePullRequest, HydraManagement_apiStorageV1alpha1Filesstorage.PrePullSyncProcess>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}/sync-process?${fm.renderURLSearchParams(req, ["storageName", "prepullName"])}`, {...initReq, method: "GET"})
245
+ }
246
+ static ValidateDataSourceSecrets(req: ValidateDataSourceSecretsRequest, initReq?: fm.InitReq): Promise<ValidateDataSourceSecretsResponse> {
247
+ return fm.fetchReq<ValidateDataSourceSecretsRequest, ValidateDataSourceSecretsResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages/validate-secrets`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
248
+ }
249
+ static GetPodInstanceList(req: HydraManagement_apiStorageV1alpha1Filesstorage.PodRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.PodInstanceListResponse> {
250
+ return fm.fetchReq<HydraManagement_apiStorageV1alpha1Filesstorage.PodRequest, HydraManagement_apiStorageV1alpha1Filesstorage.PodInstanceListResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}/pods?${fm.renderURLSearchParams(req, ["storageName", "prepullName"])}`, {...initReq, method: "GET"})
251
+ }
252
+ static GetPrePull(req: GetPrePullRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.PrePull> {
253
+ return fm.fetchReq<GetPrePullRequest, HydraManagement_apiStorageV1alpha1Filesstorage.PrePull>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}?${fm.renderURLSearchParams(req, ["storageName", "prepullName"])}`, {...initReq, method: "GET"})
254
+ }
255
+ static CreateSFTPAccess(req: HydraManagement_apiStorageV1alpha1Filesstorage.CreateSFTPAccessRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.SFTPAccessResponse> {
256
+ return fm.fetchReq<HydraManagement_apiStorageV1alpha1Filesstorage.CreateSFTPAccessRequest, HydraManagement_apiStorageV1alpha1Filesstorage.SFTPAccessResponse>(`/apis/hydra.io/v1alpha1/filesstorages/${req["storageName"]}/sftp-access`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
257
+ }
258
+ static GetSFTPAccess(req: HydraManagement_apiStorageV1alpha1Filesstorage.GetSFTPAccessRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.SFTPAccessResponse> {
259
+ return fm.fetchReq<HydraManagement_apiStorageV1alpha1Filesstorage.GetSFTPAccessRequest, HydraManagement_apiStorageV1alpha1Filesstorage.SFTPAccessResponse>(`/apis/hydra.io/v1alpha1/filesstorages/${req["storageName"]}/sftp-access?${fm.renderURLSearchParams(req, ["storageName"])}`, {...initReq, method: "GET"})
260
+ }
261
+ }
@@ -0,0 +1,61 @@
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 RefreshCycle {
12
+ REFRESH_CYCLE_UNSPECIFIED = "REFRESH_CYCLE_UNSPECIFIED",
13
+ REFRESH_CYCLE_DAY = "REFRESH_CYCLE_DAY",
14
+ REFRESH_CYCLE_WEEK = "REFRESH_CYCLE_WEEK",
15
+ REFRESH_CYCLE_MONTH = "REFRESH_CYCLE_MONTH",
16
+ }
17
+
18
+ export type WorkspaceQuota = {
19
+ workspace?: number
20
+ quota?: string
21
+ nextRefreshTime?: GoogleProtobufTimestamp.Timestamp
22
+ refreshCycle?: RefreshCycle
23
+ usedQuota?: string
24
+ allocatedQuota?: string
25
+ updateTime?: GoogleProtobufTimestamp.Timestamp
26
+ unlimitedQuota?: boolean
27
+ workspaceName?: string
28
+ }
29
+
30
+ export type ListWorkspaceQuotasRequest = {
31
+ page?: HydraCommonCommon.Pagination
32
+ workspace?: number
33
+ }
34
+
35
+ export type ListWorkspaceQuotasResponse = {
36
+ items?: WorkspaceQuota[]
37
+ page?: HydraCommonCommon.Pagination
38
+ }
39
+
40
+ export type UpdateWorkspaceQuotaRequest = {
41
+ workspace?: number
42
+ quota?: string
43
+ unlimitedQuota?: boolean
44
+ }
45
+
46
+ export type UpdateWorkspaceQuotaRefreshCycleRequest = {
47
+ workspace?: number
48
+ refreshCycle?: RefreshCycle
49
+ }
50
+
51
+ export class WorkspaceQuotaService {
52
+ static ListWorkspaceQuotas(req: ListWorkspaceQuotasRequest, initReq?: fm.InitReq): Promise<ListWorkspaceQuotasResponse> {
53
+ return fm.fetchReq<ListWorkspaceQuotasRequest, ListWorkspaceQuotasResponse>(`/apis/admin.hydra.io/v1alpha1/workspace-quotas?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
54
+ }
55
+ static UpdateWorkspaceQuota(req: UpdateWorkspaceQuotaRequest, initReq?: fm.InitReq): Promise<WorkspaceQuota> {
56
+ return fm.fetchReq<UpdateWorkspaceQuotaRequest, WorkspaceQuota>(`/apis/admin.hydra.io/v1alpha1/workspace-quotas/${req["workspace"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
57
+ }
58
+ static UpdateWorkspaceQuotaRefreshCycle(req: UpdateWorkspaceQuotaRefreshCycleRequest, initReq?: fm.InitReq): Promise<WorkspaceQuota> {
59
+ return fm.fetchReq<UpdateWorkspaceQuotaRefreshCycleRequest, WorkspaceQuota>(`/apis/admin.hydra.io/v1alpha1/workspace-quotas/${req["workspace"]}/refresh-cycle`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
60
+ }
61
+ }
@@ -18,6 +18,13 @@ export enum Mode {
18
18
  Any = "Any",
19
19
  }
20
20
 
21
+ export enum NodePhase {
22
+ NODE_PHASE_UNSPECIFIED = "NODE_PHASE_UNSPECIFIED",
23
+ Ready = "Ready",
24
+ Not_Ready = "Not_Ready",
25
+ Unknown = "Unknown",
26
+ }
27
+
21
28
  export enum SearchIndexFieldBuilderType {
22
29
  FIELD_TYPE_UNSPECIFIED = "FIELD_TYPE_UNSPECIFIED",
23
30
  FILED = "FILED",
@@ -101,4 +108,52 @@ export type AuditObject = {
101
108
  kind?: string
102
109
  group?: string
103
110
  version?: string
111
+ }
112
+
113
+ export type Node = {
114
+ name?: string
115
+ arch?: string
116
+ labels?: {[key: string]: string}
117
+ gpuModels?: string[]
118
+ status?: NodeStatus
119
+ }
120
+
121
+ export type NodeStatus = {
122
+ phase?: NodePhase
123
+ addresses?: NodeAddress[]
124
+ cpuCapacity?: string
125
+ cpuAllocated?: number
126
+ cpuUsage?: number
127
+ memoryCapacity?: string
128
+ memoryAllocated?: number
129
+ memoryUsage?: number
130
+ systemInfo?: NodeSystemInfo
131
+ allowedPodNumber?: number
132
+ podAllocated?: number
133
+ readyPodNumber?: number
134
+ storageCapacity?: string
135
+ storageAllocated?: string
136
+ storageUsage?: number
137
+ storageDriver?: string
138
+ gpuTotal?: string
139
+ gpuAllocated?: string
140
+ gpuMemoryTotal?: string
141
+ gpuMemoryAllocated?: string
142
+ gpuCoreUsage?: number
143
+ gpuMemoryUsage?: number
144
+ }
145
+
146
+ export type NodeAddress = {
147
+ type?: string
148
+ address?: string
149
+ }
150
+
151
+ export type NodeSystemInfo = {
152
+ kernelVersion?: string
153
+ osImage?: string
154
+ containerRuntimeVersion?: string
155
+ kubeletVersion?: string
156
+ kubeProxyVersion?: string
157
+ operatingSystem?: string
158
+ architecture?: string
104
159
  }
@@ -39,8 +39,8 @@ export enum ErrorCode {
39
39
  // EN: out of page: %v
40
40
  // ZH: 分页错误:%v
41
41
  USER_OUT_OF_PAGE = "USER-OUT_OF_PAGE",
42
- // EN: permission denied
43
- // ZH: 拒绝访问
42
+ // EN: permission denied: %v
43
+ // ZH: 拒绝访问:%v
44
44
  USER_PERMISSION_DENIED = "USER-PERMISSION_DENIED",
45
45
  // EN: unauthorized request
46
46
  // ZH: 未授权的请求
@@ -8,6 +8,16 @@ import * as fm from "../../../fetch.pb"
8
8
  import * as GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
9
9
  import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
10
10
  import * as HydraManagement_apiApikeyV1alpha1Apikey from "../../apikey/v1alpha1/apikey.pb"
11
+ import * as HydraManagement_apiModel_typeV1alpha1Model_type from "../../model_type/v1alpha1/model_type.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 APIKeyEventType {
13
23
  UNKNOWN = "UNKNOWN",
@@ -15,6 +25,7 @@ export enum APIKeyEventType {
15
25
  OUT_OF_QUOTA = "OUT_OF_QUOTA",
16
26
  RECOVERY = "RECOVERY",
17
27
  UPDATE = "UPDATE",
28
+ CREATE = "CREATE",
18
29
  }
19
30
 
20
31
  export enum UsageReportRequestMode {
@@ -46,12 +57,18 @@ export type UsageReportRequestUsage = {
46
57
  inputImages?: UsageReportRequestUsageImage
47
58
  outputImages?: UsageReportRequestUsageImage
48
59
  requests?: number
60
+ cachedTokens?: string
61
+ inputCharacters?: string
62
+ outputAudioDuration?: string
63
+ sampleRate?: string
64
+ inputAudioDuration?: string
49
65
  }
50
66
 
51
67
  export type UsageReportRequest = {
52
68
  apiKeyId?: string
53
69
  requestModelName?: string
54
70
  upstreamModelName?: string
71
+ requestModelType?: HydraManagement_apiModel_typeV1alpha1Model_type.RequestModelType
55
72
  usage?: UsageReportRequestUsage
56
73
  firstRequestTime?: GoogleProtobufTimestamp.Timestamp
57
74
  lastRequestTime?: GoogleProtobufTimestamp.Timestamp
@@ -62,6 +79,42 @@ export type UsageReportResponse = {
62
79
  accepted?: boolean
63
80
  }
64
81
 
82
+
83
+ /* hydra modified */ export type BaseMetricPoint = {
84
+ currentSteps?: number
85
+ totalSteps?: number
86
+ }
87
+
88
+ export type MetricPoint = BaseMetricPoint
89
+ & OneOf<{ loss: number }>
90
+ & OneOf<{ evalLoss: number }>
91
+ & OneOf<{ predictLoss: number }>
92
+ & OneOf<{ reward: number }>
93
+ & OneOf<{ accuracy: number }>
94
+ & OneOf<{ lr: number }>
95
+ & OneOf<{ epoch: number }>
96
+ & OneOf<{ percentage: number }>
97
+ & OneOf<{ elapsedTime: string }>
98
+ & OneOf<{ remainingTime: string }>
99
+
100
+ export type ReportFineTuneMetricsRequest = {
101
+ jobId?: string
102
+ metric?: MetricPoint
103
+ }
104
+
105
+ export type ReportFineTuneMetricsResponse = {
106
+ accepted?: boolean
107
+ }
108
+
109
+ export type ReportEvalMetricsRequest = {
110
+ jobId?: string
111
+ metric?: {[key: string]: number}
112
+ }
113
+
114
+ export type ReportEvalMetricsResponse = {
115
+ accepted?: boolean
116
+ }
117
+
65
118
  export class AgentCommunicationService {
66
119
  static FetchAPIKeyByKey(req: FetchAPIKeyRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiApikeyV1alpha1Apikey.APIKey> {
67
120
  return fm.fetchReq<FetchAPIKeyRequest, HydraManagement_apiApikeyV1alpha1Apikey.APIKey>(`/hydra.management_api.agent.v1alpha1.AgentCommunicationService/FetchAPIKeyByKey`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
@@ -72,4 +125,10 @@ export class AgentCommunicationService {
72
125
  static UsageReport(req: UsageReportRequest, initReq?: fm.InitReq): Promise<UsageReportResponse> {
73
126
  return fm.fetchReq<UsageReportRequest, UsageReportResponse>(`/hydra.management_api.agent.v1alpha1.AgentCommunicationService/UsageReport`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
74
127
  }
128
+ static ReportFineTuneMetrics(req: ReportFineTuneMetricsRequest, initReq?: fm.InitReq): Promise<ReportFineTuneMetricsResponse> {
129
+ return fm.fetchReq<ReportFineTuneMetricsRequest, ReportFineTuneMetricsResponse>(`/apis/hydra.io/v1alpha1/agent/finetune/finetunejob-metrics:report`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
130
+ }
131
+ static ReportEvalMetrics(req: ReportEvalMetricsRequest, initReq?: fm.InitReq): Promise<ReportEvalMetricsResponse> {
132
+ return fm.fetchReq<ReportEvalMetricsRequest, ReportEvalMetricsResponse>(`/apis/hydra.io/v1alpha1/agent/finetune/evaljob-metrics:report`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
133
+ }
75
134
  }
@@ -0,0 +1,33 @@
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 fm from "../../../fetch.pb"
8
+ import * as GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
9
+ export type RegisterServerRequest = {
10
+ clusterName?: string
11
+ serverName?: string
12
+ host?: string
13
+ grpcConfig?: GRPCConfig
14
+ }
15
+
16
+ export type GRPCConfig = {
17
+ plaintext?: boolean
18
+ insecure?: boolean
19
+ }
20
+
21
+ export type UnregisterServerRequest = {
22
+ clusterName?: string
23
+ serverName?: string
24
+ }
25
+
26
+ export class ServerRegistrationService {
27
+ static RegisterServer(req: RegisterServerRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
28
+ return fm.fetchReq<RegisterServerRequest, GoogleProtobufEmpty.Empty>(`/hydra.management_api.agent.v1alpha1.ServerRegistrationService/RegisterServer`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
29
+ }
30
+ static UnregisterServer(req: UnregisterServerRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
31
+ return fm.fetchReq<UnregisterServerRequest, GoogleProtobufEmpty.Empty>(`/hydra.management_api.agent.v1alpha1.ServerRegistrationService/UnregisterServer`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
32
+ }
33
+ }
@@ -0,0 +1,39 @@
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 fm from "../../../fetch.pb"
8
+ export type ListClusterUsersRequest = {
9
+ clusterName?: string
10
+ }
11
+
12
+ export type ListClusterUsersResponse = {
13
+ users?: SFTPUserInfo[]
14
+ }
15
+
16
+ export type SFTPUserInfo = {
17
+ namespace?: string
18
+ pvc?: string
19
+ username?: string
20
+ uid?: number
21
+ gid?: number
22
+ }
23
+
24
+ export type ListUserPublicKeysRequest = {
25
+ username?: string
26
+ }
27
+
28
+ export type ListUserPublicKeysResponse = {
29
+ publicKeys?: string[]
30
+ }
31
+
32
+ export class SFTPUserService {
33
+ static ListClusterUsers(req: ListClusterUsersRequest, initReq?: fm.InitReq): Promise<ListClusterUsersResponse> {
34
+ return fm.fetchReq<ListClusterUsersRequest, ListClusterUsersResponse>(`/hydra.management_api.agent.v1alpha1.SFTPUserService/ListClusterUsers`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
35
+ }
36
+ static ListUserPublicKeys(req: ListUserPublicKeysRequest, initReq?: fm.InitReq): Promise<ListUserPublicKeysResponse> {
37
+ return fm.fetchReq<ListUserPublicKeysRequest, ListUserPublicKeysResponse>(`/hydra.management_api.agent.v1alpha1.SFTPUserService/ListUserPublicKeys`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
38
+ }
39
+ }