bug with OneCycleLR on Apple Silicone 
### Guidelines

**NOTE:** Issues are for bugs and feature requests only. If you have a question about using Pyro or general modeling questions, please post it on the [forum](https://forum.pyro.ai/).

If you would like to address any minor bugs in the documentation or source, please feel free to contribute a Pull Request without creating an issue first. 

Please tag the issue appropriately in the title e.g. [bug], [feature request], [discussion], etc.

Please provide the following details:
--------------------------------------------------------------------------------------------------
### Issue Description
Provide a brief description of the issue.

### Environment
For any bugs, please provide the following:
 - OS and python version.
 - PyTorch version, or if relevant, output of `pip freeze`.
 - Pyro version: output of `python -c 'import pyro; print pyro.__version__'`

### Code Snippet
Provide any relevant code snippets and commands run to replicate the issue.

diff --git a/pyro/optim/pytorch_optimizers.py b/pyro/optim/pytorch_optimizers.py
index 57dd4b02..05dfa4db 100644
--- a/pyro/optim/pytorch_optimizers.py
+++ b/pyro/optim/pytorch_optimizers.py
@@ -34,13 +34,16 @@ for _name, _Optim in torch.optim.__dict__.items():
     del _PyroOptim
 
 # Load all schedulers from PyTorch
+# breaking change in torch >= 1.14: LRScheduler is new base class
+if hasattr(torch.optim.lr_scheduler, "LRScheduler"):
+    _torch_scheduler_base = torch.optim.lr_scheduler.LRScheduler
+else:  # for torch < 1.13, _LRScheduler is base class
+    _torch_scheduler_base = torch.optim.lr_scheduler._LRScheduler
+
 for _name, _Optim in torch.optim.lr_scheduler.__dict__.items():
     if not isinstance(_Optim, type):
         continue
-    if (
-        not issubclass(_Optim, torch.optim.lr_scheduler._LRScheduler)
-        and _name != "ReduceLROnPlateau"
-    ):
+    if not issubclass(_Optim, _torch_scheduler_base) and _name != "ReduceLROnPlateau":
         continue
     if _Optim is torch.optim.Optimizer:
         continue
['pyro/optim/pytorch_optimizers.py']