xref: /aosp_15_r20/external/federated-compute/fcp/protos/ondevicepersonalization/eligibility_spec.proto (revision 14675a029014e728ec732f129a32e299b2da0601)
1/*
2 * Copyright (C) 2024 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 = "proto3";
18
19package google.ondevicepersonalization.federatedcompute.proto;
20
21option java_package = "com.google.ondevicepersonalization.federatedcompute.proto";
22option java_multiple_files = true;
23
24
25// Provides the information needed to determine eligibility for a task.
26// Next Id: 2
27message EligibilityTaskInfo {
28  // The eligibility policies that apply to this task.
29  repeated EligibilityPolicyEvalSpec eligibility_policies = 1;
30}
31
32// Specification describing the eligibility policy and its parameters.
33// Next Id: 4
34message EligibilityPolicyEvalSpec {
35  // The identifier of the policy. It should be unique within population.
36  string id = 1;
37
38  // The specification of the policy implementation, including the
39  // policy-specific parameters.
40  oneof policy_type {
41    MinimumSeparationPolicy min_sep_policy = 2;
42    DataAvailabilityPolicy data_availability_policy = 3;
43  }
44}
45
46// Minimum separation policy parameters.
47// Next Id: 3
48message MinimumSeparationPolicy {
49  // The current index (e.g., algorithmic round number) of the federated computation.
50  int64 current_index = 1;
51
52  // The minimum index separation required between successful contributions.
53  int64 minimum_separation = 2;
54}
55
56// Data availability policy parameters.
57message DataAvailabilityPolicy {
58  // The minimum number of examples from the selector to be considered
59  // eligible.
60  int32 min_example_count = 1;
61}
62