Add type hints for BERTGeneration#17047
Conversation
Added type hints for the BERTGenerationEncoder and BERTGenerationDecoder classes.
|
The documentation is not available anymore as the PR was closed or merged. |
Rocketknight1
left a comment
There was a problem hiding this comment.
Looks good to me, thank you!
What you put here is fine, and type hints for |
|
Okay great, you can go ahead and merge it then. I'll run your notebook to see what else needs to be done and work on some of those instead. Cheers |
|
Got it. Thanks for the PR! |
Added type hints for the BERTGenerationEncoder and BERTGenerationDecoder classes.
What does this PR do?
I added type hints for the
BERTGenerationEncoderandBERTGenerationDecoderclasses as requested in #16059 and demonstrated in #16074.I wasn't completely sure on what to use for the
past_key_valuesargument. I set it toOptional[Tuple[Tuple[torch.FloatTensor]]], but let me know if this is wrong. Also, not sure if I should also add type hints for theBertGenerationConfigclass?@Rocketknight1