Closed Turux closed 3 years ago
Thanks for bringing this up, @Turux. I confirmed that the current version does not work with torch v1.7. This seems to be a PyTorch issue as the following line will trigger the error without m3inference
:
from torch.utils.data import *
I tried the nightly version of PyTorch (v1.8 preview) following https://pytorch.org/ and that works. If you need torch v.1.7+ features, you may try to use the nightly version. I will make a PR soon to update the wildcard import in the codebase, which should fix the issue.
I created a PR that should fix the issue. Could you take a look to see whether that works on your end?
Thank you very much for the prompt response!
I just tried your PR in a container and it works!
Hi there,
On a new installation
pip
will attempt to pull the latest version of all the dependency. Since Torch released the latest version of their package (1.7.0) M3 inference seems to misbehave. I get the following error when attempting to import the preprocessing package.AttributeError: module 'torch.utils.data' has no attribute "'BatchSamplerDistributedSamplerDataset'"
The whole issue is resolved by downgrading Torch to version 1.6.0.
I hope this helps! Keep up with the amazing work!
PS: For context I tried this on two OS with two different Python version and got the same result. Test 1: Linux 5.4.0-1031-azure; Python 3.6.7-1 Test 2: Linux 5.4.39-linuxkit; Python 3.8.2-0 Both are running on x86_64 architecture