The following two files showcase how to get started with @torchrun
with @kubernetes
on Metaflow.
-
hi-torchrun.py
contains a basic code snippet for each process to print their rank and world size. -
flow.py
uses the above script viacurrent.torch.run(entrypoint="hi-torchrun.py")
.
- The flow can be run using
python flow.py run
.