Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: workaround upstream torch bug (#3321)
setuptools 59.6.0 exposed a bug in pytorch, where pytorch is improperly importing a particular submodule of distutils. In old setuptools, distutils.version was automatically imported, but in new setuptools, it is not. For details, see: pytorch/pytorch#69894 Since forcing users to upgrade pytorch is not feasible, we intervene by enforcing that distutils.version is imported before we try to import the problematic torch.utils.tensorboard submodule. This workaround will not help users who import torch.utils.tensorboard directly, but it will protect users who only import torch.utils.tensorboard because of us.
- Loading branch information