-
Notifications
You must be signed in to change notification settings - Fork 26.3k
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 missing type hints for all flavors of LayoutLMv2 PyTorch models. #16089
Add missing type hints for all flavors of LayoutLMv2 PyTorch models. #16089
Conversation
This also looks good, but same comment about the return types! |
The documentation is not available anymore as the PR was closed or merged. |
Yes I fixed return types + I added all type hints for |
Hi, I'm seeing some tests failing on this one - I think you might have deleted a couple of arguments while adding the annotations! |
head_mask=None, | ||
inputs_embeds=None, | ||
encoder_hidden_states=None, | ||
encoder_attention_mask=None, |
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.
These arguments encoder_hidden_states
and encoder_attention_masks
are not used.
Should I fix tests too or it's out of the scope of this PR ?
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.
I think it's out of scope of this PR, but good catch nonetheless! I'm not sure why the arguments are there if they're not used, but you can raise an issue after this PR is merged if you like.
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, thank you!
What does this PR do?
I added type hints for all
LayoutLMv2
PyTorch classes as described in #16059 .@Rocketknight1