#[non_exhaustive]pub enum TrainingStrategy {
Local,
DataParallel {
num_replicas: usize,
aggregation: GradientAggregation,
},
ModelParallel {
partitions: Vec<Partition>,
communication: CommunicationProtocol,
},
Federated {
num_clients: usize,
rounds: usize,
aggregation: FederatedAggregation,
client_selection: ClientSelection,
},
PopulationBased {
population_size: usize,
generations: usize,
exploit: ExploitStrategy,
explore: ExploreStrategy,
},
Custom {
coordinator: String,
config: Value,
},
}Expand description
Training strategy — graph-level attribute, inherited by subgraphs.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Local
All nodes execute locally (default).
DataParallel
Replicate the entire graph on N workers, each sees a data shard. Gradients are aggregated after each step.
ModelParallel
Arbitrary model partitioning: each Partition maps a set of node IDs to a worker target. Any topology is supported.
Federated
Federated learning: data stays on workers, only model updates are shared. The coordinator aggregates after each round.
PopulationBased
Population-Based Training: evolutionary hyperparameter optimization. Each generation trains a population, evaluates, then evolves.
Custom
User-defined strategy with a registered coordinator.
Trait Implementations§
Source§impl Clone for TrainingStrategy
impl Clone for TrainingStrategy
Source§fn clone(&self) -> TrainingStrategy
fn clone(&self) -> TrainingStrategy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TrainingStrategy
impl Debug for TrainingStrategy
Source§impl Default for TrainingStrategy
impl Default for TrainingStrategy
Source§fn default() -> TrainingStrategy
fn default() -> TrainingStrategy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TrainingStrategy
impl<'de> Deserialize<'de> for TrainingStrategy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for TrainingStrategy
impl Serialize for TrainingStrategy
Auto Trait Implementations§
impl Freeze for TrainingStrategy
impl RefUnwindSafe for TrainingStrategy
impl Send for TrainingStrategy
impl Sync for TrainingStrategy
impl Unpin for TrainingStrategy
impl UnsafeUnpin for TrainingStrategy
impl UnwindSafe for TrainingStrategy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more