Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions metrics/rouge/rouge.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
""" ROUGE metric from Google Research github repo. """

# The dependencies in https://github.com/google-research/google-research/blob/master/rouge/requirements.txt
import absl # Here to have a nice missing dependency error message early on
import absl
import datasets
import nltk # Here to have a nice missing dependency error message early on
import nltk
import numpy # Here to have a nice missing dependency error message early on
import six # Here to have a nice missing dependency error message early on
from rouge_score import rouge_scorer, scoring
Expand Down
2 changes: 2 additions & 0 deletions src/evaluate/loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ def _download_additional_modules(
lib = importlib.import_module(library_import_name) # noqa F841
except ImportError:
library_import_name = "scikit-learn" if library_import_name == "sklearn" else library_import_name
library_import_name = "absl-py" if library_import_name == "absl" else library_import_name
library_import_path = "absl-py" if library_import_path == "absl" else library_import_path
needs_to_be_installed.add((library_import_name, library_import_path))
if needs_to_be_installed:
raise ImportError(
Expand Down