@daocloud-proto/hydra 0.0.0-dev-d87e43f9 → 0.0.0-dev-997245b5
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.
|
@@ -0,0 +1,84 @@
|
|
|
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 HydraManagement_apiFinetuneV1alpha1Common from "./common.pb"
|
|
12
|
+
|
|
13
|
+
export enum ExportDevice {
|
|
14
|
+
cpu = "cpu",
|
|
15
|
+
auto = "auto",
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type ExportJob = {
|
|
19
|
+
workspace?: number
|
|
20
|
+
name?: string
|
|
21
|
+
cluster?: string
|
|
22
|
+
namespace?: string
|
|
23
|
+
finetuneConfigName?: string
|
|
24
|
+
finetuneJobName?: string
|
|
25
|
+
filesStorageName?: string
|
|
26
|
+
exportSubdir?: string
|
|
27
|
+
exportSize?: number
|
|
28
|
+
exportDevice?: ExportDevice
|
|
29
|
+
exportLegacyFormat?: boolean
|
|
30
|
+
status?: HydraManagement_apiFinetuneV1alpha1Common.JobStatus
|
|
31
|
+
reason?: string
|
|
32
|
+
creationTime?: GoogleProtobufTimestamp.Timestamp
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type SaveExportJobRequest = {
|
|
36
|
+
workspace?: number
|
|
37
|
+
name?: string
|
|
38
|
+
cluster?: string
|
|
39
|
+
namespace?: string
|
|
40
|
+
finetuneConfigName?: string
|
|
41
|
+
finetuneJobName?: string
|
|
42
|
+
filesStorageName?: string
|
|
43
|
+
exportSubdir?: string
|
|
44
|
+
exportSize?: number
|
|
45
|
+
exportDevice?: ExportDevice
|
|
46
|
+
exportLegacyFormat?: boolean
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type SingleExportJobRequest = {
|
|
50
|
+
workspace?: number
|
|
51
|
+
cluster?: string
|
|
52
|
+
namespace?: string
|
|
53
|
+
name?: string
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type ListExportJobRequest = {
|
|
57
|
+
workspace?: number
|
|
58
|
+
cluster?: string
|
|
59
|
+
namespace?: string
|
|
60
|
+
page?: HydraCommonCommon.Pagination
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type ListExportJobResponse = {
|
|
64
|
+
exportJobs?: ExportJob[]
|
|
65
|
+
page?: HydraCommonCommon.Pagination
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export class WSExportJobService {
|
|
69
|
+
static CreatExportJob(req: SaveExportJobRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
70
|
+
return fm.fetchReq<SaveExportJobRequest, GoogleProtobufEmpty.Empty>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/finetune-exportjobs`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
71
|
+
}
|
|
72
|
+
static DeleteExportJob(req: SingleExportJobRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
73
|
+
return fm.fetchReq<SingleExportJobRequest, GoogleProtobufEmpty.Empty>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/finetune-exportjobs/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
74
|
+
}
|
|
75
|
+
static DefaultExportJob(req: GoogleProtobufEmpty.Empty, initReq?: fm.InitReq): Promise<ExportJob> {
|
|
76
|
+
return fm.fetchReq<GoogleProtobufEmpty.Empty, ExportJob>(`/apis/hydra.io/v1alpha1/finetune-exportjobs:default?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
77
|
+
}
|
|
78
|
+
static GetExportJob(req: SingleExportJobRequest, initReq?: fm.InitReq): Promise<ExportJob> {
|
|
79
|
+
return fm.fetchReq<SingleExportJobRequest, ExportJob>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/finetune-exportjobs/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
80
|
+
}
|
|
81
|
+
static ListExportJob(req: ListExportJobRequest, initReq?: fm.InitReq): Promise<ListExportJobResponse> {
|
|
82
|
+
return fm.fetchReq<ListExportJobRequest, ListExportJobResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/finetune-exportjobs?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -8,6 +8,15 @@ import * as HydraCommonCommon from "../../../common/common.pb"
|
|
|
8
8
|
import * as fm from "../../../fetch.pb"
|
|
9
9
|
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
10
10
|
|
|
11
|
+
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
12
|
+
type OneOf<T> =
|
|
13
|
+
| { [k in keyof T]?: undefined }
|
|
14
|
+
| (
|
|
15
|
+
keyof T extends infer K ?
|
|
16
|
+
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
17
|
+
: never)
|
|
18
|
+
: never);
|
|
19
|
+
|
|
11
20
|
export enum TrainingStage {
|
|
12
21
|
TRAINING_STAGE_UNSPECIFIED = "TRAINING_STAGE_UNSPECIFIED",
|
|
13
22
|
SFT = "SFT",
|
|
@@ -86,19 +95,18 @@ export type DpoConfig = {
|
|
|
86
95
|
refModel?: string
|
|
87
96
|
}
|
|
88
97
|
|
|
89
|
-
export type ResourceQuota = {
|
|
90
|
-
request?: string
|
|
91
|
-
limit?: string
|
|
92
|
-
}
|
|
93
98
|
|
|
94
|
-
export type
|
|
95
|
-
replicas?: number
|
|
99
|
+
/* hydra modified */ export type BaseResourceConfig = {
|
|
96
100
|
gpuType?: string
|
|
97
101
|
gpuCount?: number
|
|
98
|
-
cpu?:
|
|
99
|
-
memory?:
|
|
102
|
+
cpu?: number
|
|
103
|
+
memory?: number
|
|
104
|
+
perGpuMemory?: number
|
|
100
105
|
}
|
|
101
106
|
|
|
107
|
+
export type ResourceConfig = BaseResourceConfig
|
|
108
|
+
& OneOf<{ gpuCores: number }>
|
|
109
|
+
|
|
102
110
|
export type FineTuneConfig = {
|
|
103
111
|
name?: string
|
|
104
112
|
cluster?: string
|
|
@@ -51,6 +51,7 @@ export type FineTuneJob = {
|
|
|
51
51
|
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
52
52
|
completionTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
53
53
|
metrics?: MetricPoint[]
|
|
54
|
+
trainingParams?: GoogleProtobufStruct.Struct
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
export type CreateWSFineTuneJobRequest = {
|