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

missing dependency #543

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

missing dependency #543

wants to merge 1 commit into from

Conversation

stas00
Copy link
Contributor

@stas00 stas00 commented Jan 29, 2024

following with the installation instructions:

pip install evaluate 

then it fails with missing sklearn

Traceback (most recent call last):
  File "/home/stas/test/test-evaluate.py", line 10, in <module>
    metric = load("accuracy",
  File "/env/lib/conda/evaluate-test/lib/python3.9/site-packages/evaluate/loading.py", line 751, in load
    evaluation_cls = import_main_class(evaluation_module.module_path)
  File "/env/lib/conda/evaluate-test/lib/python3.9/site-packages/evaluate/loading.py", line 76, in import_main_class
    module = importlib.import_module(module_path)
  File "/env/lib/conda/evaluate-test/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/data/huggingface/modules/evaluate_modules/metrics/evaluate-metric--accuracy/f887c0aab52c2d38e1f8a215681126379eca617f96c447638f751434e8e65b14/accuracy.py", line 17, in <module>
    from sklearn.metrics import accuracy_score
ModuleNotFoundError: No module named 'sklearn'

on:

from evaluate import load
metric = load("accuracy", ...)

so proposing to move the requirements as suggested in this PR

alternatively, installation docs should be updated.

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

Successfully merging this pull request may close these issues.

1 participant