-
Notifications
You must be signed in to change notification settings - Fork 1
/
experiment_service.proto
212 lines (163 loc) · 4.77 KB
/
experiment_service.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
syntax = "proto3";
service ExperimentService {
rpc StreamStatus (Empty) returns (stream TrainingStatusEx);
rpc ExperimentCommand (TrainerCommand) returns (CommandResponse);
rpc ManipulateWeights(WeightsOperationRequest) returns (WeightsOperationResponse);
rpc GetSample(SampleRequest) returns (SampleRequestResponse);
rpc GetWeights(WeigthsRequest) returns (WeightsResponse);
}
message Empty {}
message NeuronId {
int32 layer_id = 1;
int32 neuron_id = 2;
}
enum WeightOperationType {
ZEROFY = 0;
REINITIALIZE = 1;
FREEZE = 2;
UNFREEZE = 11;
FREEZE_BIAS = 3;
FREEZE_INCOMING = 4;
OVERRIDE_WEIGHTS = 5;
OVERIIDE_BIASSES = 8;
CHANGE_LEARNING_RATE = 6;
SORT_BY_STAT = 7;
REMOVE_NEURONS = 9;
ADD_NEURONS = 10;
}
message WeightOperation {
optional WeightOperationType op_type = 1;
optional int32 layer_id = 2;
repeated NeuronId neuron_ids = 3;
optional NeuronId incoming_neuron_id = 4;
repeated float override_values = 5;
optional float individual_learning_rate = 6;
optional string sorting_statistic_name = 7;
int32 neurons_to_add = 9;
}
message WeightsOperationRequest {
optional WeightOperation weight_operation = 1;
}
message WeightsOperationResponse {
bool success = 1;
string message = 2;
}
message HyperParameters {
optional string experiment_name = 1;
optional int32 training_steps_to_do = 2;
optional float learning_rate = 3;
optional int32 batch_size = 4;
optional int32 full_eval_frequency = 5;
optional int32 checkpont_frequency = 6;
optional bool is_training = 7;
}
message MetricsStatus {
string name = 1;
float value = 2;
}
message AnnotatStatus {
string name = 1;
map<string, float> metadata = 2;
}
message TrainingStatusEx {
optional string timestamp = 1;
optional string experiment_name = 2;
optional int32 model_age = 3;
optional MetricsStatus metrics_status = 4;
optional AnnotatStatus annotat_status = 5;
}
message HyperParameterCommand {
optional HyperParameters hyper_parameters = 1;
}
message DenySamplesOperation {
repeated int32 sample_ids = 1;
}
message LoadCheckpointOperation {
int32 checkpoint_id = 1;
}
message TrainerCommand {
bool get_hyper_parameters = 4;
bool get_interactive_layers = 5;
optional string get_data_records = 6;
optional int32 get_single_layer_info_id = 8;
optional HyperParameterCommand hyper_parameter_change = 1;
optional DenySamplesOperation deny_samples_operation = 7;
optional LoadCheckpointOperation load_checkpoint_operation = 9;
}
message HyperParameterDesc {
string label = 1;
string name = 2;
string type = 3;
optional float numerical_value = 4;
optional string string_value = 5;
}
message NeuronStatistics {
optional NeuronId neuron_id = 1;
optional int32 neuron_age = 2;
optional float train_trigger_rate = 3;
optional float eval_trigger_rate = 4;
optional float weight_difference = 5;
optional float bias_difference = 6;
optional float learning_rate = 7;
map<int32, float> incoming_learning_rate = 8;
}
message LayerRepresentation {
optional int32 layer_id = 1;
optional string layer_name = 2;
optional string layer_type = 3;
optional int32 neurons_count = 4;
optional int32 incoming_neurons_count = 5;
optional int32 kernel_size = 6;
optional int32 stride = 7;
map<int32, float> per_neuron_learning_rates = 8;
map<int32, float> per_incoming_neuron_learning_rates = 9;
repeated NeuronStatistics neurons_statistics = 10;
}
message SampleStatistics {
optional string origin = 6;
optional int32 sample_count = 7;
map<int32, int32> sample_label = 1;
map<int32, int32> sample_prediction = 2;
map<int32, float> sample_last_loss = 3;
map<int32, int32> sample_encounters = 4;
map<int32, bool> sample_discarded = 5;
}
message CommandResponse {
bool success = 1;
string message = 2;
repeated HyperParameterDesc hyper_parameters_descs = 3;
repeated LayerRepresentation layer_representations = 4;
optional SampleStatistics sample_statistics = 5;
}
message SampleRequest {
optional int32 sample_id = 1;
optional string origin = 2;
}
message SampleRequestResponse {
optional int32 sample_id = 1;
optional string origin = 2;
optional int32 label = 3;
optional bytes data = 4;
optional string error_message = 5;
}
message WeigthsRequest{
NeuronId neuron_id = 1;
bool with_bias = 2;
bool with_learning_rate = 3;
bool with_incoming_learning_rates = 4;
bool include_gradients = 5;
}
message WeightsResponse{
NeuronId neuron_id = 1;
optional string layer_name = 2;
optional string layer_type = 3;
int32 incoming = 4;
int32 outgoing = 5;
optional int32 kernel_size = 6;
repeated float weights = 7;
optional float bias = 8;
optional float learning_rate = 9;
map<int32, float> incoming_learning_rates = 10;
bool success = 11;
optional string error_message = 12;
}