service.proto 1.41 KB
Newer Older
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
syntax = "proto2";

package proto;

service Predict {
  
  rpc PredictPerformance (PredictRequest) returns (PredictReply) {}
  rpc getModel (ModelRequest) returns (ModelReply) {}
  rpc trainModel (TrainRequest) returns (TrainReply) {}
}

message Any {
  oneof kind {
    int64 int_value = 1;
    float float_value = 2;
    string string_value = 3;
    ListOfStrings list_value = 4;
  }
}

message Pair {
    required string key = 1;
    required Any value = 2;
 }
 
 message Dictionary {
    //repeated Pair pairs = 1;
    map<string,Any> fields = 1;
 }

message PredictRequest {
  required string application = 1;
  required Dictionary features = 2;
  required string target = 3;
  required string variant = 4;
}


message PredictReply {
  required bool status = 1;
  required Dictionary results = 2;
  required Dictionary ml = 3;
  required string message = 4;
}

message ModelRequest {
  required string application = 1;
  required string target = 2;
}

message ModelReply {
  required Dictionary results = 1;
}

message ListValue {
  repeated ListOfStrings listOfStrings=1;
}

message ListOfStrings {
  repeated string strings=1;
}

message TrainRequest {
  required string application = 1;
  required string url_file = 2;
  required ListOfStrings features = 3;
  required string target = 4;
  required string variant = 5;
}

message TrainReply {
  required bool status = 1;
  required string message = 2;
  required string application = 3;
}