Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TranslationDataset is now deprecated in torchtext #194

Open
imkzh opened this issue Mar 14, 2022 · 2 comments
Open

TranslationDataset is now deprecated in torchtext #194

imkzh opened this issue Mar 14, 2022 · 2 comments

Comments

@imkzh
Copy link

imkzh commented Mar 14, 2022

Since TranslationDataset is deprecated (see Issue 985), could you please kindly update the relevant code to work with newer version of torchtext?

> python preprocess.py -lang_src de -lang_trg en -share_vocab -save_data m30k_deen_shr.pkl

Traceback (most recent call last):
    File "preprocess.py", line 15, in <module>
    from torchtext.datasets import TranslationDataset
ImportError: cannot import name 'TranslationDataset' from 'torchtext.datasets' 

The current version number of torchtext is 0.12.0.

Also: what version of torchtext may current code in this repository work with?

@yijin-yf
Copy link

Up to now, the latest version of torchtext is 0.11.2, which discarded the TranslationDataset. If you want to use TranslationDataset, please install torchtext==0.3.1.

@R-N
Copy link

R-N commented Nov 1, 2023

You can use 0.6.0, but the hardcoded dataset link in 0.3.1 - 0.6.0 is dead.
I patched it up a bit here https://github.com/R-N/torchtext/tree/0.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants