-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmonitoring_manager.proto
150 lines (120 loc) · 2.79 KB
/
monitoring_manager.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
syntax = "proto3";
package monitoring_manager;
import "google/protobuf/timestamp.proto";
message ModelSignature {
repeated ModelField inputs = 2;
repeated ModelField outputs = 3;
}
message ModelField {
string name = 1;
TensorShape shape = 2;
DataType dtype = 4;
DataProfileType profile = 5;
}
enum DataType {
// Not a legal value for DataType. Used to indicate a DataType field
// has not been set.
DT_INVALID = 0;
// Data types that all computation devices are expected to be
// capable to support.
DT_FLOAT = 1;
DT_DOUBLE = 2;
DT_INT32 = 3;
DT_UINT8 = 4;
DT_INT16 = 5;
DT_INT8 = 6;
DT_STRING = 7;
DT_INT64 = 9;
DT_BOOL = 10;
DT_UINT16 = 17;
DT_HALF = 19;
DT_UINT32 = 22;
DT_UINT64 = 23;
DT_ANY = 24;
}
enum DataProfileType {
NONE = 0;
CATEGORICAL = 1;
NOMINAL = 11;
ORDINAL = 12;
NUMERICAL = 2;
CONTINUOUS = 21;
INTERVAL = 22;
RATIO = 23;
IMAGE = 3;
VIDEO = 4;
AUDIO = 5;
TEXT = 6;
}
message TensorShape {
repeated int64 dims = 1;
};
// === END OF contract modeling ===
service PluginManagementService {
rpc RegisterPlugin(RegisterPluginRequest) returns (RegisterPluginResponse);
}
message RegisterPluginRequest {
string plugin_id = 1;
// PLUGIN FRONTEND FIELDS
// string iconUrl = 2;
string description = 3;
string routePath = 5;
string ngModuleName = 6;
// string remoteEntry = 7;
string remoteName = 8;
string exposedModule = 9;
// END OF PLUGIN FRONTEND FIELDS
string addr = 10;
}
message RegisterPluginResponse {
}
service ModelCatalogService {
rpc GetModelUpdates(GetModelUpdatesRequest) returns (stream GetModelUpdatesResponse);
}
message GetModelUpdatesRequest {
string plugin_id = 1;
}
message GetModelUpdatesResponse {
ModelId model = 1;
ModelSignature signature = 2;
repeated DataObject training_data_objs = 3;
}
service DataStorageService {
rpc GetInferenceDataUpdates (stream GetInferenceDataUpdatesRequest) returns (stream GetInferenceDataUpdatesResponse);
}
message GetInferenceDataUpdatesRequest {
string plugin_id = 1;
AnalyzedAck ack = 2;
}
message GetInferenceDataUpdatesResponse {
ModelId model = 1;
ModelSignature signature = 2;
repeated DataObject inference_data_objs = 3;
}
message ModelId {
string model_name = 1;
uint64 model_version = 2;
}
message AnalyzedAck {
string model_name = 1;
uint64 model_version = 2;
DataObject inference_data_obj = 3;
map<string, FeatureReport> feature_reports = 4;
BatchStatistics batch_stats = 5;
}
message BatchStatistics {
double sus_ratio = 1; // [0, +inf]
string sus_verdict = 2;
double fail_ratio = 3; // [0, 1]
}
message FeatureReport {
repeated FRRow rows = 1;
}
message FRRow {
string description = 1;
bool is_good = 2;
}
message DataObject {
string key = 1;
google.protobuf.Timestamp lastModifiedAt = 2;
}