@daocloud-proto/hydra 0.0.0-dev-997245b5 → 0.0.0-dev-e3f01965
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.
|
@@ -99,6 +99,15 @@ export type ReportFineTuneMetricsResponse = {
|
|
|
99
99
|
accepted?: boolean
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
export type ReportEvalMetricsRequest = {
|
|
103
|
+
jobId?: string
|
|
104
|
+
metric?: {[key: string]: number}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export type ReportEvalMetricsResponse = {
|
|
108
|
+
accepted?: boolean
|
|
109
|
+
}
|
|
110
|
+
|
|
102
111
|
export class AgentCommunicationService {
|
|
103
112
|
static FetchAPIKeyByKey(req: FetchAPIKeyRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiApikeyV1alpha1Apikey.APIKey> {
|
|
104
113
|
return fm.fetchReq<FetchAPIKeyRequest, HydraManagement_apiApikeyV1alpha1Apikey.APIKey>(`/hydra.management_api.agent.v1alpha1.AgentCommunicationService/FetchAPIKeyByKey`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
@@ -112,4 +121,7 @@ export class AgentCommunicationService {
|
|
|
112
121
|
static ReportFineTuneMetrics(req: ReportFineTuneMetricsRequest, initReq?: fm.InitReq): Promise<ReportFineTuneMetricsResponse> {
|
|
113
122
|
return fm.fetchReq<ReportFineTuneMetricsRequest, ReportFineTuneMetricsResponse>(`/apis/hydra.io/v1alpha1/agent/fine-tune-metrics:report`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
114
123
|
}
|
|
124
|
+
static ReportEvalMetrics(req: ReportEvalMetricsRequest, initReq?: fm.InitReq): Promise<ReportEvalMetricsResponse> {
|
|
125
|
+
return fm.fetchReq<ReportEvalMetricsRequest, ReportEvalMetricsResponse>(`/apis/hydra.io/v1alpha1/agent/evaljob-metrics:report`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
126
|
+
}
|
|
115
127
|
}
|
|
@@ -0,0 +1,124 @@
|
|
|
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 GoogleProtobufStruct from "../../../google/protobuf/struct.pb"
|
|
11
|
+
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
12
|
+
import * as HydraManagement_apiFinetuneV1alpha1Common from "./common.pb"
|
|
13
|
+
import * as HydraManagement_apiFinetuneV1alpha1Finetuneconfig from "./finetuneconfig.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
|
+
export type EvalJob = {
|
|
24
|
+
id?: string
|
|
25
|
+
name?: string
|
|
26
|
+
workspace?: number
|
|
27
|
+
cluster?: string
|
|
28
|
+
namespace?: string
|
|
29
|
+
resources?: HydraManagement_apiFinetuneV1alpha1Finetuneconfig.ResourceConfig
|
|
30
|
+
finetuneConfigName?: string
|
|
31
|
+
finetuneJobName?: string
|
|
32
|
+
finetuneJobId?: string
|
|
33
|
+
datasetId?: string
|
|
34
|
+
datasetVolumeId?: string
|
|
35
|
+
cutoffLen?: number
|
|
36
|
+
maxSamples?: number
|
|
37
|
+
overwriteCache?: boolean
|
|
38
|
+
preprocessingNumWorkers?: number
|
|
39
|
+
perDeviceEvalBatchSize?: number
|
|
40
|
+
predictWithGenerate?: boolean
|
|
41
|
+
ddpTimeout?: string
|
|
42
|
+
phase?: HydraManagement_apiFinetuneV1alpha1Common.JobStatus
|
|
43
|
+
reason?: string
|
|
44
|
+
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
45
|
+
completionTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/* hydra modified */ export type BaseCreateWSEvalJobRequest = {
|
|
50
|
+
workspace?: number
|
|
51
|
+
name?: string
|
|
52
|
+
cluster?: string
|
|
53
|
+
namespace?: string
|
|
54
|
+
resources?: HydraManagement_apiFinetuneV1alpha1Finetuneconfig.ResourceConfig
|
|
55
|
+
finetuneConfigName?: string
|
|
56
|
+
finetuneJobName?: string
|
|
57
|
+
datasetId?: string
|
|
58
|
+
datasetVolumeId?: string
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type CreateWSEvalJobRequest = BaseCreateWSEvalJobRequest
|
|
62
|
+
& OneOf<{ cutoffLen: number }>
|
|
63
|
+
& OneOf<{ maxSamples: number }>
|
|
64
|
+
& OneOf<{ overwriteCache: boolean }>
|
|
65
|
+
& OneOf<{ preprocessingNumWorkers: number }>
|
|
66
|
+
& OneOf<{ perDeviceEvalBatchSize: number }>
|
|
67
|
+
& OneOf<{ predictWithGenerate: boolean }>
|
|
68
|
+
& OneOf<{ ddpTimeout: string }>
|
|
69
|
+
|
|
70
|
+
export type GetWSEvalJobRequest = {
|
|
71
|
+
workspace?: number
|
|
72
|
+
cluster?: string
|
|
73
|
+
namespace?: string
|
|
74
|
+
name?: string
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export type ListWSEvalJobsRequest = {
|
|
78
|
+
workspace?: number
|
|
79
|
+
cluster?: string
|
|
80
|
+
namespace?: string
|
|
81
|
+
page?: HydraCommonCommon.Pagination
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export type ListWSEvalJobsResponse = {
|
|
85
|
+
items?: EvalJob[]
|
|
86
|
+
page?: HydraCommonCommon.Pagination
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export type DeleteWSEvalJobRequest = {
|
|
90
|
+
workspace?: number
|
|
91
|
+
cluster?: string
|
|
92
|
+
namespace?: string
|
|
93
|
+
id?: string
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type GetWSEvalMetricsRequest = {
|
|
97
|
+
workspace?: number
|
|
98
|
+
id?: string
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export type GetWSEvalMetricsResponse = {
|
|
102
|
+
metrics?: GoogleProtobufStruct.Struct
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export class WSEvalJobManagement {
|
|
106
|
+
static CreateWSEvalJob(req: CreateWSEvalJobRequest, initReq?: fm.InitReq): Promise<EvalJob> {
|
|
107
|
+
return fm.fetchReq<CreateWSEvalJobRequest, EvalJob>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/finetune-evaljobs`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
108
|
+
}
|
|
109
|
+
static GetWSEvalJob(req: GetWSEvalJobRequest, initReq?: fm.InitReq): Promise<EvalJob> {
|
|
110
|
+
return fm.fetchReq<GetWSEvalJobRequest, EvalJob>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/finetune-evaljobs/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
111
|
+
}
|
|
112
|
+
static ListWSEvalJobs(req: ListWSEvalJobsRequest, initReq?: fm.InitReq): Promise<ListWSEvalJobsResponse> {
|
|
113
|
+
return fm.fetchReq<ListWSEvalJobsRequest, ListWSEvalJobsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/finetune-evaljobs?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
114
|
+
}
|
|
115
|
+
static DeleteWSEvalJob(req: DeleteWSEvalJobRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
116
|
+
return fm.fetchReq<DeleteWSEvalJobRequest, GoogleProtobufEmpty.Empty>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/finetune-evaljobs/${req["id"]}`, {...initReq, method: "DELETE"})
|
|
117
|
+
}
|
|
118
|
+
static DefaultEvalJob(req: GoogleProtobufEmpty.Empty, initReq?: fm.InitReq): Promise<EvalJob> {
|
|
119
|
+
return fm.fetchReq<GoogleProtobufEmpty.Empty, EvalJob>(`/apis/hydra.io/v1alpha1/finetune-evaljobs:default?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
120
|
+
}
|
|
121
|
+
static GetWSEvalMetrics(req: GetWSEvalMetricsRequest, initReq?: fm.InitReq): Promise<GetWSEvalMetricsResponse> {
|
|
122
|
+
return fm.fetchReq<GetWSEvalMetricsRequest, GetWSEvalMetricsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/finetune-evaljobs/${req["id"]}/metrics?${fm.renderURLSearchParams(req, ["workspace", "id"])}`, {...initReq, method: "GET"})
|
|
123
|
+
}
|
|
124
|
+
}
|