@daocloud-proto/hydra 0.15.0 → 0.16.0-rc1

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.
@@ -41,6 +41,7 @@ export type ListClusterResponse = {
41
41
  export type ConstantsResponse = {
42
42
  defaultFilesStorageCapacity?: string
43
43
  defaultMountPath?: string
44
+ defaultModelServingPort?: number
44
45
  }
45
46
 
46
47
  export type ListPlatformRolePermissionsForCurrentUserResponse = {
@@ -0,0 +1,62 @@
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 CostMockConfig = {
9
+ gpuCosts?: GPUCost[]
10
+ maasUsageCosts?: MaasUsageCost[]
11
+ maasTimeBoundPackageCosts?: MaaSTimeBoundPackageCost[]
12
+ }
13
+
14
+ export type GPUCost = {
15
+ productName?: string
16
+ sn?: string
17
+ cluster?: string
18
+ hourlyPrice?: number
19
+ }
20
+
21
+ export type MaasUsageCost = {
22
+ upstreamModelName?: string
23
+ inputPrice?: number
24
+ cachedInputPrice?: number
25
+ outputPrice?: number
26
+ }
27
+
28
+ export type MaaSTimeBoundPackageCost = {
29
+ upstreamModelName?: string
30
+ hourlyInputPrice?: number
31
+ hourlyCachedInputPrice?: number
32
+ hourlyOutputPrice?: number
33
+ }
34
+
35
+ export type CreateCostMockConfigRequest = {
36
+ config?: CostMockConfig
37
+ }
38
+
39
+ export type GetCostMockConfigRequest = {
40
+ }
41
+
42
+ export type UpdateCostMockConfigRequest = {
43
+ config?: CostMockConfig
44
+ }
45
+
46
+ export type DeleteCostMockConfigRequest = {
47
+ }
48
+
49
+ export class CostMockConfigManagement {
50
+ static CreateCostMockConfig(req: CreateCostMockConfigRequest, initReq?: fm.InitReq): Promise<CostMockConfig> {
51
+ return fm.fetchReq<CreateCostMockConfigRequest, CostMockConfig>(`/apis/hydra.io/v1alpha1/analysis-center/cost-mock-config`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
52
+ }
53
+ static GetCostMockConfig(req: GetCostMockConfigRequest, initReq?: fm.InitReq): Promise<CostMockConfig> {
54
+ return fm.fetchReq<GetCostMockConfigRequest, CostMockConfig>(`/apis/hydra.io/v1alpha1/analysis-center/cost-mock-config?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
55
+ }
56
+ static UpdateCostMockConfig(req: UpdateCostMockConfigRequest, initReq?: fm.InitReq): Promise<CostMockConfig> {
57
+ return fm.fetchReq<UpdateCostMockConfigRequest, CostMockConfig>(`/apis/hydra.io/v1alpha1/analysis-center/cost-mock-config`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
58
+ }
59
+ static DeleteCostMockConfig(req: DeleteCostMockConfigRequest, initReq?: fm.InitReq): Promise<CostMockConfig> {
60
+ return fm.fetchReq<DeleteCostMockConfigRequest, CostMockConfig>(`/apis/hydra.io/v1alpha1/analysis-center/cost-mock-config`, {...initReq, method: "DELETE"})
61
+ }
62
+ }
@@ -0,0 +1,99 @@
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
+ export type Period = {
11
+ startTime?: GoogleProtobufTimestamp.Timestamp
12
+ endTime?: GoogleProtobufTimestamp.Timestamp
13
+ }
14
+
15
+ export type WSDashboardSummaryRequest = {
16
+ startTime?: GoogleProtobufTimestamp.Timestamp
17
+ endTime?: GoogleProtobufTimestamp.Timestamp
18
+ compareStartTime?: GoogleProtobufTimestamp.Timestamp
19
+ compareEndTime?: GoogleProtobufTimestamp.Timestamp
20
+ timezone?: string
21
+ workspace?: number
22
+ }
23
+
24
+ export type DashboardSummaryResponse = {
25
+ activeUserCount?: string
26
+ totalUserCount?: string
27
+ activeUserChange?: string
28
+ activeUserChangeRate?: number
29
+ totalTokens?: string
30
+ todayTokens?: string
31
+ requestCount?: string
32
+ apiKeyCount?: string
33
+ apiKeyChange?: string
34
+ period?: Period
35
+ comparePeriod?: Period
36
+ }
37
+
38
+ export type ListWSUserTokenUsageRequest = {
39
+ startTime?: GoogleProtobufTimestamp.Timestamp
40
+ endTime?: GoogleProtobufTimestamp.Timestamp
41
+ page?: HydraCommonCommon.Pagination
42
+ sortBy?: string
43
+ sortOrder?: string
44
+ workspace?: number
45
+ }
46
+
47
+ export type UserTokenUsage = {
48
+ userId?: string
49
+ username?: string
50
+ inputTokens?: string
51
+ outputTokens?: string
52
+ cachedTokens?: string
53
+ totalTokens?: string
54
+ requestCount?: string
55
+ lastUsedTime?: GoogleProtobufTimestamp.Timestamp
56
+ }
57
+
58
+ export type ListUserTokenUsageResponse = {
59
+ items?: UserTokenUsage[]
60
+ page?: HydraCommonCommon.Pagination
61
+ }
62
+
63
+ export type ListWSInstanceTokenUsageRequest = {
64
+ startTime?: GoogleProtobufTimestamp.Timestamp
65
+ endTime?: GoogleProtobufTimestamp.Timestamp
66
+ page?: HydraCommonCommon.Pagination
67
+ sortBy?: string
68
+ sortOrder?: string
69
+ workspace?: number
70
+ }
71
+
72
+ export type InstanceTokenUsage = {
73
+ instanceId?: string
74
+ instanceName?: string
75
+ modelName?: string
76
+ inputTokens?: string
77
+ outputTokens?: string
78
+ cachedTokens?: string
79
+ totalTokens?: string
80
+ requestCount?: string
81
+ lastUsedTime?: GoogleProtobufTimestamp.Timestamp
82
+ }
83
+
84
+ export type ListInstanceTokenUsageResponse = {
85
+ items?: InstanceTokenUsage[]
86
+ page?: HydraCommonCommon.Pagination
87
+ }
88
+
89
+ export class WSDashboardManagement {
90
+ static GetWSDashboardSummary(req: WSDashboardSummaryRequest, initReq?: fm.InitReq): Promise<DashboardSummaryResponse> {
91
+ return fm.fetchReq<WSDashboardSummaryRequest, DashboardSummaryResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/dashboard/summary?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
92
+ }
93
+ static ListWSUserTokenUsage(req: ListWSUserTokenUsageRequest, initReq?: fm.InitReq): Promise<ListUserTokenUsageResponse> {
94
+ return fm.fetchReq<ListWSUserTokenUsageRequest, ListUserTokenUsageResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/dashboard/users/token-usage?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
95
+ }
96
+ static ListWSInstanceTokenUsage(req: ListWSInstanceTokenUsageRequest, initReq?: fm.InitReq): Promise<ListInstanceTokenUsageResponse> {
97
+ return fm.fetchReq<ListWSInstanceTokenUsageRequest, ListInstanceTokenUsageResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/dashboard/instances/token-usage?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
98
+ }
99
+ }
@@ -11,4 +11,9 @@ export enum JobStatus {
11
11
  COMPLETED = "COMPLETED",
12
12
  FAILED = "FAILED",
13
13
  DELETING = "DELETING",
14
+ }
15
+
16
+ export type EnvVar = {
17
+ name?: string
18
+ value?: string
14
19
  }
@@ -44,6 +44,7 @@ export type EvalJob = {
44
44
  creationTimestamp?: GoogleProtobufTimestamp.Timestamp
45
45
  completionTimestamp?: GoogleProtobufTimestamp.Timestamp
46
46
  datasetName?: string
47
+ env?: HydraManagement_apiFinetuneV1alpha1Common.EnvVar[]
47
48
  }
48
49
 
49
50
 
@@ -57,6 +58,7 @@ export type EvalJob = {
57
58
  finetuneJobName?: string
58
59
  datasetId?: string
59
60
  datasetVolumeId?: string
61
+ env?: HydraManagement_apiFinetuneV1alpha1Common.EnvVar[]
60
62
  }
61
63
 
62
64
  export type CreateWSEvalJobRequest = BaseCreateWSEvalJobRequest
@@ -52,6 +52,7 @@ export type FineTuneJob = {
52
52
  metrics?: MetricPoint[]
53
53
  trainingParams?: GoogleProtobufStruct.Struct
54
54
  metadata?: GoogleProtobufStruct.Struct
55
+ env?: HydraManagement_apiFinetuneV1alpha1Common.EnvVar[]
55
56
  }
56
57
 
57
58
  export type CreateWSFineTuneJobRequest = {
@@ -67,6 +68,7 @@ export type CreateWSFineTuneJobRequest = {
67
68
  training?: HydraManagement_apiFinetuneV1alpha1Finetuneconfig.TrainingConfig
68
69
  dpo?: HydraManagement_apiFinetuneV1alpha1Finetuneconfig.DpoConfig
69
70
  resources?: HydraManagement_apiFinetuneV1alpha1Finetuneconfig.ResourceConfig
71
+ env?: HydraManagement_apiFinetuneV1alpha1Common.EnvVar[]
70
72
  }
71
73
 
72
74
  export type GetWSFineTuneJobRequest = {
@@ -30,6 +30,19 @@ export enum PlacementPolicy {
30
30
  GROUPED = "GROUPED",
31
31
  }
32
32
 
33
+ export enum HealthProbeCheckType {
34
+ PROBE_CHECK_TYPE_UNSPECIFIED = "PROBE_CHECK_TYPE_UNSPECIFIED",
35
+ PROBE_CHECK_HTTP = "PROBE_CHECK_HTTP",
36
+ PROBE_CHECK_TCP = "PROBE_CHECK_TCP",
37
+ PROBE_CHECK_EXEC = "PROBE_CHECK_EXEC",
38
+ }
39
+
40
+ export enum HealthProbeScheme {
41
+ PROBE_SCHEME_UNSPECIFIED = "PROBE_SCHEME_UNSPECIFIED",
42
+ PROBE_SCHEME_HTTP = "PROBE_SCHEME_HTTP",
43
+ PROBE_SCHEME_HTTPS = "PROBE_SCHEME_HTTPS",
44
+ }
45
+
33
46
  export enum ModelServingStatus {
34
47
  STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
35
48
  DEPLOYING = "DEPLOYING",
@@ -75,6 +88,35 @@ export type PreflightConfig = {
75
88
  nodeCheckBusbwThresholdGbps?: string
76
89
  }
77
90
 
91
+ export type HealthProbeHTTPHeader = {
92
+ name?: string
93
+ value?: string
94
+ }
95
+
96
+ export type HealthProbeConfig = {
97
+ checkType?: HealthProbeCheckType
98
+ path?: string
99
+ port?: number
100
+ host?: string
101
+ scheme?: HealthProbeScheme
102
+ httpHeaders?: HealthProbeHTTPHeader[]
103
+ command?: string[]
104
+ initialDelaySeconds?: number
105
+ timeoutSeconds?: number
106
+ periodSeconds?: number
107
+ successThreshold?: number
108
+ failureThreshold?: number
109
+ }
110
+
111
+
112
+ /* hydra modified */ export type BaseHealthCheckConfig = {
113
+ }
114
+
115
+ export type HealthCheckConfig = BaseHealthCheckConfig
116
+ & OneOf<{ livenessProbe: HealthProbeConfig }>
117
+ & OneOf<{ readinessProbe: HealthProbeConfig }>
118
+ & OneOf<{ startupProbe: HealthProbeConfig }>
119
+
78
120
  export type WeightVolumeConfig = {
79
121
  modelId?: string
80
122
  modelTag?: string
@@ -84,6 +126,12 @@ export type WeightVolumeConfig = {
84
126
  mountPath?: string
85
127
  }
86
128
 
129
+ export type ConfigMapMountConfig = {
130
+ configMapName?: string
131
+ mountPath?: string
132
+ subPath?: string
133
+ }
134
+
87
135
 
88
136
  /* hydra modified */ export type BaseResourceConfig = {
89
137
  cpu?: number
@@ -117,6 +165,7 @@ export type CreateModelServingRequest = {
117
165
  replicas?: number
118
166
  skuId?: string
119
167
  paymentMethods?: PaymentMethod
168
+ enableMetrics?: boolean
120
169
  }
121
170
 
122
171
 
@@ -132,12 +181,15 @@ export type CreateModelServingRequest = {
132
181
  resourceConfig?: ResourceConfig
133
182
  runtimeConfig?: RuntimeConfig
134
183
  tokenWeight?: string
184
+ enableMetrics?: boolean
185
+ configMapMounts?: ConfigMapMountConfig[]
135
186
  }
136
187
 
137
188
  export type CreateWSModelServingRequest = BaseCreateWSModelServingRequest
138
189
  & OneOf<{ weightVolumeConfig: WeightVolumeConfig }>
139
190
  & OneOf<{ schedulingConfig: SchedulingConfig }>
140
191
  & OneOf<{ preflight: PreflightConfig }>
192
+ & OneOf<{ healthCheck: HealthCheckConfig }>
141
193
 
142
194
  export type ModelServing = {
143
195
  id?: string
@@ -183,6 +235,8 @@ export type ModelServing = {
183
235
  modelVisible?: ModelVisible
184
236
  tokenWeight?: string
185
237
  preflight?: PreflightConfig
238
+ configMapMounts?: ConfigMapMountConfig[]
239
+ healthCheck?: HealthCheckConfig
186
240
  }
187
241
 
188
242
  export type WSModelServing = BaseWSModelServing
@@ -69,6 +69,24 @@ export type ListClusterNamespaceResponse = {
69
69
  page?: HydraCommonCommon.Pagination
70
70
  }
71
71
 
72
+ export type ListConfigMapsRequest = {
73
+ workspace?: number
74
+ cluster?: string
75
+ namespace?: string
76
+ page?: HydraCommonCommon.Pagination
77
+ name?: string
78
+ }
79
+
80
+ export type ConfigMap = {
81
+ name?: string
82
+ namespace?: string
83
+ }
84
+
85
+ export type ListConfigMapsResponse = {
86
+ items?: ConfigMap[]
87
+ page?: HydraCommonCommon.Pagination
88
+ }
89
+
72
90
  export class WorkspaceService {
73
91
  static ListWorkspaces(req: ListWorkspaceRequest, initReq?: fm.InitReq): Promise<ListWorkspacesResponse> {
74
92
  return fm.fetchReq<ListWorkspaceRequest, ListWorkspacesResponse>(`/apis/hydra.io/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -79,4 +97,7 @@ export class WorkspaceService {
79
97
  static ListClusterNamespaces(req: ListClusterNamespacesRequest, initReq?: fm.InitReq): Promise<ListClusterNamespaceResponse> {
80
98
  return fm.fetchReq<ListClusterNamespacesRequest, ListClusterNamespaceResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/cluster-namespaces?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
81
99
  }
100
+ static ListConfigMaps(req: ListConfigMapsRequest, initReq?: fm.InitReq): Promise<ListConfigMapsResponse> {
101
+ return fm.fetchReq<ListConfigMapsRequest, ListConfigMapsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/configmaps?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
102
+ }
82
103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/hydra",
3
- "version": "v0.15.0",
3
+ "version": "v0.16.0-rc1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"