-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrekcurd.proto
316 lines (243 loc) · 7.69 KB
/
rekcurd.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
// Template for Rekcurd
// DO NOT EDIT!
syntax = "proto3";
package rekcurd;
import "google/protobuf/descriptor.proto";
extend google.protobuf.FileOptions {
string rekcurd_grpc_proto_version = 50000;
}
option (rekcurd_grpc_proto_version) = "v2";
// gRPC official health check request.
message HealthCheckRequest {
string service = 1;
}
// gRPC official health check response.
message HealthCheckResponse {
enum ServingStatus {
UNKNOWN = 0;
SERVING = 1;
NOT_SERVING = 2;
}
ServingStatus status = 1;
}
// gRPC official health check service.
service Health {
rpc Check(HealthCheckRequest) returns (HealthCheckResponse);
}
// Rekcurd version info.
enum EnumVersionInfo {
// Version info. The largest number is the latest version.
v0 = 0;
v1 = 1;
v2 = 2;
}
// Rekcurd Dashboard service.
service RekcurdDashboard {
// Get Service Info.
rpc ServiceInfo (ServiceInfoRequest) returns (ServiceInfoResponse) {}
// Upload your latest ML model.
rpc UploadModel (stream UploadModelRequest) returns (ModelResponse) {}
// Switch your ML model to run.
rpc SwitchModel (SwitchModelRequest) returns (ModelResponse) {}
// Upload data for evaluation
rpc UploadEvaluationData (stream UploadEvaluationDataRequest) returns (UploadEvaluationDataResponse) {}
// Evaluate the accuracy of your ML model.
// Deprecated: `stream` is deprecated. upload evaluation data by using UploadEvaluationData
rpc EvaluateModel (stream EvaluateModelRequest) returns (EvaluateModelResponse) {}
// Get detailed result of EvaluateModel
rpc EvaluationResult (EvaluationResultRequest) returns (stream EvaluationResultResponse) {}
}
// Rekcurd worker service.
service RekcurdWorker {
// Input string, output string.
rpc Predict_String_String (StringInput) returns (StringOutput) {}
// Input string, output bytes.
rpc Predict_String_Bytes (StringInput) returns (stream BytesOutput) {}
// Input string, output array[int].
rpc Predict_String_ArrInt (StringInput) returns (ArrIntOutput) {}
// Input string, output array[float].
rpc Predict_String_ArrFloat (StringInput) returns (ArrFloatOutput) {}
// Input string, output array[string].
rpc Predict_String_ArrString (StringInput) returns (ArrStringOutput) {}
// Input bytes, output string.
rpc Predict_Bytes_String (stream BytesInput) returns (StringOutput) {}
// Input bytes, output bytes.
rpc Predict_Bytes_Bytes (stream BytesInput) returns (stream BytesOutput) {}
// Input bytes, output array[int].
rpc Predict_Bytes_ArrInt (stream BytesInput) returns (ArrIntOutput) {}
// Input bytes, output array[float].
rpc Predict_Bytes_ArrFloat (stream BytesInput) returns (ArrFloatOutput) {}
// Input bytes, output array[string].
rpc Predict_Bytes_ArrString (stream BytesInput) returns (ArrStringOutput) {}
// Input array[int], output string.
rpc Predict_ArrInt_String (ArrIntInput) returns (StringOutput) {}
// Input array[int], output bytes.
rpc Predict_ArrInt_Bytes (ArrIntInput) returns (stream BytesOutput) {}
// Input array[int], output array[int].
rpc Predict_ArrInt_ArrInt (ArrIntInput) returns (ArrIntOutput) {}
// Input array[int], output array[float].
rpc Predict_ArrInt_ArrFloat (ArrIntInput) returns (ArrFloatOutput) {}
// Input array[int], output array[string].
rpc Predict_ArrInt_ArrString (ArrIntInput) returns (ArrStringOutput) {}
// Input array[float], output string.
rpc Predict_ArrFloat_String (ArrFloatInput) returns (StringOutput) {}
// Input array[float], output bytes.
rpc Predict_ArrFloat_Bytes (ArrFloatInput) returns (stream BytesOutput) {}
// Input array[float], output array[int].
rpc Predict_ArrFloat_ArrInt (ArrFloatInput) returns (ArrIntOutput) {}
// Input array[float], output array[float].
rpc Predict_ArrFloat_ArrFloat (ArrFloatInput) returns (ArrFloatOutput) {}
// Input array[float], output array[string].
rpc Predict_ArrFloat_ArrString (ArrFloatInput) returns (ArrStringOutput) {}
// Input array[string], output string.
rpc Predict_ArrString_String (ArrStringInput) returns (StringOutput) {}
// Input array[string], output bytes.
rpc Predict_ArrString_Bytes (ArrStringInput) returns (stream BytesOutput) {}
// Input array[string], output array[int].
rpc Predict_ArrString_ArrInt (ArrStringInput) returns (ArrIntOutput) {}
// Input array[string], output array[float].
rpc Predict_ArrString_ArrFloat (ArrStringInput) returns (ArrFloatOutput) {}
// Input array[string], output array[string].
rpc Predict_ArrString_ArrString (ArrStringInput) returns (ArrStringOutput) {}
}
message ArrString {
repeated string val = 1;
}
message Tensor {
repeated int32 shape = 1;
repeated double val = 2;
}
// Supported type of Input/Output data
message IO {
oneof io_oneof {
Tensor tensor = 1;
ArrString str = 2;
}
}
// Request of ServiceInfo.
message ServiceInfoRequest {}
// Response of ServiceInfo.
message ServiceInfoResponse {
string application_name = 1;
string service_name = 2;
string service_level = 3;
}
// Request of UploadModel.
message UploadModelRequest {
string path = 1;
bytes data = 2;
}
// Request of SwitchModel.
message SwitchModelRequest {
string path = 1;
}
// Response of ModelControl (Upload / Switch / Delete).
message ModelResponse {
int32 status = 1;
string message = 2;
}
message UploadEvaluationDataRequest {
bytes data = 1;
string data_path = 2;
}
message UploadEvaluationDataResponse {
int32 status = 1;
string message = 2;
}
// Request of EvaluateModel.
message EvaluateModelRequest {
// Deprecated: should use data in UploadEvaluationDataRequest
bytes data = 1 [deprecated=true];
string data_path = 2;
string result_path = 3;
}
message EvaluationMetrics {
int32 num = 1;
float accuracy = 2;
repeated float precision = 3;
repeated float recall = 4;
repeated float fvalue = 5;
// additional metrics
map<string, float> option = 6;
repeated IO label = 7;
}
// Response of EvaluateModel.
message EvaluateModelResponse {
EvaluationMetrics metrics = 1;
}
// Request of EvaluationResult.
message EvaluationResultRequest {
string data_path = 1;
string result_path = 2;
}
// Response of EvaluationResult.
message EvaluationResultResponse {
EvaluationMetrics metrics = 1;
message Detail {
IO input = 1;
IO label = 2;
IO output = 3;
repeated float score = 4;
bool is_correct = 5;
}
repeated Detail detail = 2;
}
// Option (json format).
message Option {
string val = 1;
}
// Input string
message StringInput {
string input = 1;
Option option = 2;
}
// Input bytes
message BytesInput {
bytes input = 1;
Option option = 2;
}
// Input array[int]
message ArrIntInput {
repeated int32 input = 1;
Option option = 2;
}
// Input array[float]
message ArrFloatInput {
repeated float input = 1;
Option option = 2;
}
// Input array[float]
message ArrStringInput {
repeated string input = 1;
Option option = 2;
}
// Output string
message StringOutput {
string output = 1;
float score = 2;
Option option = 3;
}
// Output bytes
message BytesOutput {
bytes output = 1;
float score = 2;
Option option = 3;
}
// Output array[int]
message ArrIntOutput {
repeated int32 output = 1;
repeated float score = 2;
Option option = 3;
}
// Output array[float]
message ArrFloatOutput {
repeated float output = 1;
repeated float score = 2;
Option option = 3;
}
// Output array[string]
message ArrStringOutput {
repeated string output = 1;
repeated float score = 2;
Option option = 3;
}