aboutsummaryrefslogtreecommitdiff
path: root/fcp/client/fl_runner.proto
blob: 55d22f531987fc87ce1fa91b20845d6ee8cbbaff (plain)
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
/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
syntax = "proto3";

package fcp.client;

import "google/protobuf/duration.proto";
import "fcp/client/engine/engine.proto";
import "tensorflow/core/framework/tensor.proto";

option java_package = "com.google.intelligence.fcp.client";
option java_multiple_files = true;

/**
 * This protocol buffer is used to report results and statistics of a Federated
 * Computation - including checking in with the server, running a plan, and
 * reporting back results - to the caller. It is a protocol buffer to support
 * sending it across language boundaries.
 */
message FLRunnerResult {
  reserved 1;
  // A RetryInfo returned to the caller for consideration in scheduling future
  // runs of this task.
  RetryInfo retry_info = 4;
  // An enum that summarizes whether the client has contributed to an FL/FA
  // round.
  enum ContributionResult {
    UNSPECIFIED = 0;
    SUCCESS = 1;
    // Any outcome that is not a success.
    FAIL = 2;
  }

  ContributionResult contribution_result = 5;

  // Debug message will be present if ContributionResult is FAIL.
  string error_message = 6;

  reserved 2, 3;
}

// A suggestion to the client when to retry the connection to the service next
// time
message RetryInfo {
  // Optional. If set, should be provided back to the next
  // RunFederatedComputation invocation.
  string retry_token = 1;

  // The suggested delay duration after which the client should
  // retry. Clients should ideally not retry any earlier than this.
  google.protobuf.Duration minimum_delay = 2;
}

/**
 * This protocol buffer is used to pass TensorflowSpec-based plan outputs across
 * the JNI boundary so they can be accessed in compatibility tests.
 */
message FLRunnerTensorflowSpecResult {
  // The outcome of running the plan.
  engine.PhaseOutcome outcome = 1;
  // The location of the output checkpoint file, if one was created.
  string checkpoint_output_filename = 2;
  // A map of output tensor names and values, if any.
  map<string, tensorflow.TensorProto> output_tensors = 3;
}