Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MisconfigurationException: Trainer(strategy='ddp') is not compatible with an interactive environment. #413

Closed
RasmusOrsoe opened this issue Feb 1, 2023 · 0 comments · Fixed by #414
Assignees
Labels
bug Something isn't working

Comments

@RasmusOrsoe
Copy link
Collaborator

Describe the bug
Default distribution strategy of Trainer in Model is ddp which is incompatible with notebook environments. We can set the distribution strategy using configs for Model.fit(), but not for Model.Predict(). Therefore, fresh models that have state dicts loaded into them won't run in notebooks as they default to ddp.

To Reproduce
Steps to reproduce the behavior:
Follow steps in #403 but in notebook.

Expected behavior
We should have control over this argument for Model.predict too.

Full traceback
Please include the full error message to allow for debugging

MisconfigurationException: `Trainer(strategy='ddp')` is not compatible with an interactive environment. Run your code as a script, or choose one of the compatible strategies: `Fabric(strategy=None|'dp'|'ddp_notebook')`. In case you are spawning processes yourself, make sure to include the Trainer creation inside the worker function.
@RasmusOrsoe RasmusOrsoe added the bug Something isn't working label Feb 1, 2023
@RasmusOrsoe RasmusOrsoe self-assigned this Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant