-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
added autoeval fields to repocard types #901
Conversation
The documentation is not available anymore as the PR was closed or merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for adding this - LGTM!
Let's wait for a review from the huggingface_hub
maintainers before merging this.
task: "SingleResultTask" | ||
dataset: "Optional[SingleResultDataset]" | ||
metrics: "List[SingleMetric]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reviewers: this ordering of task > dataset > metrics is more natural and easier to review during Hub PRs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me!
cc @nateraw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to show how to use this in one of the docstrings in repocard.py
, but other than that looks good to me.
- type: accuracy | ||
value: 0.2662102282047272 | ||
name: Accuracy | ||
verified: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit - should we add config
in example here too, since you added that with this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this feedback!
In order to do this, were you thinking that I should also update the inputs to metadata_eval_result function here: https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/repocard.py#L80
An additional change like this is needed, because the test here won't pass otherwise:
https://github.com/huggingface/huggingface_hub/blob/main/tests/test_repocard.py#L166
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's what you were thinking. I just pushed a change where I added optional fields to metadata_eval_result and added documentation. lmk what you think!
Hi @adrinjalali can you please advise us on how to handle the failing |
In order to migrate the AutoTrain backend to use #888 instead of #884, we'll actually need the changes in this PR to be available in @SBrandeis' fork/branch. (We rely on the additional metadata fields provided by the current PR) To unblock @coyotte508 in https://github.com/huggingface/moon-landing/pull/3144 (which disables the
This isn't a pretty solution and it pollutes #888 with changes unrelated to the new API. An alternative would be to:
In the interest of releasing a stable evaluation service without lots of hacks, I'm in favour of the second option as long as it doesn't delay the release by too much. @SBrandeis do you have a rough idea how long it will take to get your PR merged? |
After discussing internally, we'll go for the option to wait until #888 is merged before migrating the AutoTrain backend. @coyotte508 from my side: feel free to merge https://github.com/huggingface/moon-landing/pull/3144 when you want :) |
@lewtun https://github.com/huggingface/moon-landing/pull/3144 is ready to be merged Nothing's going to burn on your side, right? 😅 |
Nope, the eval service is still in dev but let's quickly ask @gante for confirmation since I believe he was using my branch in |
Don't mind I will make the appropriate changes as soon as #888 gets merged 👍 |
* Add errors * Style * Review * hf_hub_download support * Errors for hf_hub_download * Typo * Handle 401 error * Tests for 401 error * Typo * Review comments
…data_eval_result, added documentation
* fix for spaces * fix for spaces * removed creating repository and added warning * revert my changes * added tests * removed debugger 😐 * fixed repository removal * Added tests and error * import pytest * fixed tests * fixed tests * style * removed repo removal * make style * fixed test with Lysandres patch * added fix
* Remove deprecations * Typo * Update src/huggingface_hub/README.md Co-authored-by: Julien Chaumond <julien@huggingface.co> Co-authored-by: Julien Chaumond <julien@huggingface.co>
* Add request ID to all requests * Typo * Typo * Review comments * Update src/huggingface_hub/utils/_errors.py Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Invert deprecation for create_repo * Set to 0.10
Co-authored-by: Lyle Nel <lyle@owlin.com>
Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
6674175
to
74ace9d
Compare
…x/add_autoeval_fields_to_repocard_types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @adrinjalali can you please advise us on how to handle the failing codecov test? Is it a question of writing more unit tests for the repocard or something else?
codecov
runs two tests, one to check the percentage of tests in the PR's patch, the other one on the whole project. For this PR, the only thing left to test now are metrics_config
and metrics_verified
.
""" | ||
Creates a metadata dict with the result from a model evaluated on a dataset. | ||
|
||
Example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the example section should come after the Returns
section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, added setting of metrics_config and metrics_verified to tests and did the reordering suggestion that you mentioned for the documentation.
…verified to tests
…x/add_autoeval_fields_to_repocard_types
* fix link * `verified` should be omitted when false * move docstring to its actual attribute * Attempt to show that `args` should be a dict
This PR makes the repocard types consistent with the spec that autoeval uses: https://raw.githubusercontent.com/huggingface/hub-docs/main/modelcard.md
It is based on lewis's PR here, but it only includes the necessary changes to repocard_types.py