lightning/examples/app_multi_node
Ethan Harris bc797fd376
[App] Fix multi-node pytorch example CI (#15753)
2022-11-21 16:02:30 +00:00
..
README.md [App] Accelerate Multi Node Startup Time (#15650) 2022-11-11 20:08:16 +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] Update multi-node examples (#15700) 2022-11-21 10:41:59 +00:00
train_lt_script.py Docs 4/n (#15628) 2022-11-10 14:48:48 -05:00
train_pytorch.py [App] Fix multi-node pytorch example CI (#15753) 2022-11-21 16:02:30 +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 Lightning Trainer

Lightning supports running Lightning Trainer 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