lightning/examples/app_multi_node
thomas chaton 61c1f699ea
[App] Enable state broadcast with MultiNode (#15607)
2022-11-11 10:06:40 +00:00
..
README.md [App] Expose Run Work Executor (#15561) 2022-11-08 12:55:31 +00:00
pl_boring_script.py [App] Expose Run Work Executor (#15561) 2022-11-08 12:55:31 +00:00
requirements.txt [App] Fixed Multi Node and add examples (#15557) 2022-11-07 09:36:41 +00:00
train_any.py [App] Expose Run Work Executor (#15561) 2022-11-08 12:55:31 +00:00
train_lite.py [App] Enable state broadcast with MultiNode (#15607) 2022-11-11 10:06:40 +00:00
train_lt.py [App] Enable state broadcast with MultiNode (#15607) 2022-11-11 10:06:40 +00:00
train_lt_script.py Docs 4/n (#15628) 2022-11-10 14:48:48 -05:00
train_pytorch.py [App] Enable state broadcast with MultiNode (#15607) 2022-11-11 10:06:40 +00:00
train_pytorch_spawn.py [App] Enable state broadcast with MultiNode (#15607) 2022-11-11 10:06:40 +00:00

README.md

Lightning & Multi Node Training

Lightning supports makes multi-node training simple by providing a simple interface to orchestrate compute and data.

Multi Node with raw PyTorch

You can run the multi-node raw PyTorch by running the following commands.

Here is an example where you spawn your processes yourself.

lightning run app train_pytorch.py

or you can use the built-in component for it.

lightning run app train_pytorch_spawn.py

Multi Node with raw PyTorch + Lite

You can run the multi-node raw PyTorch and Lite by running the following commands.

lightning run app train_lite.py

Using Lite, you retain control over your loops while accessing in a minimal way all Lightning distributed strategies.

Multi Node with PyTorch Lightning

Lightning supports running PyTorch Lightning from a script or within a Lightning Work.

You can either run a script directly

lightning run app train_pl_script.py

or run your code within as a work.

lightning run app train_pl.py

Multi Node with any frameworks

lightning run app train_any.py