Add support for two input columns for TextClassificationEvaluator#205
Merged
lvwerra merged 10 commits intoAug 15, 2022
Merged
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
ola13
reviewed
Jul 27, 2022
ola13
left a comment
Contributor
There was a problem hiding this comment.
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.
lvwerra
reviewed
Jul 28, 2022
Member
|
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) :) |
Contributor
Author
|
Hello, thank you for your feedback! I will be careful next to break PRs in unitary changes. |
fxmarty
force-pushed
the
support-several-cols-text-classification
branch
from
August 1, 2022 07:31
e878bcb to
da602ef
Compare
Contributor
Author
lvwerra
reviewed
Aug 5, 2022
Co-authored-by: Leandro von Werra <lvwerra@users.noreply.github.com>
fxmarty
force-pushed
the
support-several-cols-text-classification
branch
from
August 8, 2022 13:12
e38d8a4 to
f3f5100
Compare
mathemakitten
pushed a commit
that referenced
this pull request
Aug 15, 2022
* 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>
mathemakitten
pushed a commit
that referenced
this pull request
Sep 23, 2022
* 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR:
Evaluatorsubclassescompute()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
DatasetColumnTextClassificationbecause 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 useDatasetColumnfor 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