Skip to content

Conversation

@ArthurZucker
Copy link
Collaborator

@ArthurZucker ArthurZucker commented Oct 1, 2024

What does this PR do?

Adds support in modular for:

  • deleting super()'s function (with raise Attribute Error)
  • a way to call another super: if you inherit from both LlamaTokenier and PretrainedTokenizer, you can call PretrainedTokenizer's __init__ and it will be unravelled as super().__init__()
  • splitting the all that is created in the modular_xxx.py
  • camel-cased renaming when dependencies are not found

@HuggingFaceDocBuilderDev

Hey! 🤗 Thanks for your contribution to the transformers library!

Before merging this pull request, slow tests CI should be triggered. To enable this:

  • Add the run-slow label to the PR
  • When your PR is ready for merge and all reviewers' comments have been addressed, push an empty commit with the command [run-slow] followed by a comma separated list of all the models to be tested, i.e. [run_slow] model_to_test_1, model_to_test_2
    • If the pull request affects a lot of models, put at most 10 models in the commit message
  • A transformers maintainer will then approve the workflow to start the tests

(For maintainers) The documentation for slow tests CI on PRs is here.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@ArthurZucker ArthurZucker marked this pull request as ready for review October 1, 2024 15:41
Copy link
Member

@LysandreJik LysandreJik 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! Only left a few comments

@Cyrilvallez Cyrilvallez mentioned this pull request Oct 2, 2024
@ArthurZucker ArthurZucker changed the title Add support for __all__ and potentailly deleting functions Add support for __all__ and potentilly deleting functions Oct 4, 2024
@ArthurZucker ArthurZucker merged commit a3add29 into main Oct 8, 2024
25 checks passed
@ArthurZucker ArthurZucker deleted the add-alls-modular branch October 8, 2024 08:19
BernardZach pushed a commit to BernardZach/transformers that referenced this pull request Dec 5, 2024
…e#33859)

* Add support for __all__ and potentailly deleting functions

* updates

* update

* nits

* remove dummies

* fix warning

* fixup

* style

* update

* fixup

* skip copied from when # skip

* remove log

* bring dummies back

* fixup

* remove copied from

* fixup

* remove warnings from `make fix-copies`

* fix doc issues

* nits

* Better error message !

* add support for more flexible naming!

* style

* breaking style?

* fix super() renaming issues

* del not needed when you don't call super().__init__()

* style

* no more fmt on :)

* properly remove `self`

* fixup

* fix

* doc nits

* add some doc 🫡
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants