I am trying to execute one of the translation examples in the files, the IWSLT'14 German to English (Transformer) specifically. Running the codes using the command lines below:
python preprocess.py --source-lang de --target-lang en --trainpref examples/translation/iwslt14.tokenized.de-en/train --validpref examples/translation/iwslt14.tokenized.de-en/valid --testpref examples/translation/iwslt14.tokenized.de-en/test --destdir data-bin/iwslt14.tokenized.de-en
returns the following error:
File "preprocess.py", line 293
print("{} {}".format(src_dict[k], tgt_dict[v]), file=f)
^
SyntaxError: invalid syntax
What am I doing wrongly?
What version of Python are you using? Fairseq requires Python >= 3.6.
Oh! that's true I already fixed that. Thanks.
But I now have a new error
AttributeError: module 'torch.utils.data' has no attribute 'IterableDataset'
We also require PyTorch 1.3: https://pytorch.org/docs/master/data.html#torch.utils.data.IterableDataset
Most helpful comment
Oh! that's true I already fixed that. Thanks.
But I now have a new error
AttributeError: module 'torch.utils.data' has no attribute 'IterableDataset'