🐛 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