@daocloud-proto/hydra 0.15.0 → 0.16.0-dev-1
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.
- package/admin-api/core/v1alpha1/core.pb.ts +46 -0
- package/admin-api/cost-mock-config/v1alpha1/cost_mock_config.pb.ts +76 -0
- package/management-api/dashboard/v1alpha1/dashboard.pb.ts +99 -0
- package/management-api/finetune/v1alpha1/common.pb.ts +5 -0
- package/management-api/finetune/v1alpha1/evaljob.pb.ts +2 -0
- package/management-api/finetune/v1alpha1/finetunejob.pb.ts +2 -0
- package/management-api/model/v1alpha1/model.pb.ts +26 -0
- package/management-api/model_serving/v1alpha1/model_serving.pb.ts +72 -0
- package/management-api/workspace/v1alpha1/workspace.pb.ts +21 -0
- package/package.json +1 -1
|
@@ -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 = {
|
|
@@ -63,6 +64,45 @@ export type GetAnalysisURIResponse = {
|
|
|
63
64
|
uri?: string
|
|
64
65
|
}
|
|
65
66
|
|
|
67
|
+
export type NodeGPUInfo = {
|
|
68
|
+
clusterName?: string
|
|
69
|
+
nodeName?: string
|
|
70
|
+
gpuProduct?: string
|
|
71
|
+
gpuMemory?: string
|
|
72
|
+
gpuCount?: number
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export type ListNodeGPUInfoRequest = {
|
|
76
|
+
cluster?: string
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export type ListNodeGPUInfoResponse = {
|
|
80
|
+
items?: NodeGPUInfo[]
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export type ModelGPUInfo = {
|
|
84
|
+
accessModelName?: string
|
|
85
|
+
lwsName?: string
|
|
86
|
+
namespace?: string
|
|
87
|
+
cluster?: string
|
|
88
|
+
nodes?: ModelNodeGPU[]
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export type ModelNodeGPU = {
|
|
92
|
+
nodeName?: string
|
|
93
|
+
gpuProduct?: string
|
|
94
|
+
gpuMemory?: string
|
|
95
|
+
gpuCount?: number
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export type ListModelGPUInfoRequest = {
|
|
99
|
+
accessModelName?: string
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export type ListModelGPUInfoResponse = {
|
|
103
|
+
items?: ModelGPUInfo[]
|
|
104
|
+
}
|
|
105
|
+
|
|
66
106
|
export class CoreService {
|
|
67
107
|
static AdminListCluster(req: ListClusterRequest, initReq?: fm.InitReq): Promise<ListClusterResponse> {
|
|
68
108
|
return fm.fetchReq<ListClusterRequest, ListClusterResponse>(`/apis/admin.hydra.io/v1alpha1/clusters?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -79,4 +119,10 @@ export class CoreService {
|
|
|
79
119
|
static GetAnalysisURI(req: GetAnalysisURIRequest, initReq?: fm.InitReq): Promise<GetAnalysisURIResponse> {
|
|
80
120
|
return fm.fetchReq<GetAnalysisURIRequest, GetAnalysisURIResponse>(`/apis/admin.hydra.io/v1alpha1/analysis-uri?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
81
121
|
}
|
|
122
|
+
static ListNodeGPUInfo(req: ListNodeGPUInfoRequest, initReq?: fm.InitReq): Promise<ListNodeGPUInfoResponse> {
|
|
123
|
+
return fm.fetchReq<ListNodeGPUInfoRequest, ListNodeGPUInfoResponse>(`/apis/admin.hydra.io/v1alpha1/node-gpu-info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
124
|
+
}
|
|
125
|
+
static ListModelGPUInfo(req: ListModelGPUInfoRequest, initReq?: fm.InitReq): Promise<ListModelGPUInfoResponse> {
|
|
126
|
+
return fm.fetchReq<ListModelGPUInfoRequest, ListModelGPUInfoResponse>(`/apis/admin.hydra.io/v1alpha1/model-gpu-info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
127
|
+
}
|
|
82
128
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
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
|
+
gpus?: GPUCost[]
|
|
10
|
+
upstreamTokenPrices?: UpstreamTokenPrice[]
|
|
11
|
+
upstreamTotalTokenPrices?: UpstreamTotalTokenPrice[]
|
|
12
|
+
excludedGpuCostKeys?: string[]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type GPUCost = {
|
|
16
|
+
clusterName?: string
|
|
17
|
+
nodeName?: string
|
|
18
|
+
product?: string
|
|
19
|
+
memory?: string
|
|
20
|
+
price?: number
|
|
21
|
+
count?: number
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type UpstreamTokenPrice = {
|
|
25
|
+
name?: string
|
|
26
|
+
maasModelName?: string
|
|
27
|
+
inPrice?: number
|
|
28
|
+
outPrice?: number
|
|
29
|
+
cachedPrice?: number
|
|
30
|
+
inputImagePrice?: number
|
|
31
|
+
outputImagePrice?: number
|
|
32
|
+
inputAudioPrice?: number
|
|
33
|
+
outputAudioPrice?: number
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type UpstreamTotalTokenPrice = {
|
|
37
|
+
name?: string
|
|
38
|
+
maasModelName?: string
|
|
39
|
+
expirationTime?: string
|
|
40
|
+
inputTokenHourlyPrice?: number
|
|
41
|
+
outputTokenHourlyPrice?: number
|
|
42
|
+
cachedTokenHourlyPrice?: number
|
|
43
|
+
inputImageHourlyPrice?: number
|
|
44
|
+
outputImageHourlyPrice?: number
|
|
45
|
+
inputAudioHourlyPrice?: number
|
|
46
|
+
outputAudioHourlyPrice?: number
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type CreateCostMockConfigRequest = {
|
|
50
|
+
config?: CostMockConfig
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type GetCostMockConfigRequest = {
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type UpdateCostMockConfigRequest = {
|
|
57
|
+
config?: CostMockConfig
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type DeleteCostMockConfigRequest = {
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export class CostMockConfigManagement {
|
|
64
|
+
static CreateCostMockConfig(req: CreateCostMockConfigRequest, initReq?: fm.InitReq): Promise<CostMockConfig> {
|
|
65
|
+
return fm.fetchReq<CreateCostMockConfigRequest, CostMockConfig>(`/apis/admin.hydra.io/v1alpha1/cost-mock-config`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
66
|
+
}
|
|
67
|
+
static GetCostMockConfig(req: GetCostMockConfigRequest, initReq?: fm.InitReq): Promise<CostMockConfig> {
|
|
68
|
+
return fm.fetchReq<GetCostMockConfigRequest, CostMockConfig>(`/apis/admin.hydra.io/v1alpha1/cost-mock-config?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
69
|
+
}
|
|
70
|
+
static UpdateCostMockConfig(req: UpdateCostMockConfigRequest, initReq?: fm.InitReq): Promise<CostMockConfig> {
|
|
71
|
+
return fm.fetchReq<UpdateCostMockConfigRequest, CostMockConfig>(`/apis/admin.hydra.io/v1alpha1/cost-mock-config`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
72
|
+
}
|
|
73
|
+
static DeleteCostMockConfig(req: DeleteCostMockConfigRequest, initReq?: fm.InitReq): Promise<CostMockConfig> {
|
|
74
|
+
return fm.fetchReq<DeleteCostMockConfigRequest, CostMockConfig>(`/apis/admin.hydra.io/v1alpha1/cost-mock-config`, {...initReq, method: "DELETE"})
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -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 = {
|
|
@@ -24,6 +24,12 @@ export enum ModelSupportFeature {
|
|
|
24
24
|
TOOLS = "TOOLS",
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
export enum SkuDiscountScheduleType {
|
|
28
|
+
SKU_DISCOUNT_SCHEDULE_TYPE_UNSPECIFIED = "SKU_DISCOUNT_SCHEDULE_TYPE_UNSPECIFIED",
|
|
29
|
+
SKU_DISCOUNT_SCHEDULE_TYPE_ABSOLUTE = "SKU_DISCOUNT_SCHEDULE_TYPE_ABSOLUTE",
|
|
30
|
+
SKU_DISCOUNT_SCHEDULE_TYPE_DAILY = "SKU_DISCOUNT_SCHEDULE_TYPE_DAILY",
|
|
31
|
+
}
|
|
32
|
+
|
|
27
33
|
export enum PublicModelConfigRateLimitLimitedBy {
|
|
28
34
|
LIMITED_BY_UNSPECIFIED = "LIMITED_BY_UNSPECIFIED",
|
|
29
35
|
USER_ID = "USER_ID",
|
|
@@ -37,11 +43,31 @@ export enum DeployTemplateInferenceRuntime {
|
|
|
37
43
|
IMAGE_GEN = "IMAGE_GEN",
|
|
38
44
|
}
|
|
39
45
|
|
|
46
|
+
export type ModelPriceDiscountInfo = {
|
|
47
|
+
discountRate?: number
|
|
48
|
+
discountName?: string
|
|
49
|
+
schedule?: ModelPriceDiscountSchedule
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export type ModelPriceDiscountSchedule = {
|
|
53
|
+
discountRuleId?: string
|
|
54
|
+
type?: SkuDiscountScheduleType
|
|
55
|
+
effectiveStartAt?: string
|
|
56
|
+
effectiveEndAt?: string
|
|
57
|
+
dailyStartMinute?: number
|
|
58
|
+
dailyEndMinute?: number
|
|
59
|
+
timezone?: string
|
|
60
|
+
}
|
|
61
|
+
|
|
40
62
|
export type ModelPrice = {
|
|
41
63
|
inputPerKTokens?: string
|
|
42
64
|
outputPerKTokens?: string
|
|
43
65
|
perImage?: string
|
|
44
66
|
cachedPerKTokens?: string
|
|
67
|
+
inputDiscountInfo?: ModelPriceDiscountInfo
|
|
68
|
+
outputDiscountInfo?: ModelPriceDiscountInfo
|
|
69
|
+
perImageDiscountInfo?: ModelPriceDiscountInfo
|
|
70
|
+
cachedDiscountInfo?: ModelPriceDiscountInfo
|
|
45
71
|
}
|
|
46
72
|
|
|
47
73
|
export type Model = {
|
|
@@ -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
|
|
@@ -159,6 +211,7 @@ export type ModelServing = {
|
|
|
159
211
|
modelAvatar?: string
|
|
160
212
|
regionName?: HydraCommonCommon.I18nName
|
|
161
213
|
modelSupportFeature?: HydraManagement_apiModelV1alpha1Model.ModelSupportFeature[]
|
|
214
|
+
enableMetrics?: boolean
|
|
162
215
|
}
|
|
163
216
|
|
|
164
217
|
|
|
@@ -183,6 +236,9 @@ export type ModelServing = {
|
|
|
183
236
|
modelVisible?: ModelVisible
|
|
184
237
|
tokenWeight?: string
|
|
185
238
|
preflight?: PreflightConfig
|
|
239
|
+
configMapMounts?: ConfigMapMountConfig[]
|
|
240
|
+
healthCheck?: HealthCheckConfig
|
|
241
|
+
enableMetrics?: boolean
|
|
186
242
|
}
|
|
187
243
|
|
|
188
244
|
export type WSModelServing = BaseWSModelServing
|
|
@@ -282,6 +338,19 @@ export type DeployDetectCondition = {
|
|
|
282
338
|
message?: string
|
|
283
339
|
}
|
|
284
340
|
|
|
341
|
+
export type ListBuiltinEnvVarsRequest = {
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export type BuiltinEnvVar = {
|
|
345
|
+
name?: string
|
|
346
|
+
description?: HydraCommonCommon.I18nName
|
|
347
|
+
example?: string
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export type ListBuiltinEnvVarsResponse = {
|
|
351
|
+
items?: BuiltinEnvVar[]
|
|
352
|
+
}
|
|
353
|
+
|
|
285
354
|
export class ModelServingManagement {
|
|
286
355
|
static CreateModelServing(req: CreateModelServingRequest, initReq?: fm.InitReq): Promise<ModelServing> {
|
|
287
356
|
return fm.fetchReq<CreateModelServingRequest, ModelServing>(`/apis/hydra.io/v1alpha1/model-serving`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
@@ -324,4 +393,7 @@ export class WSModelServingManagement {
|
|
|
324
393
|
static DoModelWSServingAction(req: WSModelServingActionRequest, initReq?: fm.InitReq): Promise<WSModelServing> {
|
|
325
394
|
return fm.fetchReq<WSModelServingActionRequest, WSModelServing>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/${req["id"]}/actions`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
326
395
|
}
|
|
396
|
+
static ListBuiltinEnvVars(req: ListBuiltinEnvVarsRequest, initReq?: fm.InitReq): Promise<ListBuiltinEnvVarsResponse> {
|
|
397
|
+
return fm.fetchReq<ListBuiltinEnvVarsRequest, ListBuiltinEnvVarsResponse>(`/apis/hydra.io/v1alpha1/model-serving/builtin-env-vars?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
398
|
+
}
|
|
327
399
|
}
|
|
@@ -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
|
}
|