Skip to content

Commit d4aa104

Browse files
committed
Update comment on torchrun with virtual environments
1 parent a850d11 commit d4aa104

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/access/jupyterlab.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ A popular approach to run multi-GPU ML workloads is with `accelerate` and `torch
210210
```
211211

212212
!!! warning "torchrun with virtual environments"
213-
When using a virtual environment on top of a base image with Pytorch, replace `torchrun` with `python -m torch.distributed.run` to pick up the correct Python environment.
214-
213+
When using a virtual environment on top of a base image with Pytorch, always replace `torchrun` with `python -m torch.distributed.run` to pick up the correct Python environment. Otherwise, the system Python environment will be used and virtual environment packages not available. If not using virtual environments such as with a self-contained Pytorch container, `torchrun` is equivalent to `python -m torch.distributed.run`.
214+
215215
!!! note "Notebook structure"
216216
In none of these scenarios any significant memory allocations or background computations are performed on the main Jupyter process. Instead, the resources are kept available for the processes launched by `accelerate` or `torchrun`, respectively.
217217

0 commit comments

Comments
 (0)