Testing new data using fairseq-generate with trained models
See original GitHub issueWhat is the exact command to translate a new test data using the fairseq trained models ?
I have kept a test data set for translation inside /home/ola/NMT/corpus/test-en-hi folder. The command I have given is,
fairseq-generate /home/ola/NMT/corpus/test-en-hi --path checkpoints/fconv/checkpoint_best.pt --batch-size 128 --beam 5 --skip-invalid-size-inputs-valid-test --source-lang en --target-lang hi >trans-en-hi.out
But, it is showing an error
FileNotFoundError: [Errno 2] No such file or directory: ‘/home/ola/NMT/corpus/test-en-hi/dict.en.txt’
It is asking for a dict.en.txt file… Why it is so ? Actually, after preprocessing (before training) there is a data-bin/IITB.en-hi folder created with all binarized fies in that dict.en.txt also present.
Now what is the requirement for a dict.en.txt to translate a new dataset…?
Could you please help me to get the exact command to translate a test data using fairseq trained models.
What have you tried?
fairseq-generate /home/ola/NMT/corpus/test-en-hi --path checkpoints/fconv/checkpoint_best.pt --batch-size 128 --beam 5 --skip-invalid-size-inputs-valid-test --source-lang en --target-lang hi >trans-en-hi.out
What’s your environment?
- fairseq Version :0.10.1
- PyTorch Version : 1.7.1.post2
- OS : Ubuntu 18.04
- How you installed fairseq (
pip
, source):conda install -c conda-forge pytorch cudatoolkit=10.1 nvidia-apex fairseq==0.10.1 - Build command you used (if compiling from source):
- Python version: Python 3.6.12 :: Anaconda, Inc.
- CUDA/cuDNN version:10.1
- GPU models and configuration: NVIDIA-SMI 418.40.04 Driver Version: 418.40.04 CUDA Version: 10.1 Tesla K80
- Any other relevant information:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top GitHub Comments
bump
This issue is still there.
On Sun, 20 Jun 2021 at 18:57, stale[bot] @.***> wrote:
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!