I want to evaluate all checkponts' real bleu with t2t-decoder and standard bleu script.
It would be convenient if you supported specifying checkpoint.
Thx
I did a PR adding a --checkpoint_path option to t2t-decoder. It has been merged, but then someone reverted it.
You may be interested in my scripts t2t-bleu and t2t-translate-all. I plan to do a PR after cleaning those a bit.
@martinpopel
Thanks a lot. Looking forward to your PR.
One way you can do this is by copying the checkpoint you want evaluated into a directory and then setting --output_dir to that folder.
@efeiefei: My PR is finally done: #488
@martinpopel
Hi, thanks for your PR. However, I found that t2t-decoder didn't use specified checkpoint(oppositely the newest checkpoint) to inference even if I use --checkpoint_path. My env:
tensorflow:1.4.1
tensor2tensor:1.5.5
Now I can only use --output_dir to inference while I want to test an earlier checkpoint. I know an alternative method is to edit checkpoint file in output_dir, but things shouldn't behave like this after your PR. I didn't find some related change log in commit messages after your PR. Please give me some tips! Thank you.
--checkpoint_path works for me, thanks to https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/bin/t2t_decoder.py#L89.
It works only with decode_from_file. It does not work with decode_interactive and score_file (although it could; if you need it, send a PR, I would say).
@martinpopel Thank you for your help, I have sent a PR which enables checkpoint_path arg in interactive decoding.
My PR was merged, look #694
Most helpful comment
I did a PR adding a
--checkpoint_pathoption tot2t-decoder. It has been merged, but then someone reverted it.You may be interested in my scripts t2t-bleu and t2t-translate-all. I plan to do a PR after cleaning those a bit.