Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
re-export torch.optim._multi_tensor in torch/__init__.py (#129095)
Summary: Pull Request resolved: #129095 - PR #127703 introduced a circular dependency `torch/optim/__init__.py` imports `torch.optim._multi_tensor` and `torch.optim._multi_tensor/_init__.py` imports `torch.optim` This seemed to work fine (green signals everywhere) but caused some internal test failures after it landed; an infinite recursion during import. - PR #128875 attempted to fix this by removing the import from `torch/optim/__init__.py`. This seemed to work fine: green signals everywhere and the failing tests started passing but a smaller number of tests started failing; unable to import `torch.optim._multi_tensor` - This diff re-introduces the import but after `torch.optim` is fully initialized Test Plan: CI signals Differential Revision: D58792889
- Loading branch information