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

metadata_update() function inserts verified=True in self-reported evaluations #1185

Closed
lewtun opened this issue Nov 14, 2022 · 0 comments · Fixed by #1186
Closed

metadata_update() function inserts verified=True in self-reported evaluations #1185

lewtun opened this issue Nov 14, 2022 · 0 comments · Fixed by #1186
Assignees
Labels
bug Something isn't working

Comments

@lewtun
Copy link
Member

lewtun commented Nov 14, 2022

Describe the bug

With the refactor of evaluation metadata in #940, it seems that metadata_update() can no longer differentiate between self-reported evaluations and those from Hugging Face's evaluation service.

As a result, updating a model which has both types of evaluation metrics will result in a verified=True entry getting inserted into the self-reported metrics. This is undesirable, because the verified field is used to distinguish both types of evaluations on leaderboards etc.

Another effect from #940 is that evaluations with the same task type / name are merged together, which isn't ideal because logically a self-reported evaluation and an automated one should each have their own entry in the model-index.results array.

I'll take a stab at fixing this if @Wauplin doesn't beat me to it :)

cc @abhishekkrthakur

Reproduction

Run the following snippet to open a Hub PR and see the insertion of the verified=True field:

from huggingface_hub import metadata_update

model_id = "autoevaluate/binary-classification"
card = ModelCard.load("autoevaluate/binary-classification")
metadata = card.data.to_dict()
metadata_update(model_id, metadata=metadata, overwrite=True, create_pr=True, commit_message="Test update")

Logs

No response

System info

- huggingface_hub version: 0.11.0.rc0
- Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-glibc2.10
- Python version: 3.8.13
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /home/lewis_huggingface_co/.huggingface/token
- Has saved token ?: True
- Who am I ?: lewtun
- Configured git credential helpers: store
- FastAI: N/A
- Tensorflow: N/A
- Torch: 1.11.0
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants