xref: /aosp_15_r20/external/federated-compute/fcp/client/engine/engine.proto (revision 14675a029014e728ec732f129a32e299b2da0601)
1// Copyright 2021 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package fcp.client.engine;
18
19option java_package = "com.google.intelligence.fcp.client.engine";
20option java_multiple_files = true;
21option java_outer_classname = "TrainingProto";
22
23// A constraint on the task when to run again.
24message TaskRetry {
25  // An opaque context stored between task activations.
26  string retry_token = 1;
27
28  // The suggested minimal duration after which the client should retry again,
29  // in milliseconds.
30  int64 delay_min = 2;
31
32  // The suggested maximal duration before which the client should retry again
33  // (if conditions allow), in milliseconds.
34  int64 delay_max = 3;
35}
36
37enum PhaseOutcome {
38  PHASE_OUTCOME_UNDEFINED = 0;
39  COMPLETED = 1;
40  INTERRUPTED = 2;
41  ERROR = 3;
42}
43
44enum DataSourceType {
45  // Default value for this enum.
46  TRAINING_DATA_SOURCE_UNDEFINED = 0;
47
48  // Feed based execution, examples were batched outside of TensorFlow and fed
49  // into the training session.
50  FEED = 1;
51
52  // Dataset based execution, TensorFlow was given an ExternalDatasetProvider
53  // and used it internally to create iterators and pull examples.
54  DATASET = 2;
55}
56