Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to run seq3 trainer #2

Closed
threefoldo opened this issue Jul 11, 2019 · 1 comment
Closed

Failed to run seq3 trainer #2

threefoldo opened this issue Jul 11, 2019 · 1 comment

Comments

@threefoldo
Copy link

The file 'utils/eval.py' contains several errors:

  1. rouge.Rouge has no init parameters like: 'max_n', 'limit_length', etc; even very old version doesn't contain these parameters;
  2. rouge metrics has no 'rouge-n', but 'rouge-1', 'rouge-2';

$ python models/seq3.py --config model_configs/seq3.yaml

Traceback (most recent call last):-----------------] Time: 0m 8s (-23m 15s)
  File "models/seq3.py", line 423, in <module>
    train_loss = trainer.train_epoch()
  File "/home/jinzy/work/compression/seq3/modules/training/trainer.py", line 118, in train_epoch
    c(batch, losses, loss_list, batch_outputs)
  File "models/seq3.py", line 368, in eval_callback
    scores = rouge_file_list(config["data"]["ref_path"], hyps)
  File "./utils/eval.py", line 33, in rouge_file_list
    scores = rouge_lists(refs, hyps_list)
  File "./utils/eval.py", line 17, in rouge_lists
    stemming=True)
TypeError: __init__() got an unexpected keyword argument 'max_n'

@threefoldo
Copy link
Author

threefoldo commented Jul 11, 2019

Ennn, it's not the code problem, but a package problem. 'rouge' should come from py-rouge, not 'rouge' as in requirements.txt.
https://github.com/Diego999/py-rouge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants