facebookresearch / fairseq

Facebook AI Research Sequence-to-Sequence Toolkit written in Python.
MIT License
30.37k stars 6.4k forks source link

Segmentation fault #65

Closed youshimanon closed 6 years ago

youshimanon commented 6 years ago

I got a segmentation fault when I tried to translate using interactive.py.

$ MODEL_DIR=wmt14.en-fr.fconv-py $ python interactive.py --path $MODEL_DIR/model.pt $MODEL_DIR --beam 5 Namespace(beam=5, cpu=False, data='wmt14.en-fr.fconv-py', lenpen=1, log_format=None, log_interval=1000, max_len_a=0, max_len_b=200, max_source_positions=1024, max_target_positions=1024, nbest=1, no_beamable_mm=False, no_early_stop=False, no_progress_bar=False, path=['wmt14.en-fr.fconv-py/model.pt'], quiet=False, remove_bpe=None, replace_unk=None, seed=1, skip_invalid_size_inputs_valid_test=False, source_lang=None, target_lang=None, unkpen=0, unnormalized=False, workers=1) | loading model(s) from wmt14.en-fr.fconv-py/model.pt | [en] dictionary: 44206 types | [fr] dictionary: 44463 types | Type the input sentence and press return: Why is it rare to discover new marine mam@@ mal species ? Segmentation fault

myleott commented 6 years ago

Can you confirm that you're using the latest master branch? And does non-interactive generation work, i.e., generate.py?

youshimanon commented 6 years ago

Yes, it is the latest master branch. I got the same thing using generate.py.

$ python generate.py data-bin/wmt14.en-fr.newstest2014 --path data-bin/wmt14.en-fr.fconv-py/model.pt --beam 5 Namespace(batch_size=32, beam=5, cpu=False, data='data-bin/wmt14.en-fr.newstest2014', gen_subset='test', lenpen=1, log_format=None, log_interval=1000, max_len_a=0, max_len_b=200, max_source_positions=1024, max_target_positions=1024, nbest=1, no_beamable_mm=False, no_early_stop=False, no_progress_bar=False, path=['data-bin/wmt14.en-fr.fconv-py/model.pt'], quiet=False, remove_bpe=None, replace_unk=None, seed=1, skip_invalid_size_inputs_valid_test=False, source_lang=None, target_lang=None, unkpen=0, unnormalized=False, workers=1) | loading model(s) from data-bin/wmt14.en-fr.fconv-py/model.pt | [en] dictionary: 44206 types | [fr] dictionary: 44463 types | data-bin/wmt14.en-fr.newstest2014 test 3003 examples 0%| | 0/141 [00:00<?, ?it/s] Segmentation fault

myleott commented 6 years ago

Hmm, are you able to train on the IWSLT dataset? What commit of pytorch are you using?

myleott commented 6 years ago

Closing since we weren't able to reproduce this. Please reopen if you're able to test on a newer version of PyTorch and find that it's still happening!