@daocloud-proto/baize 0.102.4 → 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.
@@ -5,7 +5,9 @@
5
5
  */
6
6
 
7
7
  import * as BaizeCommonCommon from "../../../common/common.pb"
8
+ import * as BaizeCommonK8s from "../../../common/k8s.pb"
8
9
  import * as fm from "../../../fetch.pb"
10
+ import * as BaizeManagement_apiJobV1alpha1Paddle from "./paddle.pb"
9
11
  import * as BaizeManagement_apiJobV1alpha1Pytorch from "./pytorch.pb"
10
12
  import * as BaizeManagement_apiJobV1alpha1Tfjob from "./tfjob.pb"
11
13
 
@@ -22,6 +24,7 @@ export enum JobType {
22
24
  JOB_TYPE_UNSPECIFIED = "JOB_TYPE_UNSPECIFIED",
23
25
  PYTORCH = "PYTORCH",
24
26
  TENSORFLOW = "TENSORFLOW",
27
+ PADDLE = "PADDLE",
25
28
  }
26
29
 
27
30
  export enum JobActionRequestAction {
@@ -35,10 +38,11 @@ export enum JobActionRequestAction {
35
38
  queueName?: string
36
39
  priorityClass?: string
37
40
  runningDuration?: number
41
+ totalResources?: BaizeCommonK8s.Resources
38
42
  }
39
43
 
40
44
  export type Job = BaseJob
41
- & OneOf<{ pytorch: BaizeManagement_apiJobV1alpha1Pytorch.PyTorchJob; tensorflow: BaizeManagement_apiJobV1alpha1Tfjob.TFJob }>
45
+ & OneOf<{ pytorch: BaizeManagement_apiJobV1alpha1Pytorch.PyTorchJob; tensorflow: BaizeManagement_apiJobV1alpha1Tfjob.TFJob; paddle: BaizeManagement_apiJobV1alpha1Paddle.PaddleJob }>
42
46
 
43
47
  export type ListJobsRequest = {
44
48
  workspace?: number
@@ -74,7 +78,7 @@ export type SingleJobRequest = {
74
78
  }
75
79
 
76
80
  export type CreateJobRequest = BaseCreateJobRequest
77
- & OneOf<{ pytorch: BaizeManagement_apiJobV1alpha1Pytorch.PytorchJobCreationConfig; tensorflow: BaizeManagement_apiJobV1alpha1Tfjob.TFJobCreationConfig }>
81
+ & OneOf<{ pytorch: BaizeManagement_apiJobV1alpha1Pytorch.PytorchJobCreationConfig; tensorflow: BaizeManagement_apiJobV1alpha1Tfjob.TFJobCreationConfig; paddle: BaizeManagement_apiJobV1alpha1Paddle.PaddleJobCreationConfig }>
78
82
 
79
83
  export type JobActionRequest = {
80
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
+ }
@@ -101,6 +101,10 @@ export type DevDashboardVectorQueryResponse = {
101
101
  metric?: DevDashboardQueryMetric
102
102
  }
103
103
 
104
+ export type MultipleDevDashboardVectorQueryResponse = {
105
+ items?: DevDashboardVectorQueryResponse[]
106
+ }
107
+
104
108
  export type TimeSeriesVectorQueryResponse = {
105
109
  matrix?: Matrix
106
110
  error?: string
@@ -118,16 +122,13 @@ export type QueryDevDashboardMultipleVectorRequest = {
118
122
  queryMetrics?: DevDashboardQueryMetric[]
119
123
  time?: string
120
124
  workspace?: number
125
+ cluster?: string
121
126
  }
122
127
 
123
128
  export type MultipleVectorQueryResponse = {
124
129
  items?: VectorQueryResponse[]
125
130
  }
126
131
 
127
- export type MultipleDevDashboardVectorQueryResponse = {
128
- items?: VectorQueryResponse[]
129
- }
130
-
131
132
  export type QueryTimeSeriesVectorsRequest = {
132
133
  queryMetrics?: QueryTimeSeriesMetric[]
133
134
  queryMetricRange?: QueryTimeSeriesMetricRange
@@ -138,6 +139,24 @@ export type QueryTimeSeriesVectorsResponse = {
138
139
  items?: TimeSeriesVectorQueryResponse[]
139
140
  }
140
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
+
141
160
  export class MetricsService {
142
161
  static QueryMultipleVectors(req: QueryMultipleVectorRequest, initReq?: fm.InitReq): Promise<MultipleVectorQueryResponse> {
143
162
  return fm.fetchReq<QueryMultipleVectorRequest, MultipleVectorQueryResponse>(`/apis/baize.io/v1alpha1/metrics/multiple-queries?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -145,7 +164,13 @@ export class MetricsService {
145
164
  static QueryTimeSeriesVectors(req: QueryTimeSeriesVectorsRequest, initReq?: fm.InitReq): Promise<QueryTimeSeriesVectorsResponse> {
146
165
  return fm.fetchReq<QueryTimeSeriesVectorsRequest, QueryTimeSeriesVectorsResponse>(`/apis/baize.io/v1alpha1/metrics/time-series-queries?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
147
166
  }
148
- static QueryDevDashboardMultipleVectors(req: QueryDevDashboardMultipleVectorRequest, initReq?: fm.InitReq): Promise<DevDashboardVectorQueryResponse> {
149
- return fm.fetchReq<QueryDevDashboardMultipleVectorRequest, DevDashboardVectorQueryResponse>(`/apis/baize.io/v1alpha1/metrics/dev-dashboard-multiple-queries?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
167
+ static QueryDevDashboardMultipleVectors(req: QueryDevDashboardMultipleVectorRequest, initReq?: fm.InitReq): Promise<MultipleDevDashboardVectorQueryResponse> {
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"})
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"})
150
175
  }
151
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
@@ -106,11 +122,17 @@ export type CreateLocalQueueResponse = {
106
122
 
107
123
  export class QueueManagement {
108
124
  static ListQueues(req: ListQueueRequest, initReq?: fm.InitReq): Promise<ListQueueResponse> {
109
- return fm.fetchReq<ListQueueRequest, ListQueueResponse>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/queues?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
125
+ return fm.fetchReq<ListQueueRequest, ListQueueResponse>(`/apis/baize.io/v1alpha1/queues?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
110
126
  }
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/baize",
3
- "version": "v0.102.4",
3
+ "version": "v0.103.0",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"