diff --git a/metrics/rouge/rouge.py b/metrics/rouge/rouge.py index 353301cca..843738279 100644 --- a/metrics/rouge/rouge.py +++ b/metrics/rouge/rouge.py @@ -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 diff --git a/src/evaluate/loading.py b/src/evaluate/loading.py index a9cbbe60d..dc6d91fb3 100644 --- a/src/evaluate/loading.py +++ b/src/evaluate/loading.py @@ -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(