LSFEnvironment¶
- class pytorch_lightning.plugins.environments.LSFEnvironment[source]¶
Bases:
pytorch_lightning.plugins.environments.cluster_environment.ClusterEnvironment
An environment for running on clusters managed by the LSF resource manager.
It is expected that any execution using this ClusterEnvironment was executed using the Job Step Manager i.e.
jsrun
.This plugin expects the following environment variables.
- LSB_JOBID:
The LSF assigned job ID
- LSB_HOSTS:
The hosts used in the job. This string is expected to have the format “batch <rank_0_host> ….”
- JSM_NAMESPACE_LOCAL_RANK:
The node local rank for the task. This environment variable is set by jsrun
- JSM_NAMESPACE_SIZE:
The world size for the task. This environment variable is set by jsrun
- static is_using_lsf()[source]¶
Returns
True
if the current process was launched using the jsrun command.- Return type
- local_rank()[source]¶
The local rank is read from the environment variable JSM_NAMESPACE_LOCAL_RANK.
- master_address()[source]¶
The master address is read from a list of hosts contained in the environment variable LSB_HOSTS.