Topologies for distributed trainer algorithms.
Functions
-
full_connected_destinations(origin: int, num_subtrainers: int) → list[int]
Return the destinations reachable from origin.
- Parameters:
-
- Returns:
The direct destinations from origin
- Return type:
list[int]
-
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 trainer
num_subtrainers (int) – The number of subpopulations
offset (int) – Offset applied to origin, defaults to
DEFAULT_RING_OFFSET
- Returns:
The direct destinations from origin
- Return type:
list[int]
Attributes
-
DEFAULT_RING_OFFSET = 1
Default offset for the ring topology.