OpenNMT-kpg-release icon indicating copy to clipboard operation
OpenNMT-kpg-release copied to clipboard

Pump torchtext from 0.8 to 0.12

Open ahadda5 opened this issue 2 years ago • 1 comments

Dear authors.

omnt.inputters is using legacy 0.8 torchtext.data.Field , not available anymore in 0.12, which causes errors.

  1. Do you advice I downgrade to 0.8. reqruiement.txt has no specification but looking at the code its required to go to legacy.
  2. Making changes seem to be complicated, but can attempt and push for a PR, if i get the support, considering the many models/datasets uses.

Thoughts?!

ahadda5 avatar Jun 11 '22 15:06 ahadda5

I think it will solve a lot if there exits a comprehensive requirements.txt please. For now i downgraded, python=3.8, torchtext =0.8 , torch=1.7 etc.

>pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio==0.7.2 torchtext==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

ahadda5 avatar Jun 12 '22 15:06 ahadda5

Sorry about that and thank you very much for sharing @ahadda5! The packages I was using are shown below (I used cuda 10.0.130):

torch==1.8.0.dev20201210 torchaudio==0.8.0a0+7c19128 torchtext==0.8.1 torchvision==0.9.0.dev20201210 transformers==4.17.0 tokenizers==0.11.5 datasets==2.0.1.dev0 spacy==3.2.4

memray avatar Oct 27 '22 18:10 memray