pytorch / text

Models, data loaders and abstractions for language processing, powered by PyTorch
https://pytorch.org/text
BSD 3-Clause "New" or "Revised" License
3.5k stars 815 forks source link

Stupid automatic update of pytorch when pip install torchtext #2108

Open fake-warrior8 opened 1 year ago

fake-warrior8 commented 1 year ago

❓ Questions and Help

I installed torchtext using pip and it automatically downloaded torchtext==1.13.1, but it automatically updated my pytorch==1.12.1 to pytorch=1.13.1 without considering that my torchvision and torchaudio versions were not compatible with the updated pytorch version.

I suggest that the system give a Yes/No option when the appropriate version of pytorch needs to be installed to be compatible with the downloaded torchtext.

CerebralSeed commented 1 year ago

Having the same issue. Trying to upgrade torchtext from 0.10.0 to 0.14.0 and have pytorch 1.13.1. The pip installer insists in installing pytorch==1.13.0 for cpu.

Nayef211 commented 1 year ago

Having the same issue. Trying to upgrade torchtext from 0.10.0 to 0.14.0 and have pytorch 1.13.1. The pip installer insists in installing pytorch==1.13.0 for cpu.

Hey @CerebralSeed, I think the issue is that torchtext==0.14.0 technically has a dependency on pytorch==0.13.0 and forward/backward compatibility isn't guaranteed. As such pip will validate that you have the supported version of pytorch installed and if not it will install the "correct" version for you. If you try installing torchtext==0.14.1 then pip should automatically install pytorch==0.13.1. Let me know if this is not the behavior you are seeing.