huggingface / huggingface/evaluate
evaluate.load loads indefinitely offline
- Dominant language
- Python
- Stars
- 2.5k
- Forks
- 341
- PR merge metrics
- No merged PRs in 30d
Description
The following script loads indefinitely:
```python
import os
os.environ["HF_EVALUATE_OFFLINE"] = "1"
from evaluate import load
metric = load('./glue/', 'qqp')
```
A KeyboardInterrupt yields the following:
```bash
Traceback (most recent call last):
File "/home/gridsan/vrichard/bertSignatures/data_download.py", line 7, in
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
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'
```
Contributor guide
Assessment
This issue has not been assessed yet.