Closed kadir-gunel closed 7 years ago
Hi,
Could you please post the detailed error message, I want to know which line caused this error.
Does it produce some translations before the error message? You could paste the entire outputs after run python testing.py dcnmt_en2fr_640000
, I would check it.
Or maybe the test dataset is missing, could you check it
INFO:main:Model options:
{'batch_size': 30,
'beam_size': 12,
'bidir_encoder_depth': 2,
'bleu_script': './data/multi-bleu.perl',
'bos_token': '',
'dec_embed': 64,
'dec_nhids': 1024,
'dump_freq': 20000,
'enc_embed': 64,
'enc_nhids': 1024,
'eos_token': '',
'finish_after': 1000000,
'hook_samples': 2,
'max_src_seq_char_len': 300,
'max_src_seq_word_len': 50,
'max_trg_seq_char_len': 300,
'max_trg_seq_word_len': 50,
'normalized_bleu': True,
'normalized_val': True,
'print_freq': 50,
'reload': False,
'sampling_freq': 50,
'save_freq': 500,
'saveto': 'dcnmt_ar2tr',
'sort_k_batches': 12,
'source_language': 'ar',
'src_data': './data/all.ar-tr.ar.tok.shuf',
'src_dgru_depth': 1,
'src_dgru_nhids': 512,
'src_vocab': './data/vocab.ar-tr.ar.pkl',
'src_vocab_size': 120,
'step_clipping': 1.0,
'stream': 'stream',
'target_language': 'tr',
'test_set': './data/haber-internet.train.tok.bw.ar',
'test_set_grndtruth': './data/haber.tune.tok2.tr.ref0',
'test_set_out': 'haber.tune.tok2.tr.ref0_model_out.txt',
'transition_depth': 1,
'trg_data': './data/all.ar-tr.tr.tok.shuf',
'trg_dgru_depth': 1,
'trg_dgru_nhids': 512,
'trg_igru_depth': 1,
'trg_igru_nhids': 1024,
'trg_vocab': './data/vocab.ar-tr.tr.pkl',
'trg_vocab_size': 120,
'unk_id': 1,
'unk_token': '
Error Message Starts here:
Traceback (most recent call last):
File "testing.py", line 110, in
I do not think that the problem is test data. Because it happened once and I corrected the file name in config file.
No translations occur before the error.
Thanks! I find that this error is related to Blocks. Python 3.4 will raise a warning as following:
python3.4/site-packages/blocks/search.py:324: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future for output, mask in equizip(outputs, masks)]
But Python 3.5 will result an error as your case, I have open an issue on Blocks.
I have provided a temporary fix for this error. You could download the new sampling.py
.
Besides, I think it is better to try the old version of DCNMT for ar-tr.
Ok, I will also try the older version. Thank you.
@kadir-gunel Thanks for the heads-up. The issue has been fixed in Blocks.
@SwordYork Great! Thanks!
Hello @SwordYork ,
When testing the model python throws a TypeError message : Slice indices must be integers or None .... And then perl throws exception, probably caused by the previous error.
B.R.