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

Error running python scripts/cal-rouge.py #14

Open
Yatin97hrc opened this issue Mar 30, 2021 · 1 comment
Open

Error running python scripts/cal-rouge.py #14

Yatin97hrc opened this issue Mar 30, 2021 · 1 comment

Comments

@Yatin97hrc
Copy link

Hello authors, awesome work!! I am trying to replicate your work for my project as mentioned. However, I am stuck at the below code snippet, please see if you can help.

Platform/Environment
Google Colab

Running
!sudo python scripts/cal-rouge.py '/pathto/scitldr/test.hypo' 'SciTLDR-Data/SciTLDR-A/test.jsonl' --workers 1

Error
0% 0/618 [00:00<?, ?it/s]Preparing documents... 0 line(s) ignored Running ROUGE... Traceback (most recent call last): File "scripts/cal-rouge.py", line 160, in <module> main() File "scripts/cal-rouge.py", line 152, in main all_dfs = process(args.gold, args.candidate, args.candidate.split('/')[-1], args) File "scripts/cal-rouge.py", line 105, in process results = [get_rouge(d) for d in tqdm(data)] File "scripts/cal-rouge.py", line 105, in <listcomp> results = [get_rouge(d) for d in tqdm(data)] File "scripts/cal-rouge.py", line 48, in get_rouge return _get_rouge(args['pred'], args['data']) File "scripts/cal-rouge.py", line 73, in _get_rouge files2rouge.run(cand_file, gold_file, ignore_empty=True, saveto=log_file) File "/usr/local/lib/python3.7/dist-packages/files2rouge-2.1.0-py3.7.egg/files2rouge/files2rouge.py", line 73, in run output = r.convert_and_evaluate(rouge_args=rouge_args_str) File "/usr/local/lib/python3.7/dist-packages/pyrouge/Rouge155.py", line 368, in convert_and_evaluate rouge_output = self.evaluate(system_id, rouge_args) File "/usr/local/lib/python3.7/dist-packages/pyrouge/Rouge155.py", line 343, in evaluate rouge_output = check_output(command, env=env).decode("UTF-8") File "/usr/lib/python3.7/subprocess.py", line 411, in check_output **kwargs).stdout File "/usr/lib/python3.7/subprocess.py", line 488, in run with Popen(*popenargs, **kwargs) as process: File "/usr/lib/python3.7/subprocess.py", line 800, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.7/subprocess.py", line 1551, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: 'setup_rogue/ROUGE-1.5.5.pl' 0% 0/618 [00:00<?, ?it/s]

P.S. : While executing the dependent command !python setup_rouge.py , as prompted, I named the folder setup_rogue, in the present working directory, inside which ROUGE-1.5.5.pl was placed. Now this is giving a Permission error.

@armancohan
Copy link
Collaborator

Likely to be a permission issue. Just as a check, can you set chmod +x ROUGE-1.5.5.pl and try again?

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