@daocloud-proto/hydra 0.0.0-dev-c571dd90 → 0.0.0-dev-5da66a4a
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.
|
@@ -102,6 +102,10 @@ export type GetWSEvalMetricsResponse = {
|
|
|
102
102
|
metrics?: GoogleProtobufStruct.Struct
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
export type DefaultEvalJobRequest = {
|
|
106
|
+
workspace?: number
|
|
107
|
+
}
|
|
108
|
+
|
|
105
109
|
export class WSEvalJobManagement {
|
|
106
110
|
static CreateWSEvalJob(req: CreateWSEvalJobRequest, initReq?: fm.InitReq): Promise<EvalJob> {
|
|
107
111
|
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)})
|
|
@@ -115,8 +119,8 @@ export class WSEvalJobManagement {
|
|
|
115
119
|
static DeleteWSEvalJob(req: DeleteWSEvalJobRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
116
120
|
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
121
|
}
|
|
118
|
-
static DefaultEvalJob(req:
|
|
119
|
-
return fm.fetchReq<
|
|
122
|
+
static DefaultEvalJob(req: DefaultEvalJobRequest, initReq?: fm.InitReq): Promise<EvalJob> {
|
|
123
|
+
return fm.fetchReq<DefaultEvalJobRequest, EvalJob>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/finetune-evaljobs:default?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
120
124
|
}
|
|
121
125
|
static GetWSEvalMetrics(req: GetWSEvalMetricsRequest, initReq?: fm.InitReq): Promise<GetWSEvalMetricsResponse> {
|
|
122
126
|
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"})
|
|
@@ -65,6 +65,10 @@ export type ListExportJobResponse = {
|
|
|
65
65
|
page?: HydraCommonCommon.Pagination
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
export type DefaultExportJobRequest = {
|
|
69
|
+
workspace?: number
|
|
70
|
+
}
|
|
71
|
+
|
|
68
72
|
export class WSExportJobService {
|
|
69
73
|
static CreatExportJob(req: SaveExportJobRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
70
74
|
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)})
|
|
@@ -72,8 +76,8 @@ export class WSExportJobService {
|
|
|
72
76
|
static DeleteExportJob(req: SingleExportJobRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
73
77
|
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
78
|
}
|
|
75
|
-
static DefaultExportJob(req:
|
|
76
|
-
return fm.fetchReq<
|
|
79
|
+
static DefaultExportJob(req: DefaultExportJobRequest, initReq?: fm.InitReq): Promise<ExportJob> {
|
|
80
|
+
return fm.fetchReq<DefaultExportJobRequest, ExportJob>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/finetune-exportjobs:default?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
77
81
|
}
|
|
78
82
|
static GetExportJob(req: SingleExportJobRequest, initReq?: fm.InitReq): Promise<ExportJob> {
|
|
79
83
|
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"})
|