rouge icon indicating copy to clipboard operation
rouge copied to clipboard

ModuleNotFoundError: No module named 'bin.rouge_cmd'

Open vighneshck opened this issue 4 years ago • 3 comments

Hi, I wanted to first test out the rouge library on the sample files provided ('./tests/hyp.txt' and './tests/ref.txt') before actually using it on my own files.

However, on running the command: rouge -f ./tests/hyp.txt ./tests/ref.txt

I get the following error: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/bin/rouge", line 33, in <module> sys.exit(load_entry_point('rouge==1.0.0rc2', 'console_scripts', 'rouge')()) File "/Library/Frameworks/Python.framework/Versions/3.8/bin/rouge", line 25, in importlib_load_entry_point return next(matches).load() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/metadata.py", line 77, in load module = import_module(match.group('module')) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 973, in _find_and_load_unlocked ModuleNotFoundError: No module named 'bin.rouge_cmd'`

P.S.:

  1. I get the same error when I run rouge on my own files too.
  2. I have installed Python3.8.7 and pip21.0.1

UPDATE: The library worked when I tried using it on google colab (with Python3.6.9 and pip19.3.1)

vighneshck avatar Jan 31 '21 23:01 vighneshck

Honestly don't get it. I tried using exact same version of python and pip, everything is fine...

Maybe things are messed up by environments, are you using some envs?

pltrdy avatar Feb 01 '21 21:02 pltrdy

same bug.

tangxiangru avatar Apr 02 '21 07:04 tangxiangru

Please use python rouge/bin/rouge_cmd.py -f ./fb/data/xsum_hypo/bart.test.hypo ./fb/data/xsum_data/test.target -a

tangxiangru avatar Apr 02 '21 07:04 tangxiangru