[][src]Struct xaynet_server::settings::PetSettings

pub struct PetSettings {
    pub min_sum_count: u64,
    pub min_update_count: u64,
    pub min_sum2_count: u64,
    pub max_sum_count: u64,
    pub max_update_count: u64,
    pub max_sum2_count: u64,
    pub min_sum_time: u64,
    pub min_update_time: u64,
    pub min_sum2_time: u64,
    pub max_sum_time: u64,
    pub max_update_time: u64,
    pub max_sum2_time: u64,
    pub sum: f64,
    pub update: f64,
}

PET protocol settings.

Fields

min_sum_count: u64

The minimal number of participants selected for preparing the unmasking. The value must be greater or equal to 1 (i.e. min_sum_count >= 1) for the PET protocol to function correctly.

Examples

TOML

[pet]
min_sum_count = 10

Environment variable

XAYNET_PET__MIN_SUM_COUNT=10
min_update_count: u64

The expected number 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) for the PET protocol to function correctly.

Examples

TOML

[pet]
min_update_count = 100

Environment variable

XAYNET_PET__MIN_UPDATE_COUNT=100
min_sum2_count: u64

The minimal number of participants selected for submitting the aggregated masks. The value must be greater or equal to 1 (i.e. min_sum2_count >= 1) for the PET protocol to function correctly and less or equal to max_sum_count (i.e. min_sum2_count <= max_sum_count).

Examples

TOML

[pet]
min_sum2_count = 10

Environment variable

XAYNET_PET__MIN_SUM2_COUNT=10
max_sum_count: u64

The maximal number of participants selected for preparing the unmasking. No more messages will be processed in the sum phase if the min_sum_time has not yet elapsed. The value must be greater or equal to min_sum_count (i.e. min_sum_count <= max_sum_count).

Examples

TOML

[pet]
max_sum_count = 100

Environment variable

XAYNET_PET__MAX_SUM_COUNT=100
max_update_count: u64

The maximal number of participants selected for submitting an updated local model for aggregation. No more message will be processed in the update phase if the min_update_time has not yet elapsed. The value must be greater or equal to min_update_count (i.e. min_update_count <= max_update_count).

Examples

TOML

[pet]
max_update_count = 10000

Environment variable

XAYNET_PET__MAX_UPDATE_COUNT=10000
max_sum2_count: u64

The maximal number of participants selected for submitting the aggregated masks. No more messages will be processed in the sum2 phase if the min_sum2_time has not yet elapsed. The value must be greater or equal to min_sum2_count (i.e. min_sum2_count <= max_sum2_count) and less or equal to max_sum_count (i.e. max_sum2_count <= max_sum_count).

Examples

TOML

[pet]
max_sum2_count = 100

Environment variable

XAYNET_PET__MAX_SUM2_COUNT=100
min_sum_time: u64

The minimum amount of time reserved for processing messages in the sum phase, in seconds. Once this time has passed, the sum phase ends 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 phase.

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. Once this time has passed, the 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
min_sum2_time: u64

The minimum amount of time reserved for processing messages in the sum2 phase, in seconds. Once this time has passed, the sum2 phase ends as soon as min_sum2_count messages have been processed. Set this higher to allow for the possibility of more than min_sum2_count messages to be processed in the sum2 phase.

Examples

TOML

[pet]
min_sum2_time = 5

Environment variable

XAYNET_PET__MIN_SUM2_TIME=5
max_sum_time: u64

The maximum amount of time permitted for processing messages in the sum phase, in seconds. Set this lower to allow for the processing of min_sum_count messages to time-out sooner in the sum phase.

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. 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
max_sum2_time: u64

The maximum amount of time permitted for processing messages in the sum2 phase, in seconds. Set this lower to allow for the processing of min_sum2_count messages to time-out sooner in the sum2 phase.

Examples

TOML

[pet]
max_sum2_time = 30

Environment variable

XAYNET_PET__MAX_SUM2_TIME=30
sum: f64

The expected fraction of participants selected for preparing and computing the aggregated masks. 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). Here, 1 is included to be able to express that every participant who is not a sum participant must be an update participant.

Additionally, it is enforced that 0 < sum + update - sum*update <= 1 to avoid pathological cases of deadlocks.

Examples

TOML

[pet]
update = 0.1

Environment variable

XAYNET_PET__UPDATE=0.1

Trait Implementations

impl Clone for PetSettings[src]

impl Copy for PetSettings[src]

impl Debug for PetSettings[src]

impl<'de> Deserialize<'de> for PetSettings[src]

impl Validate for PetSettings[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]