-
Notifications
You must be signed in to change notification settings - Fork 27.7k
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
Tf longformer for sequence classification #8231
Tf longformer for sequence classification #8231
Conversation
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 PR looks good, but there are a few things to do before merging.
- You introduced a bunch of spelling errors in the variable names/documentation?
- You should run
make style
andmake quality
to fix the code quality test - You should implement the tests related to the added classes
- You should add these classes to the TF auto models
…merForTokenClassification, TFLongformerForMultipleChoice
@elk-cloner - thanks a lot for taking a look into this! Would be awesome to fix the TFLongformer related tests. There seem to be some obvious bug: I'll do a longer review once these tests are fixed :-) Lemme know if you need help at some point. |
update dummy_tf_objects fix tests fix bugs in requested classes
@patrickvonplaten i have passed all the tests but got stuck in |
Hey @elk-cloner, yeah this problem was not at all obvious! Thanks for letting me know :-) For Multiple Choice, we have to make sure that the position_ids stay 2-dimensional, which is only relevant for TFLongformer, but not for other TF models -> so we need this Feel free to ping me again, when you're ready with the PR or need help :-) |
@patrickvonplaten all tests have passed, can you take a look ? |
Hey @elk-cloner - the signature of the function calls should be done analogs to the one in other |
Good to merge IMO! |
Checked the slow tests and everything passes. Great job @elk-cloner! Longformer is definitely not the easiest model |
Would be awesome if @LysandreJik and @sgugger can take a final look, then we're good to merge. |
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 your contribution! This looks good to merge, just a little thing missing on the doc side.
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.
Very clean implementation. LGTM.
What does this PR do?
implement SequenceClassification, MultipleChoice and TokenClassification classes for TFLongformer.
Resolves #6401
Before submitting
Pull Request section?
to the it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors which may be interested in your PR.