-
Notifications
You must be signed in to change notification settings - Fork 0
/
ml-server.yaml
258 lines (216 loc) · 8.52 KB
/
ml-server.yaml
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
type: Test
spec:
id: xZIRCuIIZ
name: MLservertest
trigger:
type: grpc
grpc:
protobufFile: |
syntax = "proto3";
package experiment.ml_server;
option go_package = "gitlab.com/tariandev_intelops/grpc/ml_server";
message ClientDetails{
string name = 1;
string email = 2;
}
message ClientCredentials{
string agentID = 1;
string clientID = 2;
string clientSecret = 3;
string token = 4;
string name = 5;
string email = 6;
}
message Agents {
repeated ClientCredentials agent = 6;
}
message Email{
string email = 1;
}
message SetupName{
string setupName = 1;
}
message Limit {
string min = 1;
string max = 2;
}
message Null {};
message Cpu {
string limit = 1;
string request = 2;
}
message Memory {
string limit = 1;
string request = 2;
}
message ResourceLimits{
Cpu cpu = 1;
Memory memory = 2;
}
message GitParams {
string url = 1;
string user = 2;
string token = 3;
string branch = 4;
string path = 5;
}
message ExperimentSetupRequest{
map<string, string> agentDetails = 1;
map<string, string> applicationDetails = 2;
int32 noOfIterations = 3;
Limit cpu = 4;
Limit memory = 5;
ResourceLimits initialLimits = 6;
string AgentAddress = 7;
string MLDataCollectorAddress = 8;
GitParams kustomizationParams = 9;
GitParams testParams = 10;
string email = 11;
string setupName = 12;
int32 noOfHits = 13;
bool isTrain = 14;
}
message ResourceUsage {
string cpu = 1;
string memory = 2;
}
message IterationsDetails {
IterationReq request =1;
IterationResp response =2;
int32 IterationNumber =3;
int32 EpisodeNumber =4;
bool IsSuggested =5;
}
message Iterations {
repeated ExperimentSetupResponse iterations =1;
}
message IterationReq{
string iterationID = 1;
string experimentID = 2;
ResourceLimits limits = 3;
ExperimentSetupRequest setupReq = 4;
}
message IterationResp{
string status = 1;
string iterationID = 2;
string experimentID = 3;
IterationReq request = 4;
ResourceUsage maxLimit = 5;
repeated ResourceUsage resourceLimits = 6;
float Cpu = 7;
float Memory = 8;
int32 EnvStatus = 9;
float Latency = 10;
int32 NoOfErrors = 11;
int32 NoOfFailures = 12;
float NoUserPerSec = 13;
float ResponseTime = 14;
float SuccessRate = 15;
int32 TotReq = 16;
map<string, float> expSupportMetric = 17;
}
message ExperimentSetupResponse{
string exp_id = 1;
string status = 2;
repeated IterationsDetails results = 3;
}
message SetupTemplate{
repeated SetupDetails setupDetails = 1;
}
message SetupDetails{
string ApplicationName = 1;
string SetupName = 2;
}
message Experiments{
repeated ExperimentDetails experiments = 1;
}
message ExperimentDetails{
string expId = 1;
string AgentDetails = 2;
string AgentID = 3;
string ApplicationName = 4;
string Status = 5;
int64 create_time = 6;
int64 update_time = 7;
int64 TrailCount = 8;
string setupName = 9;
string AgentName =10;
}
message Experiment{
string exp_id = 1;
}
message Iteration{
string itr_id = 1;
}
message TerminationResp{
string message = 1;
}
message Response{
int64 code = 1;
string message = 2;
}
message UploadCertRequest {
string agent_id = 1;
string exp_id = 2;
string client_key_data = 3;
string client_cert_data = 4;
string client_ca_chain_data = 5;
}
message UploadCertResponse{
string status = 1;
string exp_id = 2;
string agent_id = 3;
}
message DownloadCertResponse {
string agent_id = 1;
string exp_id = 2;
string client_key_data = 3;
string client_cert_data = 4;
string client_ca_chain_data = 5;
}
message DownloadCertRequest{
string agent_id = 1;
string exp_id = 2;
}
message AgentNotification{
string experimentID = 1;
string status = 2;
}
message DataCollectorNotification{
string experimentID = 1;
string status = 2;
}
message DataCollectorNotificationResponse{
string status = 1;
ExperimentSetupRequest setup = 2;
}
service AgentHandler {
rpc RegisterAgent(ClientDetails) returns(ClientCredentials){}
rpc GetAgents(Null) returns(Agents){}
rpc GetAgentByEmail(Email) returns(Agents){}
rpc UploadCertificate(UploadCertRequest) returns(UploadCertResponse){}
rpc DownloadCertificate(DownloadCertRequest) returns(DownloadCertResponse){}
}
service ExperimentHandler {
rpc Setup(ExperimentSetupRequest) returns(ExperimentSetupResponse){}
rpc StartExperiment(Experiment) returns(Null){}
rpc StatusExperiment(Experiment) returns(ExperimentSetupResponse){}
rpc StopExperiment(Experiment) returns(TerminationResp){}
rpc GetAllExperimentByEmail(Email) returns(Experiments){}
rpc GetAllIterationsByEmail(Email) returns(Iterations){}
rpc GetIterationsByID(Iteration) returns(IterationsDetails){}
rpc GetIterationsByExpID(Experiment) returns(ExperimentSetupResponse){}
rpc GetAllSetupNameByEmail(Email) returns(SetupTemplate){}
rpc GetAllExperimentBySetupName(SetupName) returns(Experiments){}
rpc ReStartExperiment(Experiment) returns(Response){}
}
service ServerCallBacksHandler {
rpc MLAgentSetupCallback(AgentNotification) returns(Null){}
rpc DataCollectorSetupCallback(DataCollectorNotification) returns(DataCollectorNotificationResponse){}
rpc DataCollectorIterationStatusCallback(IterationsDetails) returns(Null){}
rpc DataCollectorExperimentStatusCallback(DataCollectorNotification) returns(Null){}
}
address: ml-server.alpha.intelops.app:80
method: experiment.ml_server.AgentHandler.GetAgentByEmail
request: "{\"email\" : \"[email protected]\"}"
auth: {}