-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
FileNotFoundError: Couldn't find a module script at exact_match.py. Module 'exact_match' doesn't exist on the Hugging Face Hub either. #1071
Comments
Hi! looks like a problem with the evaluate library. I would check if it's working correctly using something like
Could also be a firewall issue maybe? It checks for the metric on the Hugging Face Hub when you call it. |
Thank you for your response. Indeed, you're correct in your assumption that my local machine is unable to connect to the Hugging Face Hub. Given this situation, would it be possible for us to download the necessary files or perform checks in my local environment instead? |
I think installing from source might work:
|
I copied the exact_match.py file it required to the path where the error occurred, and now the error is gone, although this approach is not very elegant. |
Did you have trouble downloading the models as well or was it just this library? |
My situation is the same as @xinghuang2050 . I installed the "evaluate" module using |
I just meant |
This approach is indeed effective and resolved my issue! |
I copied the "exact_match" directory from the evaluate module to ./lm-evaluation-harness/, which resolved the FileNotFoundError issue. It seems likely that the problem was caused by my inability to access Huggingface, leading to the failure to download the 'exact_match' module. After fixing this, I was able to run the example case and the GSM8K evaluation task normally. My suggestion would be to integrate the exact_match module directly into lm-evaluation-harness for more convenient use by others. |
Reopening as a reminder that we should document this (and how to pre-download HF datasets/models/metrics in general with the |
Just to record some information about this error. |
I solved the problem according to your method, thank you very much! |
Same problem, it works for me |
@jijivski I downgraded to pyarrow version 11.0.0, but it is still incompatible with lm-evaluation-harness v0.4.0. Despite the change, I'm encountering a persistent error: |
Set HF mirrors can fix inability issue: export HF_ENDPOINT=https://hf-mirror.com |
I have the same issue, have you fixed it? |
I meet the same issue. I find it a very strange situation, that the file exact_math.py we clone from the https://github.com/huggingface/evaluate is different from the file in https://huggingface.co/spaces/evaluate-metric/exact_match/blob/main/exact_match.py . The former has two items:predictions1,predictions2 while the later has another two: predictions, references. Therefore, I simply replace the exact_math.py with the one from https://huggingface.co/spaces/evaluate-metric/exact_match/blob/main/exact_match.py and it works for me. |
patched in #2045 |
Hello,
I've encountered an issue when running the provided usage example on both versions 0.4.0 (main branch) and 1.0.0 (big-refactor branch) of your project. The example command I'm using is:
lm_eval --model hf
--model_args pretrained=EleutherAI/gpt-j-6B
--tasks hellaswag
--device cuda:0
--batch_size 8
However, this results in a FileNotFoundError as shown below:
File "/usr/local/lib/python3.10/dist-packages/lm_eval/api/metrics.py", line 142, in
exact_match = evaluate.load("exact_match")
FileNotFoundError: Couldn't find a module script at /models/software/lm-evaluation-harness/exact_match/exact_match.py. Module 'exact_match' doesn't exist on the Hugging Face Hub either.
Could you please help to address this issue? Any guidance would be much appreciated.
Thank you.
The text was updated successfully, but these errors were encountered: