huggingface / evaluate

🤗 Evaluate: A library for easily evaluating machine learning models and datasets.

Home Page:https://huggingface.co/docs/evaluate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

evaluate.load loads indefinitely offline

Virgile-Richard1 opened this issue · comments

The following script loads indefinitely:

import os
os.environ["HF_EVALUATE_OFFLINE"] = "1"

from evaluate import load

metric = load('./glue/', 'qqp')

A KeyboardInterrupt yields the following:

Traceback (most recent call last):
  File "/home/gridsan/vrichard/bertSignatures/data_download.py", line 7, in <module>
    metric = load('./glue/', 'qqp')
  File "/home/gridsan/vrichard/.local/lib/python3.9/site-packages/evaluate/loading.py", line 731, in load
    evaluation_module = evaluation_module_factory(
  File "/home/gridsan/vrichard/.local/lib/python3.9/site-packages/evaluate/loading.py", line 622, in evaluation_module_factory
    return LocalEvaluationModuleFactory(
  File "/home/gridsan/vrichard/.local/lib/python3.9/site-packages/evaluate/loading.py", line 429, in get_module
    module_path, hash = _create_importable_file(
  File "/home/gridsan/vrichard/.local/lib/python3.9/site-packages/evaluate/loading.py", line 373, in _create_importable_file
    importable_local_file = _copy_script_and_other_resources_in_importable_dir(
  File "/home/gridsan/vrichard/.local/lib/python3.9/site-packages/evaluate/loading.py", line 305, in _copy_script_and_other_resources_in_importable_dir
    with FileLock(lock_path):
  File "/home/gridsan/vrichard/.local/lib/python3.9/site-packages/datasets/utils/filelock.py", line 320, in __enter__
    self.acquire()
  File "/home/gridsan/vrichard/.local/lib/python3.9/site-packages/datasets/utils/filelock.py", line 282, in acquire
    time.sleep(poll_intervall)
KeyboardInterrupt

The glue repo has been downloaded from evaluate/metrics/glue/.

versions:

Python 3.9.16 | packaged by conda-forge | (main, Feb  1 2023, 21:39:03) 
[GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import evaluate
>>> evaluate.__version__
'0.4.0'

Did you find a fix for this? I am having the same error.