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 several pytorch models (batch-4) #25749

Conversation

nablabits
Copy link
Contributor

What does this PR do?

Addresses some of the models in #16059:

  1. Mgpstr
    1. MgpstrForSceneTextRecognition
    2. MgpstrModel
  2. PLBart
    1. PLBartForConditionalGeneration
    2. PLBartModel
  3. Pix2StructTextModel
  4. RagModel
  5. SamModel
  6. Swin2SRModel

Who can review?

@Rocketknight1, please

@nablabits nablabits changed the title Add type hints for several models models (batch-4) Add type hints for several models (batch-4) Aug 25, 2023
@nablabits nablabits changed the title Add type hints for several models (batch-4) Add type hints for several pytorch models (batch-4) 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.

Looks good to me! One quick type change, and one correction to the docstring - that bit wasn't your fault, but let's fix it while we're here.

src/transformers/models/pix2struct/modeling_pix2struct.py Outdated Show resolved Hide resolved
src/transformers/models/rag/modeling_rag.py Outdated Show resolved Hide resolved
@HuggingFaceDocBuilderDev

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

nablabits and others added 4 commits August 27, 2023 07:34
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
@Rocketknight1 Rocketknight1 merged commit 886b6be into huggingface:main Aug 28, 2023
21 checks passed
@nablabits nablabits deleted the feature/add-type-hints-for-models-batch-4 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 MGP STR model

* Add missing type hints for plbart model

* Add type hints for Pix2struct model

* Add missing type hints to Rag model and tweak the docstring

* Add missing type hints to Sam model

* Add missing type hints to Swin2sr model

* Fix a type hint for Pix2StructTextModel

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

* Fix typo on Rag model docstring

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

* Fix linter

---------

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 MGP STR model

* Add missing type hints for plbart model

* Add type hints for Pix2struct model

* Add missing type hints to Rag model and tweak the docstring

* Add missing type hints to Sam model

* Add missing type hints to Swin2sr model

* Fix a type hint for Pix2StructTextModel

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

* Fix typo on Rag model docstring

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

* Fix linter

---------

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 MGP STR model

* Add missing type hints for plbart model

* Add type hints for Pix2struct model

* Add missing type hints to Rag model and tweak the docstring

* Add missing type hints to Sam model

* Add missing type hints to Swin2sr model

* Fix a type hint for Pix2StructTextModel

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

* Fix typo on Rag model docstring

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

* Fix linter

---------

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.

3 participants