culebra.trainer.topology
module¶
Topologies for distributed trainer algorithms.
Functions¶
- ring_destinations(origin: int, num_subtrainers: int, offset: int = 1) List[int] ¶
Return the destinations reachable from origin.
- Parameters:
origin (
int
) – The index of the origin subpopulation trainernum_subtrainers (
int
) – The number of subpopulationsoffset (
int
, optional) – Offset applied to origin, defaults toDEFAULT_RING_OFFSET
- Returns:
The direct destinations from origin
- Return type:
list
of subpopulation trainer indexes
Attributes¶
- DEFAULT_RING_OFFSET = 1¶
Default offset for the ring topology.