MPI4PyDist¶
- class mmeval.core.dist_backends.MPI4PyDist[source]¶
A distributed communication backend for mpi4py.
- all_gather_object(obj: Any) → List[Any][source]¶
All gather the given object from the current process group and returns a list consisting gathered object of each process.
- Parameters
obj (any) – Any pickle-able python object for all gather.
- Returns
A list of the all gathered object.
- Return type
list
- broadcast_object(obj: Any, src: int = 0) → Any[source]¶
Broadcast the given object from source process to the current process group.
- Parameters
obj (any) – Any pickle-able python object for broadcast.
src (int) – The source rank index.
- Returns
The broadcast object.
- Return type
any
- property is_initialized: bool¶
Returns True if the distributed environment has been initialized.
- Returns
Returns True if the distributed environment has been initialized, otherwise returns False.
- Return type
bool
- property rank: int¶
Returns the rank index of the current process group.
- property world_size: int¶
Returns the world size of the current process group.