ROCm / pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration
http://pytorch.org
Other
219 stars 51 forks source link

[release/1.10.1] Remove references to `pkg_resources.packaging` #1425

Closed jithunnair-amd closed 4 months ago

jithunnair-amd commented 4 months ago

Tested successfully via: http://rocm-ci.amd.com/job/rocm-pytorch-manylinux-wheel-builder/308/

Tested that TorchVersion doesn't give an import error for packaging

root@33e1cabcaf4e:/# pip list | grep setuptools
setuptools          70.0.0
root@33e1cabcaf4e:/# python -c 'import torch.torch_version; print(torch.torch_version.TorchVersion("1.0.0"))'
/usr/local/lib/python3.9/dist-packages/torch/package/_directory_reader.py:17: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at  /pytorch/torch/csrc/utils/tensor_numpy.cpp:68.)
  _dtype_to_storage = {data_type(0).dtype: data_type for data_type in _storages}
1.0.0
root@33e1cabcaf4e:/# python -c 'import torch.torch_version; print(torch.torch_version.TorchVersion(torch._vendor.packaging.version.Version("1.0.0")))'
/usr/local/lib/python3.9/dist-packages/torch/package/_directory_reader.py:17: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at  /pytorch/torch/csrc/utils/tensor_numpy.cpp:68.)
  _dtype_to_storage = {data_type(0).dtype: data_type for data_type in _storages}
1.0.0