You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is expected to run auto mode of PL Trainer in ipython notebook on a machine that has two GPUs?
To Reproduce
Run a Trainer with
accelerator="auto"devices="auto"
In a Jupyter notebook cell.
MisconfigurationException: `Trainer(strategy='ddp_spawn')` or `Trainer(accelerator='ddp_spawn')` is not compatible with an interactive environment. Run your code as a script, or choose one of the compatible strategies: Trainer(strategy=None|dp|tpu_spawn). In case you are spawning processes yourself, make sure to include the Trainer creation inside the worker function.
Expected behavior
just take the best supported and run, no crashing
Environment
PyTorch Lightning Version (e.g., 1.5.0):
PyTorch Version (e.g., 1.10):
Python version (e.g., 3.9):
OS (e.g., Linux):
CUDA/cuDNN version:
GPU models and configuration:
How you installed PyTorch (conda, pip, source):
If compiling from source, the output of torch.__config__.show():
For accelerator="auto", devices="auto" we didn't consider that in Jupyter notebooks, we need a different default for the strategy. So in this sense, strategy should also be selected automatically. For multi-gpu in notebooks, only strategy="dp" works here. So if we want to support that, we would need to add a condition to the AcceleratorConnector.
Hi @awaelchli , i used DDPSpawnStrategy(find_unused_parameters=False) with accelerator="gpu" and some weeks ago it worked in a jupyter notebook using multiple GPUs. Did something changed that is not working any more?
This is fixed now with #13405. accelerator="auto", devices="auto" will select the right strategy in the jupyter notebook. @nicocheh For setting find_unused_parameters_false, we added the option strategy="ddp_notebook_find_unused_parameters_false".
🐛 Bug
Is expected to run auto mode of PL Trainer in ipython notebook on a machine that has two GPUs?
To Reproduce
Run a Trainer with
In a Jupyter notebook cell.
Expected behavior
just take the best supported and run, no crashing
Environment
conda
,pip
, source):torch.__config__.show()
:Additional context
cc @justusschock @kaushikb11 @awaelchli @ninginthecloud @akihironitta @rohitgr7
The text was updated successfully, but these errors were encountered: