Skip to content
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 models (final batch) #25750

Conversation

nablabits
Copy link
Contributor

What does this PR do?

Addresses the last type hints for pytorch models in #16059:

  1. TableTransformer:
    1. TableTransformerForObjectDetection
    2. TableTransformerModel
  2. TimesformerModel
  3. TimmBackbone
  4. TVLT:
    1. TvltForAudioVisualClassification
    2. TvltForPreTraining
    3. TvltModel
  5. Vivit
    1. VivitForVideoClassification
    2. VivitModel

Who can review?

@Rocketknight1 please

@nablabits nablabits changed the title Add type hints for models final batch Add type hints for pytorch models (final batch) Aug 25, 2023
Copy link
Member

@Rocketknight1 Rocketknight1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

src/transformers/models/vivit/modeling_vivit.py Outdated Show resolved Hide resolved
@Rocketknight1
Copy link
Member

Thank you again for the diligent work on the type hints, by the way - your PRs were really clean and required very little work to review, and they really helped push that project!

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
@nablabits
Copy link
Contributor Author

Thank you again for the diligent work on the type hints, by the way - your PRs were really clean and required very little work to review, and they really helped push that project!

Thank you very much, really appreciated!! TBH it has been a great learning experience for me, so thanks for the opportunity and the patience with the explanations

@SoyGema
Copy link
Contributor

SoyGema commented Aug 27, 2023

Thank you again for the diligent work on the type hints, by the way - your PRs were really clean and required very little work to review, and they really helped push that project!

My apologies, in advance, for stepping in here.
I would like to highlight as well the positive impact @nablabits brings to the HF OSS ecosystem.
It´s also great how this user helps other contributors to thrive #1 and #2 bringing learning, reciprocity, and fun.

@Rocketknight1 Rocketknight1 merged commit ed915cf into huggingface:main Aug 28, 2023
21 checks passed
@nablabits
Copy link
Contributor Author

Thank you again for the diligent work on the type hints, by the way - your PRs were really clean and required very little work to review, and they really helped push that project!

My apologies, in advance, for stepping in here. I would like to highlight as well the positive impact @nablabits brings to the HF OSS ecosystem. It´s also great how this user helps other contributors to thrive #1 and #2 bringing learning, reciprocity, and fun.

Gema, thanks for the kind words 🤗
@SoyGema

@nablabits nablabits deleted the feature/add-type-hints-for-models-final-batch branch September 14, 2023 07:06
parambharat pushed a commit to parambharat/transformers that referenced this pull request Sep 26, 2023
* Add type hints for table_transformer

* Add type hints to Timesformer model

* Add type hints to Timm Backbone model

* Add type hints to TVLT family models

* Add type hints to Vivit family models

* Use the typing instance instead of the python builtin.

* Fix the `replace_return_docstrings` decorator for Vivit model

Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>

---------

Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
blbadger pushed a commit to blbadger/transformers that referenced this pull request Nov 8, 2023
* Add type hints for table_transformer

* Add type hints to Timesformer model

* Add type hints to Timm Backbone model

* Add type hints to TVLT family models

* Add type hints to Vivit family models

* Use the typing instance instead of the python builtin.

* Fix the `replace_return_docstrings` decorator for Vivit model

Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>

---------

Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
EduardoPach pushed a commit to EduardoPach/transformers that referenced this pull request Nov 18, 2023
* Add type hints for table_transformer

* Add type hints to Timesformer model

* Add type hints to Timm Backbone model

* Add type hints to TVLT family models

* Add type hints to Vivit family models

* Use the typing instance instead of the python builtin.

* Fix the `replace_return_docstrings` decorator for Vivit model

Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>

---------

Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants