lightning/examples/app_multi_node
Justus Schock 0fee28409b
Introduce new precision layout in PL (#16783)
2023-02-17 17:58:14 +01:00
..
README.md Rename LightningLite to Fabric (#16244) 2023-01-04 10:57:18 -05: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_fabric.py Introduce new precision layout in PL (#16783) 2023-02-17 17:58:14 +01:00
train_lt.py Better check for programmatic lightningignore (#16080) 2022-12-16 09:49:17 +00:00
train_lt_script.py Better check for programmatic lightningignore (#16080) 2022-12-16 09:49:17 +00:00
train_pytorch.py Better check for programmatic lightningignore (#16080) 2022-12-16 09:49:17 +00:00
train_pytorch_spawn.py Better check for programmatic lightningignore (#16080) 2022-12-16 09:49:17 +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 + Fabric

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

lightning run app train_fabric.py

Using Fabric, 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