persia.env

Module Contents

persia.env.get_local_rank()

Get the local rank of current process.

Local rank is the rank of the process on the local machine.

Return type

int

persia.env.get_rank()

Get the rank of current process.

Return type

int

persia.env.get_replica_index()

Get the replica index of current service.

The replica index is a unique identifier assigned to each replica. They are assigned following the order of launching.

Return type

int

persia.env.get_replica_size()

Get the replica size of the current service.

Replica size is the number of services launched by docker service or k8s

Return type

int

persia.env.get_world_size()

Get the total number of processes.

Return type

int

persia.env.reload_env()

Reload the environment.

persia.env.set_env(**kwargs)

Set environment without any sanity check.

persia.env.PERSIA_LAUNCHER_VERBOSE
persia.env.PERSIA_SKIP_CHECK_DATA