-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Deprecate modeling_utils.py classes #37298
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
Conversation
|
run-slow: gpt2, xlm, xlnet, electra |
|
This comment contains run-slow, running the specified jobs: This comment contains run-slow, running the specified jobs: models: ['models/gpt2', 'models/xlm', 'models/xlnet'] |
|
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. |
|
cc @Rocketknight1 when you have bandwidth |
|
Change seems good but this is kind of a core library philosophy issue, so we'll need a core maintainer review! cc @Cyrilvallez |
Cyrilvallez
left a comment
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.
100% agree, they have nothing to do in modeling_utils.py, I have been wondering why they are there for some time!! Thanks a lot for tackling this! 🤗 If the slow tests are similar as main, it's good to go!
Just a small nit: I suppose https://github.com/huggingface/transformers/blob/main/utils/check_config_attributes.py#L330-L342 this is not needed anymore then, as thex are part of the main modeling files now? So we could remove this dead code?
* Move utils classes into models * Add deprecation warnings * Remove from docs * Update config attributes check
What does this PR do?
Classes such as
PoolerStartLogits,PoolerEndLogits,PoolerAnswerClass,SQuADHead, andSequenceSummaryare:modeling_utils.py, which is somewhat against the main repository philosophy of having classes defined within dedicated modeling filesFollowing the above, I have transferred them to the corresponding modeling files and deprecated those in
modeling_utils.py. This should uncluttermodeling_utils.pyand make it easier to remove those classes when models are going to be deprecated.