xref: /aosp_15_r20/frameworks/proto_logging/stats/enums/federatedcompute/enums.proto (revision 64c55175f22a2714b5ba1250098ad9bbc12ec7cd)
1/*
2 * Copyright (C) 2023 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18package android.federatedcompute;
19
20option java_outer_classname = "FederatedComputeProtoEnums";
21option java_multiple_files = true;
22
23// Enum used to track federated computation job stages.
24// Next Tag: 79
25enum TrainingEventKind {
26  // Undefined value.
27  TRAIN_UNDEFINED = 0;
28
29  // Indicates that training was scheduled but did not start due to runtime
30  // checks (e.g. insufficient battery levels).
31  TRAIN_NOT_STARTED = 1;
32
33  // Client started downloading train phase info from the server
34  TRAIN_DOWNLOAD_STARTED = 2;
35
36  // Client is about to issue an eligibility eval checkin request to the
37  // server.
38  TRAIN_ELIGIBILITY_EVAL_DOWNLOAD_STARTED = 3;
39
40  // Client received eligibility eval plan & checkpoint URIs from the server,
41  // but hasn't downloaded them yet. Also logged when the plan/checkpoint
42  // resources were actually supplied inline in the protocol response message
43  // and no actual HTTP fetch needs to happen anymore. This ensures that this
44  // event can always be compared against
45  // TRAIN_ELIGIBILITY_EVAL_PLAN_RECEIVED.
46  // Always preceded by TRAIN_ELIGIBILITY_EVAL_DOWNLOAD_STARTED.
47  TRAIN_ELIGIBILITY_EVAL_PLAN_URI_RECEIVED = 4;
48
49  // Client received an eligibility eval plan from the server.
50  // Always preceded by TRAIN_ELIGIBILITY_EVAL_PLAN_URI_RECEIVED.
51  TRAIN_ELIGIBILITY_EVAL_PLAN_RECEIVED = 5;
52
53  // Client was told by the server that there is no eligibility eval plan for
54  // the given population.
55  // Always preceded by TRAIN_ELIGIBILITY_EVAL_DOWNLOAD_STARTED.
56  TRAIN_ELIGIBILITY_EVAL_NOT_CONFIGURED = 6;
57
58  // Client was rejected from an eligibility eval checkin request.
59  // Always preceded by TRAIN_ELIGIBILITY_EVAL_DOWNLOAD_STARTED.
60  TRAIN_ELIGIBILITY_EVAL_TURNED_AWAY = 7;
61
62  // Client issued an eligibility eval checkin request, but an IO error was
63  // encountered.
64  // Always preceded by TRAIN_ELIGIBILITY_EVAL_DOWNLOAD_STARTED.
65  TRAIN_ELIGIBILITY_EVAL_DOWNLOAD_ERROR_IO = 8;
66
67  // Client issued an eligibility eval checkin request, but an invalid payload
68  // was received.
69  // Always preceded by TRAIN_ELIGIBILITY_EVAL_DOWNLOAD_STARTED.
70  TRAIN_ELIGIBILITY_EVAL_DOWNLOAD_ERROR_INVALID_PAYLOAD = 9;
71
72  // Client issued an eligibility eval checkin request, but got interrupted on
73  // the client. Always preceded by TRAIN_ELIGIBILITY_EVAL_DOWNLOAD_STARTED.
74  TRAIN_ELIGIBILITY_EVAL_DOWNLOAD_CLIENT_INTERRUPTED = 10;
75
76  // Client issued an eligibility eval checkin request, but server aborted.
77  // Always preceded by TRAIN_ELIGIBILITY_EVAL_DOWNLOAD_STARTED.
78  TRAIN_ELIGIBILITY_EVAL_DOWNLOAD_SERVER_ABORTED = 11;
79
80  // Client issued a regular checkin request, but got an IO error.
81  // Always preceded by TRAIN_DOWNLOAD_STARTED.
82  TRAIN_DOWNLOAD_ERROR_IO = 12;
83
84  // Client issued a regular checkin request, but the server returned an
85  // invalid payload.
86  // Always preceded by TRAIN_DOWNLOAD_STARTED.
87  TRAIN_DOWNLOAD_ERROR_INVALID_PAYLOAD = 13;
88
89  // Client issued a regular checin request, but got interrupted on the
90  // client. Always preceded by TRAIN_DOWNLOAD_STARTED.
91  TRAIN_DOWNLOAD_CLIENT_INTERRUPTED = 14;
92
93  // Client issued a regular checin request, but got aborted by the server.
94  // Always preceded by TRAIN_DOWNLOAD_STARTED.
95  TRAIN_DOWNLOAD_SERVER_ABORTED = 15;
96
97  // Client received plan and checkpoint URIs from the server, but hasn't
98  // actually downloaded them yet. Also logged when the plan/checkpoint
99  // resources were actually supplied inline in the protocol response message
100  // and no actual HTTP fetch needs to happen anymore. This ensures that this
101  // event can always be compared against TRAIN_DOWNLOAD_PLAN_RECEIVED.
102  // Always preceded by TRAIN_DOWNLOAD_STARTED.
103  TRAIN_DOWNLOAD_PLAN_URI_RECEIVED = 16;
104
105  // Client received a plan from the server.
106  // Always preceded by TRAIN_DOWNLOADED_PLAN_URI_RECEIVED.
107  TRAIN_DOWNLOAD_PLAN_RECEIVED = 17;
108
109  // Client was rejected from a checkin request.
110  // Always preceded by TRAIN_DOWNLOAD_STARTED.
111  TRAIN_DOWNLOAD_TURNED_AWAY = 18;
112  TRAIN_DOWNLOAD_TURNED_AWAY_NO_TASK_AVAILABLE = 70;
113  TRAIN_DOWNLOAD_TURNED_AWAY_UNAUTHORIZED = 71;
114  TRAIN_DOWNLOAD_TURNED_AWAY_UNAUTHENTICATED = 72;
115
116  // Client started eligibility eval computation.
117  TRAIN_ELIGIBILITY_EVAL_COMPUTATION_STARTED = 19;
118
119  // Client encountered a TensorFlow error during eligibility eval task
120  // computation.
121  // Always preceded by TRAIN_ELIGIBILITY_EVAL_COMPUTATION_STARTED.
122  TRAIN_ELIGIBILITY_EVAL_COMPUTATION_ERROR_TENSORFLOW = 20;
123
124  // Reading from disk failed during eligibility eval task computation.
125  // Always preceded by TRAIN_ELIGIBILITY_EVAL_COMPUTATION_STARTED.
126  TRAIN_ELIGIBILITY_EVAL_COMPUTATION_ERROR_IO = 21;
127
128  // Input parameters are invalid for eligibility eval task computation.
129  // Always preceded by TRAIN_ELIGIBILITY_EVAL_COMPUTATION_STARTED.
130  TRAIN_ELIGIBILITY_EVAL_COMPUTATION_ERROR_INVALID_ARGUMENT = 22;
131
132  // Client encountered an example selector error during eligibility eval task
133  // computation.
134  // Always preceded by TRAIN_ELIGIBILITY_EVAL_COMPUTATION_STARTED.
135  TRAIN_ELIGIBILITY_EVAL_COMPUTATION_ERROR_EXAMPLE_ITERATOR = 23;
136
137  // Eligibility eval computation was interrupted by the client.
138  TRAIN_ELIGIBILITY_EVAL_COMPUTATION_CLIENT_INTERRUPTED = 24;
139
140  // Client finished eligibility eval computation.
141  // Always preceded by TRAIN_ELIGIBILITY_EVAL_COMPUTATION_STARTED.
142  TRAIN_ELIGIBILITY_EVAL_COMPUTATION_COMPLETED = 25;
143
144  // Client finished eligibility eval computation and result is eligible.
145  // Always preceded by TRAIN_ELIGIBILITY_EVAL_COMPUTATION_STARTED.
146  TRAIN_ELIGIBILITY_EVAL_COMPUTATION_ELIGIBLE = 51;
147
148  // The status of FCP binds to client implemented ExampleStoreService.
149  TRAIN_EXAMPLE_STORE_BIND_START = 62;
150  TRAIN_EXAMPLE_STORE_BIND_SUCCESS = 63;
151  TRAIN_EXAMPLE_STORE_BIND_ERROR = 64;
152
153  // The status of ExampleStoreService.startQuery API.
154  TRAIN_EXAMPLE_STORE_START_QUERY_START = 65;
155  TRAIN_EXAMPLE_STORE_START_QUERY_TIMEOUT = 66;
156  // Indicates all failure cases except timeout when call ExampleStoreService.startQuery API.
157  TRAIN_EXAMPLE_STORE_START_QUERY_ERROR = 67;
158  TRAIN_EXAMPLE_STORE_START_QUERY_SUCCESS = 68;
159  // General error for uncaught failure cases for example store stage.
160  TRAIN_EXAMPLE_STORE_ERROR = 69;
161
162  // Client started computation.
163  TRAIN_COMPUTATION_STARTED = 26;
164
165  // A TensorFlow error was encountered during computation, or the output from
166  // the computation was missing or of an unexpected type. Always preceded by
167  // TRAIN_COMPUTATION_STARTED.
168  TRAIN_COMPUTATION_ERROR_TENSORFLOW = 27;
169
170  // Reading from disk failed during computation.
171  // Always preceded by TRAIN_COMPUTATION_STARTED.
172  TRAIN_COMPUTATION_ERROR_IO = 28;
173
174  // Input parameters are invalid for the given computation.
175  // Always preceded by TRAIN_COMPUTATION_STARTED.
176  TRAIN_COMPUTATION_ERROR_INVALID_ARGUMENT = 29;
177
178  // An error occurred when processing the example selector.
179  // Always preceded by TRAIN_COMPUTATION_STARTED.
180  TRAIN_COMPUTATION_ERROR_EXAMPLE_ITERATOR = 30;
181
182  // Client got interrupted during computation.
183  // Always preceded by TRAIN_COMPUTATION_STARTED.
184  TRAIN_COMPUTATION_CLIENT_INTERRUPTED = 31;
185
186  // Client finished computation.
187  // Always preceded by TRAIN_COMPUTATION_STARTED.
188  TRAIN_COMPUTATION_COMPLETED = 32;
189
190  // Client report result to server successfully
191  TRAIN_RESULT_REPORT_SUCCESS = 50;
192
193  // Client starts to upload successfully computed results.
194  TRAIN_RESULT_UPLOAD_STARTED = 33;
195
196  // An error occurred during upload.
197  // Always preceded by TRAIN_RESULT_UPLOAD_STARTED.
198  TRAIN_RESULT_UPLOAD_ERROR_IO = 34;
199
200  // Upload was interrupted by the client.
201  // Always preceded by TRAIN_RESULT_UPLOAD_STARTED.
202  TRAIN_RESULT_UPLOAD_CLIENT_INTERRUPTED = 35;
203
204  // Upload was aborted by the server.
205  // Always preceded by TRAIN_RESULT_UPLOAD_STARTED.
206  TRAIN_RESULT_UPLOAD_SERVER_ABORTED = 36;
207
208  // Client uploaded training results to the server
209  // Always preceded by TRAIN_RESULT_UPLOAD_STARTED.
210  TRAIN_RESULT_UPLOADED = 37;
211
212  // Client starts to upload failure report.
213  TRAIN_FAILURE_UPLOAD_STARTED = 38;
214
215  // An error occurred during upload.
216  // Always preceded by TRAIN_FAILURE_UPLOAD_STARTED.
217  TRAIN_FAILURE_UPLOAD_ERROR_IO = 39;
218
219  // Upload was interrupted.
220  // Always preceded by TRAIN_FAILURE_UPLOAD_STARTED.
221  TRAIN_FAILURE_UPLOAD_CLIENT_INTERRUPTED = 40;
222
223  // Upload was interrupted.
224  // Always preceded by TRAIN_FAILURE_UPLOAD_STARTED.
225  TRAIN_FAILURE_UPLOAD_SERVER_ABORTED = 41;
226
227  // Client uploaded failure report to the server
228  // Always preceded by TRAIN_FAILURE_UPLOAD_STARTED.
229  TRAIN_FAILURE_UPLOADED = 42;
230
231  // Client failed to initialize a component, but execution was not halted.
232  TRAIN_INITIALIZATION_ERROR_NONFATAL = 43;
233
234  // Client failed to initialize a component, and execution was halted.
235  TRAIN_INITIALIZATION_ERROR_FATAL = 44;
236
237  // Client receives http status = 403 UNAUTHORIZED when creating task assignment.
238  TRAIN_TASK_ASSIGNMENT_UNAUTHORIZED= 45;
239
240  // Client is authorized to create task assignment.
241  TRAIN_TASK_ASSIGNMENT_AUTH_SUCCEEDED = 46;
242
243  // Client receives http status = 403 UNAUTHORIZED when reporting result.
244  TRAIN_REPORT_RESULT_UNAUTHORIZED= 47;
245
246  // Client is authorized to report result.
247  TRAIN_INITIATE_REPORT_RESULT_AUTH_SUCCEEDED = 48;
248
249  // Client successfully generates an attestation record.
250  TRAIN_KEY_ATTESTATION_SUCCEEDED = 49;
251
252  // Client successfully finishes one round of training.
253  TRAIN_RUN_COMPLETE = 52;
254
255  // Log the fact that a trainging job was started.
256  TRAIN_RUN_STARTED = 53;
257
258  // If any throwable was caught during worker executing training logic.
259  TRAIN_RUN_FAILED_WITH_EXCEPTION = 54;
260
261  // Train failed during checkin at task assignment step.
262  TRAIN_RUN_FAILED_WITH_REJECTION = 55;
263
264  // Eligibility check failed during checkin.
265  TRAIN_RUN_FAILED_NOT_ELIGIBLE = 56;
266
267  // Model and plan download failed during checkin.
268  TRAIN_RUN_FAILED_DOWNLOAD_FAILED = 57;
269
270  // Actual ML computation failed.
271  TRAIN_RUN_FAILED_COMPUTATION_FAILED = 58;
272
273  // Report success to server failed.
274  TRAIN_RUN_FAILED_REPORT_FAILED = 59;
275
276  // Failed to fetch encryption keys.
277  TRAIN_RUN_FAILED_ENCRYPTION_KEY_FETCH_FAILED = 60;
278
279  // Additional conditions chaeck failed.
280  TRAIN_RUN_FAILED_CONDITIONS_FAILED = 61;
281
282  // Failed to fetch encryption keys due to timeout.
283  TRAIN_ENCRYPTION_KEY_FETCH_TIMEOUT_ERROR = 73;
284
285  // Fetch encryption keys started.
286  TRAIN_ENCRYPTION_KEY_FETCH_START = 74;
287
288  // Failed to fetch encryption keys due to empty fetch URI.
289  TRAIN_ENCRYPTION_KEY_FETCH_FAILED_EMPTY_URI = 75;
290
291  // Failed to fetch encryption keys due to http request creation failure.
292  TRAIN_ENCRYPTION_KEY_FETCH_REQUEST_CREATION_FAILED = 76;
293
294  // Failed to fetch encryption keys due response parsing failure.
295  TRAIN_ENCRYPTION_KEY_FETCH_INVALID_PAYLOAD = 77;
296
297  // Fetch encryption keys finished successfully.
298  TRAIN_ENCRYPTION_KEY_FETCH_SUCCESS = 78;
299}
300
301// Enum used to track federated computation trace events.
302// Next Tag: 2
303enum TraceEventKind {
304  // Undefined value.
305  TRACE_EVENT_KIND_UNSPECIFIED = 0;
306
307  // Trace for key fetch background job.
308  BACKGROUND_ENCRYPTION_KEY_FETCH = 1;
309}