-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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 type hints for PyTorch BERT. #23541
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. |
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.
This looks really good, thank you! I have one question about the strip_accents
argument, but other than that this looks perfect.
Looks good! The last thing you'll need to do is If you run |
It looks like I've got one last error that I cannot figure out, the relevant line of code appears several times in many files without issue otherwise. Could you help with this? |
Ah, thanks for the ping! Investigating now |
I've investigated and there's an issue in our copy checking code, specifically the (For internal def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=None):
self, token_ids_0: List[int], token_ids_1: Optional[List[int]] = None
) -> List[int]: @sgugger do you want me to make a PR to fix it? |
Lol no, fixing this is really not a priority. The copies can be manually updated. |
Understood! @coledie you might have to do some manual copying to make this work, in that case. Search the repository for the string If you have any issues, let me know and I can make the changes for you! |
@Rocketknight1 Looks like it is working since test failures are unrelated? |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
What does this PR do?
Add type hints for PyTorch BERT.
Fixes #16059 for PyTorch BERT
Before submitting
Pull Request section?
to 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 who may be interested in your PR.