[−][src]Struct xaynet::settings::PetSettings
PET protocol settings.
Fields
min_sum_count: usize
The minimal number of participants selected for computing the unmasking sum. The value must
be greater or equal to 1
(i.e. min_sum_count >= 1
), otherwise the PET protocol will be
broken.
This parameter should only be used to enforce security constraints. To control the expected
number of sum participants, the sum
fraction should be adjusted wrt the total number of
expected_participants
.
Examples
TOML
[pet]
min_sum_count = 1
Environment variable
XAYNET_PET__MIN_SUM_COUNT=1
min_update_count: usize
The expected fraction of participants selected for submitting an updated local model for
aggregation. The value must be greater or equal to 3
(i.e. min_update_count >= 3
),
otherwise the PET protocol will be broken.
This parameter should only be used to enforce security constraints. To control the expected
number of update participants, the update
fraction should be adjusted wrt the total number
of expected_participants
.
Examples
TOML
[pet]
min_update_count = 3
Environment variable
XAYNET_PET__MIN_UPDATE_COUNT=3
min_sum_time: u64
The minimum amount of time reserved for processing messages in the sum
and sum2
phases, in seconds.
Defaults to 0 i.e. sum
and sum2
phases end as soon as
[min_sum_count
] messages have been processed. Set this higher to allow
for the possibility of more than [min_sum_count
] messages to be
processed in the sum
and sum2
phases.
Examples
TOML
[pet]
min_sum_time = 5
Environment variable
XAYNET_PET__MIN_SUM_TIME=5
min_update_time: u64
The minimum amount of time reserved for processing messages in the
update
phase, in seconds.
Defaults to 0 i.e. update
phase ends as soon as [min_update_count
]
messages have been processed. Set this higher to allow for the
possibility of more than [min_update_count
] messages to be processed
in the update
phase.
Examples
TOML
[pet]
min_update_time = 10
Environment variable
XAYNET_PET__MIN_UPDATE_TIME=10
max_sum_time: u64
The maximum amount of time permitted for processing messages in the sum
and sum2
phases, in seconds.
Defaults to a large number (effectively 1 week). Set this lower to allow
for the processing of [min_sum_count
] messages to time-out sooner in
the sum
and sum2
phases.
Examples
TOML
[pet]
max_sum_time = 30
Environment variable
XAYNET_PET__MAX_SUM_TIME=30
max_update_time: u64
The maximum amount of time permitted for processing messages in the
update
phase, in seconds.
Defaults to a large number (effectively 1 week). Set this lower to allow
for the processing of [min_update_count
] messages to time-out sooner
in the update
phase.
Examples
TOML
[pet]
max_update_time = 60
Environment variable
XAYNET_PET__MAX_UPDATE_TIME=60
sum: f64
The expected fraction of participants selected for computing the unmasking sum. The value
must be between 0
and 1
(i.e. 0 < sum < 1
).
Additionally, it is enforced that 0 < sum + update - sum*update < 1
to avoid pathological
cases of deadlocks.
Examples
TOML
[pet]
sum = 0.01
Environment variable
XAYNET_PET__SUM=0.01
update: f64
The expected fraction of participants selected for submitting an updated local model for
aggregation. The value must be between 0
and 1
(i.e. 0 < update < 1
).
Additionally, it is enforced that 0 < sum + update - sum*update < 1
to avoid pathological
cases of deadlocks.
Examples
TOML
[pet]
update = 0.01
Environment variable
XAYNET_PET__UPDATE=0.01
expected_participants: usize
The total number of participants that are expected by the coordinator. The value must be a
positive integer (i.e. expected_participants >= 1
).
Examples
TOML
[pet]
expected_participants = 10
Environment variable
XAYNET_PET__EXPECTED_PARTICIPANTS=10
Trait Implementations
impl Clone for PetSettings
[src]
fn clone(&self) -> PetSettings
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for PetSettings
[src]
impl Debug for PetSettings
[src]
impl Default for PetSettings
[src]
impl<'de> Deserialize<'de> for PetSettings
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Validate for PetSettings
[src]
fn validate(&self) -> Result<(), ValidationErrors>
[src]
Auto Trait Implementations
impl RefUnwindSafe for PetSettings
impl Send for PetSettings
impl Sync for PetSettings
impl Unpin for PetSettings
impl UnwindSafe for PetSettings
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,