Skip to content

Choosing an invalid accelerator does not raise an error #12698

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

Closed
awaelchli opened this issue Apr 10, 2022 · 0 comments · Fixed by #13417
Closed

Choosing an invalid accelerator does not raise an error #12698

awaelchli opened this issue Apr 10, 2022 · 0 comments · Fixed by #13417
Labels
Milestone

Comments

@awaelchli
Copy link
Contributor

awaelchli commented Apr 10, 2022

🐛 Bug

To Reproduce

trainer = Trainer(accelerator="invalid",)
print(type(trainer.accelerator))

Expected behavior

Raises an error.

The error is already implemented in the AcceleratorConnector:
https://github.com/PyTorchLightning/pytorch-lightning/blob/3f0f277d5bbf6f9c1f07e8f03e1d6ae048608d7a/pytorch_lightning/trainer/connectors/accelerator_connector.py#L490-L494

However, the code is never triggered. It was introduced in #12180 but not tested.

Environment

PL 1.7

cc @justusschock @kaushikb11 @awaelchli @ninginthecloud @akihironitta @rohitgr7

@awaelchli awaelchli added needs triage Waiting to be triaged by maintainers trainer: connector accelerator bug Something isn't working and removed needs triage Waiting to be triaged by maintainers labels Apr 10, 2022
@awaelchli awaelchli added this to the 1.6.x milestone Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant