Open ziorufus opened 6 years ago
It looks like beam dumping hasn't been implemented yet. self.beam_accum
is initialized but never updated in either Translator.py or Beam.py, which are the two places I was looking for it.
okay. It seems that it used to be implemented and then removed by this commit:
Anyway, it needs to be reimplemented and if possible with the same output as the Torch version:
So that the existing visualization tool can be used.
I don't have time to take care of this, if anyone is interested, these pointers should be enough.
I'll give it a look.
@bpopeters di you have time to work on this ?
kind reminder if you have time.
@ziorufus do you have time to test #1240 ?
Kind reminder if you have time.
Hello! I'm trying to use the
dump_beam
parameter in the translate.py file, but I get this error:By looking at the code, it seems that line 210 of Translator.py should be modified from
json.dump(self.translator.beam_accum
tojson.dump(self.beam_accum
, but it still does not work. No error is thrown now, but the beam file only contains:{"predicted_ids": [], "beam_parent_ids": [], "log_probs": [], "scores": []}
. How can I get the correct output? Note that the output file is correct.Thank you!