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

Illegal division by zero at /My-path-to-RELEASE-1.5.5/ROUGE-1.5.5.pl line 2450. #41

Open
Lanme opened this issue Sep 27, 2019 · 1 comment

Comments

@Lanme
Copy link

Lanme commented Sep 27, 2019

I was training by chinese weibo data ,but when running decode.py,it failed to calculate rouge score .This is the issue which have the same problem but still remain to be sovled.
andersjo/pyrouge#5

Decoder has finished reading dataset for single_pass.
Now starting ROUGE eval...
Illegal division by zero at /usr/local/ROUGE-1.5.5/ROUGE-1.5.5.pl line 2450.
Traceback (most recent call last):
File "training_ptr_gen/decode.py", line 208, in
beam_Search_processor.decode()
File "training_ptr_gen/decode.py", line 106, in decode
results_dict = rouge_eval(self._rouge_ref_dir, self._rouge_dec_dir)
File "/mnt/jml/nlp/summarize/pointer_summarizer/data_util/utils.py", line 28, in rouge_eval
rouge_results = r.convert_and_evaluate()
File "/usr/local/lib/python3.5/dist-packages/pyrouge-0.1.3-py3.5.egg/pyrouge/Rouge155.py", line 367, in convert_and_evaluate
rouge_output = self.evaluate(system_id, rouge_args)
File "/usr/local/lib/python3.5/dist-packages/pyrouge-0.1.3-py3.5.egg/pyrouge/Rouge155.py", line 342, in evaluate
rouge_output = check_output(command, env=env).decode("UTF-8")
File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
**kwargs).stdout
File "/usr/lib/python3.5/subprocess.py", line 708, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/usr/local/ROUGE-1.5.5/ROUGE-1.5.5.pl', '-e', '/usr/local/ROUGE-1.5.5/data', '-c', '95', '-2', '-1', '-U', '-r', '1000', '-n', '4', '-w', '1.2', '-a', '-m', '/tmp/tmpw5iw2_0n/rouge_conf.xml']' returned non-zero exit status 255

@saiprabhakar
Copy link

I got a similar error with English when some of the reference/decode files were empty or only have '-' in them (which I think rouge interprets as empty). So I am guessing you have empty files or have some file which only has characters that ROUGE doesn't interpret correctly.

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