p2pfl.stages.stage moduleΒΆ
Stage.
- exception p2pfl.stages.stage.EarlyStopException[source]ΒΆ
Bases:
Exception
Custom exception for early stopping.
- p2pfl.stages.stage.check_early_stop(state, raise_exception=True)[source]ΒΆ
Check if early stopping is required.
- Parameters:
state (NodeState) β Node state
raise_exception (bool) β Whether to raise an exception for early stopping.
- Returns:
True if early stopping is required, False otherwise.
- Return type:
bool
- Raises:
EarlyStopException β Early stopping