-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprimes.proto
54 lines (42 loc) · 1.12 KB
/
primes.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
syntax = "proto3";
package helper;
message Empty {}
// client can request the price model server
// for accuracy of the model
message AccuracyRequest {
bytes ndarray_parameters = 1;
}
message AccuracyResponse {
float accuracy = 1;
float loss = 2;
}
message lossAndAccuracyRequest {
// array of cid: str
repeated string cids = 1;
// array of loss
repeated float losses = 2;
// array of accuracy
repeated float accuracies = 3;
}
message nextPrimesClientsRequest {
int32 k = 1;
}
message nextPrimesClientsReply {
repeated string cids = 1;
}
message ServerReply {
string status = 1;
}
message nextClippingClientsRequest {
int32 k = 1;
repeated string cids = 2;
}
message nextClippingClientsReply {
repeated string cids = 1;
}
service Primes {
rpc getNextStepLoss(lossAndAccuracyRequest) returns (ServerReply);
rpc getServerClientLoss(lossAndAccuracyRequest) returns (ServerReply);
rpc getNextPrimesClients(nextPrimesClientsRequest) returns (nextPrimesClientsReply);
rpc getNextClippingClients(nextClippingClientsRequest) returns (nextClippingClientsReply);
}