- class pytorch_lightning.plugins.environments.LSFEnvironment¶
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.
This plugin expects the following environment variables.
The LSF assigned job ID
The hosts used in the job. This string is expected to have the format “batch <rank_0_host> ….”
The node local rank for the task. This environment variable is set by jsrun
The world size for the task. This environment variable is set by jsrun
The world size is read from the environment variable JSM_NAMESPACE_RANK.
- static is_using_lsf()¶
Trueif the current process was launched using the jsrun command.
- Return type
The local rank is read from the environment variable JSM_NAMESPACE_LOCAL_RANK.
The master address is read from a list of hosts contained in the environment variable LSB_HOSTS.
THe master port gets calculated from the LSF job ID.
The node rank is determined by the position of the current hostname in the list of hosts stored in the environment variable LSB_HOSTS.
The world size is read from the environment variable JSM_NAMESPACE_SIZE.