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

TypeError: 'NoneType' object is not callable #647

Open
Yichangfa opened this issue Oct 30, 2024 · 1 comment
Open

TypeError: 'NoneType' object is not callable #647

Yichangfa opened this issue Oct 30, 2024 · 1 comment

Comments

@Yichangfa
Copy link

Yichangfa commented Oct 30, 2024

When I use this code, I encounter an error that I can't resolve.
metric = evaluate.load(
"squad_v2" if data_args.version_2_with_negative else "squad", cache_dir=model_args.cache_dir
)

File "../../pytorch/question-answering/run_qa.py", line 712, in
main()
File "../../pytorch/question-answering/run_qa.py", line 626, in main
metric = evaluate.load(
File "/opt/conda/lib/python3.8/site-packages/evaluate/loading.py", line 706, in load
evaluation_instance = evaluation_cls(
TypeError: 'NoneType' object is not callable

evaluate is 0.4.3
transformer is 4.46.1
datasets is 2.16.0

@sindhu-pr
Copy link

evaluate.load() for any measurement/metrics does not work properly with versions >0.4.0. Please downgrade to 0.4.0 to make it work. I also discovered after lot of frustrating trials.

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

2 participants