Skip to content

Conversation

merveenoyan
Copy link
Collaborator

@merveenoyan merveenoyan commented Aug 2, 2022

This PR is actually a fragment of #26 as #26 is a bit overwhelming. I changed the API and put evaluation a part of the Card class not to bother user with extra attributes.
@BenjaminBossan @adrinjalali

@BenjaminBossan
Copy link
Collaborator

@merveenoyan Did you ping us because we should already take a look or just to let us know?

@merveenoyan
Copy link
Collaborator Author

@BenjaminBossan I pinged you to mainly look at UX of the evaluation and let me know if the direction is right.

@BenjaminBossan
Copy link
Collaborator

Hmm, not so much I can say about this yet. It is very specific to HF, right? E.g. IIUC we assume that the metric used by sklearn is the same as defined on HF/metrics.

@merveenoyan
Copy link
Collaborator Author

@BenjaminBossan having metrics in metadata is essentially for HF Hub, it also passes them to paperswithcode to associated task on associated dataset. (let's say you have text-classification, you'd like to evaluate it on GLUE) this is not the case usually for tabular models imo as people split their data on their own. I don't expect heavy usage for this for when you put your model for outside world, if someone else wants to benchmark their own models and programmatically access the best metrics, it would be good IMHO.

@adrinjalali
Copy link
Member

Overall I'd say it's in the right direction. I would change it a bit so that the method accepts the results of a scorer instead of trying to get the name and call it itself. It can be simplified by accepting a float value and a metric name. We probably also want to have it more like:

data description: ...
   metric 1: ...
   metric 2: ...

instead of a list of (data description, metric specs) as is right now.

But it seems like the eval results can't support that?

@merveenoyan
Copy link
Collaborator Author

@adrinjalali with #71 I think we can let the user add EvalResults instead, no?

@adrinjalali
Copy link
Member

Yeah that would also make sense. I'm impartial on whether to construct EvalResult inside a method or accept one from the user. Note that #71 doesn't really make user ever create a CardData object themselves, the utility function does that.

@BenjaminBossan
Copy link
Collaborator

I would tend towards not exposing modelcards internals to the user.

@merveenoyan merveenoyan marked this pull request as ready for review August 8, 2022 14:43
@merveenoyan
Copy link
Collaborator Author

BTW evaluation metrics can be seen in this repository:
https://huggingface.co/merve/hf_hub_example-d4b188ba-be75-44ed-9c2b-d2cd0640c233
Ekran Resmi 2022-08-08 18 46 25

self : object
Card object.
"""
self._eval_results = tabulate(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add to a table or set the table? The current code doesn't allow the user to call this method multiple times.

merveenoyan and others added 4 commits August 9, 2022 11:44
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
@merveenoyan merveenoyan requested a review from adrinjalali August 9, 2022 10:09
Copy link
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @merveenoyan

Copy link
Collaborator

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is almost good to go from my point of view. I have a suggestion for better formatting of one of the examples, which you may or may not agree with. But I think the test needs to be changed, as I think it doesn't work as intended.

Co-authored-by: Benjamin Bossan <BenjaminBossan@users.noreply.github.com>
@merveenoyan merveenoyan mentioned this pull request Aug 9, 2022
merveenoyan and others added 3 commits August 10, 2022 14:03
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
@merveenoyan
Copy link
Collaborator Author

@adrinjalali I addressed your comments.

Copy link
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM.

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
@merveenoyan
Copy link
Collaborator Author

@BenjaminBossan can you review?

Copy link
Collaborator

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks

@BenjaminBossan BenjaminBossan merged commit 2e1b3a6 into skops-dev:main Aug 10, 2022
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

Successfully merging this pull request may close these issues.

3 participants