An unexpected error occurs during the training and evaluation process

Hi,

I was using the Opennmt machine translation Transformer architecture to train the model. During the training and evaluation process, I got an unexpected error. I have given the error below.

Traceback (most recent call last):
File “/usr/local/bin/onmt-main”, line 8, in
sys.exit(main())
File “/usr/local/lib/python3.6/dist-packages/opennmt/bin/main.py”, line 231, in main
hvd=hvd)
File “/usr/local/lib/python3.6/dist-packages/opennmt/runner.py”, line 245, in train
moving_average_decay=train_config.get(“moving_average_decay”))
File “/usr/local/lib/python3.6/dist-packages/opennmt/training.py”, line 118, in call
early_stop = self._evaluate(evaluator, step, moving_average=moving_average)
File “/usr/local/lib/python3.6/dist-packages/opennmt/training.py”, line 150, in _evaluate
evaluator(step)
File “/usr/local/lib/python3.6/dist-packages/opennmt/evaluation.py”, line 317, in call
score = scorer(self._labels_file, output_path)
File “/usr/local/lib/python3.6/dist-packages/opennmt/utils/scorers.py”, line 83, in call
bleu = sacrebleu.corpus_bleu(sys_stream, [ref_stream], force=True)
File “/usr/local/lib/python3.6/dist-packages/sacrebleu/compat.py”, line 36, in corpus_bleu
sys_stream, ref_streams, use_effective_order=use_effective_order)
File “/usr/local/lib/python3.6/dist-packages/sacrebleu/metrics/bleu.py”, line 276, in corpus_score
if any(len(ref_stream) != len(sys_stream) for ref_stream in ref_streams):
File “/usr/local/lib/python3.6/dist-packages/sacrebleu/metrics/bleu.py”, line 276, in
if any(len(ref_stream) != len(sys_stream) for ref_stream in ref_streams):
TypeError: object of type ‘GFile’ has no len()

Thanks!

See: