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

SyntaxError: closing parenthesis '}' #592

Open
wangxiuwen opened this issue May 12, 2024 · 3 comments
Open

SyntaxError: closing parenthesis '}' #592

wangxiuwen opened this issue May 12, 2024 · 3 comments

Comments

@wangxiuwen
Copy link

wangxiuwen commented May 12, 2024

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.

@ThisisBillhe
Copy link

same problem

@syx11237744
Copy link

I fixed the issue by changing export HF_ENDPOINT=https://huggingface.co/, I guess the problem may be from the https://hf-mirror.com/

@padeoe
Copy link

padeoe commented May 24, 2024

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.

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

No branches or pull requests

4 participants