evaluate
evaluate copied to clipboard
SyntaxError: closing parenthesis '}'
When I try to run the following script:
python -c "import evaluate; print(evaluate.load('exact_match').compute(references=['hello'], predictions=['hello']))"
I get this error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/{username}/anaconda3/envs/peft/lib/python3.10/site-packages/evaluate/loading.py", line 751, in load
evaluation_cls = import_main_class(evaluation_module.module_path)
File "/home/{username}/anaconda3/envs/peft/lib/python3.10/site-packages/evaluate/loading.py", line 76, in import_main_class
module = importlib.import_module(module_path)
File "/home/{username}/anaconda3/envs/peft/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 879, in exec_module
File "<frozen importlib._bootstrap_external>", line 1017, in get_code
File "<frozen importlib._bootstrap_external>", line 947, in source_to_code
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/home/{username}/.cache/huggingface/modules/evaluate_modules/metrics/evaluate-metric--exact_match/009c8b5313309ea5b135d526433d5ee76508ba1554cbe88310a30f85bb57ec88/exact_match.py", line 16
}
^
SyntaxError: closing parenthesis '}' does not match opening parenthesis '(' on line 14
Looking forward to a response, thanks.
same problem
I fixed the issue by changing export HF_ENDPOINT=https://huggingface.co/, I guess the problem may be from the https://hf-mirror.com/
I fixed the issue by changing export HF_ENDPOINT=https://huggingface.co/, I guess the problem may be from the https://hf-mirror.com/
Sorry, it's the problem caused by hf-mirror.com, I have fixed it.