-
Notifications
You must be signed in to change notification settings - Fork 255
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
Add support for two input columns for TextClassificationEvaluator #205
Add support for two input columns for TextClassificationEvaluator #205
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.
Looks great! Some comments inline.
For the future, I'd split such a PR in two - one for docstrings only and one for changes in the logic.
Looks great! Thanks for adding this, I left a a few minor comments. I agree with @ola13 that splitting such a PR in two would make it much easier to review (for next time) :) |
Hello, thank you for your feedback! I will be careful next to break PRs in unitary changes. |
e878bcb
to
da602ef
Compare
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.
LGTM! 🚀
Co-authored-by: Leandro von Werra <lvwerra@users.noreply.github.com>
e38d8a4
to
f3f5100
Compare
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 great!
* added support for two columns * style * add doc utils * style * style * feedbacks * feedbacks * Update src/evaluate/evaluator/text_classification.py Co-authored-by: Leandro von Werra <lvwerra@users.noreply.github.com> * column check * remove duplicate code Co-authored-by: Leandro von Werra <lvwerra@users.noreply.github.com>
* added support for two columns * style * add doc utils * style * style * feedbacks * feedbacks * Update src/evaluate/evaluator/text_classification.py Co-authored-by: Leandro von Werra <lvwerra@users.noreply.github.com> * column check * remove duplicate code Co-authored-by: Leandro von Werra <lvwerra@users.noreply.github.com>
This PR:
Evaluator
subclassescompute()
signature for subclasses of Evaluator, so as to be able to call the method without keyword arguments (had the issue with issue classification since we redefined the defaultinput_column="image"
)@lvwerra I added a
DatasetColumnTextClassification
because of the input expected by the transformersTextClassificationPipeline
: https://github.com/huggingface/transformers/blob/d0acc9537829e7d067edbb791473bbceb2ecf056/src/transformers/pipelines/text_classification.py#L109-L111 . I did not manage to useDatasetColumn
for it, could we do better than what I did? It's a bit hacky here. Probably memory is not so much sensitive for text compared to images, so we could not use these wrappers altogether?This stills misses a bit of documentation.
Partially closes #196