@daocloud-proto/baize 0.102.5 → 0.103.0
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.
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import * as BaizeCommonCommon from "../../../common/common.pb"
|
|
8
8
|
import * as BaizeCommonK8s from "../../../common/k8s.pb"
|
|
9
9
|
import * as fm from "../../../fetch.pb"
|
|
10
|
+
import * as BaizeManagement_apiJobV1alpha1Paddle from "./paddle.pb"
|
|
10
11
|
import * as BaizeManagement_apiJobV1alpha1Pytorch from "./pytorch.pb"
|
|
11
12
|
import * as BaizeManagement_apiJobV1alpha1Tfjob from "./tfjob.pb"
|
|
12
13
|
|
|
@@ -23,6 +24,7 @@ export enum JobType {
|
|
|
23
24
|
JOB_TYPE_UNSPECIFIED = "JOB_TYPE_UNSPECIFIED",
|
|
24
25
|
PYTORCH = "PYTORCH",
|
|
25
26
|
TENSORFLOW = "TENSORFLOW",
|
|
27
|
+
PADDLE = "PADDLE",
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
export enum JobActionRequestAction {
|
|
@@ -40,7 +42,7 @@ export enum JobActionRequestAction {
|
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
export type Job = BaseJob
|
|
43
|
-
& OneOf<{ pytorch: BaizeManagement_apiJobV1alpha1Pytorch.PyTorchJob; tensorflow: BaizeManagement_apiJobV1alpha1Tfjob.TFJob }>
|
|
45
|
+
& OneOf<{ pytorch: BaizeManagement_apiJobV1alpha1Pytorch.PyTorchJob; tensorflow: BaizeManagement_apiJobV1alpha1Tfjob.TFJob; paddle: BaizeManagement_apiJobV1alpha1Paddle.PaddleJob }>
|
|
44
46
|
|
|
45
47
|
export type ListJobsRequest = {
|
|
46
48
|
workspace?: number
|
|
@@ -76,7 +78,7 @@ export type SingleJobRequest = {
|
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
export type CreateJobRequest = BaseCreateJobRequest
|
|
79
|
-
& OneOf<{ pytorch: BaizeManagement_apiJobV1alpha1Pytorch.PytorchJobCreationConfig; tensorflow: BaizeManagement_apiJobV1alpha1Tfjob.TFJobCreationConfig }>
|
|
81
|
+
& OneOf<{ pytorch: BaizeManagement_apiJobV1alpha1Pytorch.PytorchJobCreationConfig; tensorflow: BaizeManagement_apiJobV1alpha1Tfjob.TFJobCreationConfig; paddle: BaizeManagement_apiJobV1alpha1Paddle.PaddleJobCreationConfig }>
|
|
80
82
|
|
|
81
83
|
export type JobActionRequest = {
|
|
82
84
|
workspace?: number
|
|
@@ -0,0 +1,34 @@
|
|
|
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 GoogleProtobufStruct from "../../../google/protobuf/struct.pb"
|
|
8
|
+
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
9
|
+
import * as BaizeManagement_apiJobV1alpha1Common from "./common.pb"
|
|
10
|
+
|
|
11
|
+
export enum PaddleRole {
|
|
12
|
+
PADDLE_ROLE_UNSPECIFIED = "PADDLE_ROLE_UNSPECIFIED",
|
|
13
|
+
PD_MASTER = "PD_MASTER",
|
|
14
|
+
PD_WORKER = "PD_WORKER",
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type PaddleJob = {
|
|
18
|
+
cluster?: string
|
|
19
|
+
namespace?: string
|
|
20
|
+
name?: string
|
|
21
|
+
trainingMode?: BaizeManagement_apiJobV1alpha1Common.TrainingMode
|
|
22
|
+
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
23
|
+
phase?: BaizeManagement_apiJobV1alpha1Common.JobPhase
|
|
24
|
+
labels?: {[key: string]: string}
|
|
25
|
+
annotations?: {[key: string]: string}
|
|
26
|
+
jobSpec?: GoogleProtobufStruct.Struct
|
|
27
|
+
description?: string
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type PaddleJobCreationConfig = {
|
|
31
|
+
trainingMode?: BaizeManagement_apiJobV1alpha1Common.TrainingMode
|
|
32
|
+
baseConfig?: BaizeManagement_apiJobV1alpha1Common.JobCreationBaseConfig
|
|
33
|
+
roleConfig?: {[key: string]: BaizeManagement_apiJobV1alpha1Common.JobRoleDifferenceConfig}
|
|
34
|
+
}
|
|
@@ -139,6 +139,24 @@ export type QueryTimeSeriesVectorsResponse = {
|
|
|
139
139
|
items?: TimeSeriesVectorQueryResponse[]
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
+
export type GrafanaDashboard = {
|
|
143
|
+
urlEN?: string
|
|
144
|
+
urlZH?: string
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export type DevOverviewDashboardRequest = {
|
|
148
|
+
workspace?: number
|
|
149
|
+
cluster?: string
|
|
150
|
+
from?: string
|
|
151
|
+
to?: string
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export type AdminOverviewDashboardRequest = {
|
|
155
|
+
cluster?: string
|
|
156
|
+
from?: string
|
|
157
|
+
to?: string
|
|
158
|
+
}
|
|
159
|
+
|
|
142
160
|
export class MetricsService {
|
|
143
161
|
static QueryMultipleVectors(req: QueryMultipleVectorRequest, initReq?: fm.InitReq): Promise<MultipleVectorQueryResponse> {
|
|
144
162
|
return fm.fetchReq<QueryMultipleVectorRequest, MultipleVectorQueryResponse>(`/apis/baize.io/v1alpha1/metrics/multiple-queries?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -149,4 +167,10 @@ export class MetricsService {
|
|
|
149
167
|
static QueryDevDashboardMultipleVectors(req: QueryDevDashboardMultipleVectorRequest, initReq?: fm.InitReq): Promise<MultipleDevDashboardVectorQueryResponse> {
|
|
150
168
|
return fm.fetchReq<QueryDevDashboardMultipleVectorRequest, MultipleDevDashboardVectorQueryResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/metrics/dev-dashboard-multiple-queries?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
151
169
|
}
|
|
170
|
+
static GetDevGrafanaDashboard(req: DevOverviewDashboardRequest, initReq?: fm.InitReq): Promise<GrafanaDashboard> {
|
|
171
|
+
return fm.fetchReq<DevOverviewDashboardRequest, GrafanaDashboard>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/grafana-dashboards/dev-overview?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
172
|
+
}
|
|
173
|
+
static GetAdminGrafanaDashboard(req: AdminOverviewDashboardRequest, initReq?: fm.InitReq): Promise<GrafanaDashboard> {
|
|
174
|
+
return fm.fetchReq<AdminOverviewDashboardRequest, GrafanaDashboard>(`/apis/baize.io/v1alpha1/grafana-dashboards/admin-overview?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
175
|
+
}
|
|
152
176
|
}
|
|
@@ -68,6 +68,22 @@ export type CreateQueueRequest = {
|
|
|
68
68
|
strategy?: QueueStrategy
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
export type UpdateQueueRequest = {
|
|
72
|
+
type?: QueueType
|
|
73
|
+
cluster?: string
|
|
74
|
+
name?: string
|
|
75
|
+
workspace?: number
|
|
76
|
+
description?: string
|
|
77
|
+
resources?: QueueResource[]
|
|
78
|
+
strategy?: QueueStrategy
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type GetQueueRequest = {
|
|
82
|
+
type?: QueueType
|
|
83
|
+
cluster?: string
|
|
84
|
+
name?: string
|
|
85
|
+
}
|
|
86
|
+
|
|
71
87
|
export type DeleteQueueRequest = {
|
|
72
88
|
type?: QueueType
|
|
73
89
|
cluster?: string
|
|
@@ -111,6 +127,12 @@ export class QueueManagement {
|
|
|
111
127
|
static CreateQueue(req: CreateQueueRequest, initReq?: fm.InitReq): Promise<Queue> {
|
|
112
128
|
return fm.fetchReq<CreateQueueRequest, Queue>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/queues`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
113
129
|
}
|
|
130
|
+
static UpdateQueue(req: UpdateQueueRequest, initReq?: fm.InitReq): Promise<Queue> {
|
|
131
|
+
return fm.fetchReq<UpdateQueueRequest, Queue>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/queues/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
132
|
+
}
|
|
133
|
+
static GetQueue(req: GetQueueRequest, initReq?: fm.InitReq): Promise<Queue> {
|
|
134
|
+
return fm.fetchReq<GetQueueRequest, Queue>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/queues/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "name"])}`, {...initReq, method: "GET"})
|
|
135
|
+
}
|
|
114
136
|
static DeleteQueue(req: DeleteQueueRequest, initReq?: fm.InitReq): Promise<Queue> {
|
|
115
137
|
return fm.fetchReq<DeleteQueueRequest, Queue>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/queues/${req["name"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req, fm.replacer)})
|
|
116
138
|
}
|