Skip to content

Commit

Permalink
Fixes #2479 (#3856)
Browse files Browse the repository at this point in the history
  • Loading branch information
williamFalcon authored Oct 5, 2020
1 parent e0f8505 commit c6df63a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pytorch_lightning/trainer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,15 @@ def on_train_end(self, trainer, pl_module):
cluster_environment
^^^^^^^^^^^^^^^^^^^
Environment to connect arbitrary cluster backends. Lightning automatically handles:
- SLURM
- TorchElastic
For any other non-supported cluster environment, define your own class and pass it in.
.. code-block:: python
from pytorch_lightning.cluster_environments import ClusterEnvironment
from pytorch_lightning.cluster_environments import cluster_environment
class MyCluster(ClusterEnvironment):
Expand All @@ -378,6 +379,8 @@ def master_port(self):
def world_size(self):
return the_world_size
trainer = Trainer(cluster_environment=cluster_environment())
default_root_dir
^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit c6df63a

Please sign in to comment.