-
Notifications
You must be signed in to change notification settings - Fork 31.7k
🚨 [v5] Rendundant code in nested configs #41314
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
🚨 [v5] Rendundant code in nested configs #41314
Conversation
|
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. |
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.
Nice, happy to clean them up, they are not really useful indeed!
Let's just remove the logger.info entries everywhere (I only flagged it once in the comments) at the same time!
| semantic_config = {} | ||
| logger.info("semantic_config is None. initializing the semantic model with default values.") | ||
| semantic_config = BarkSemanticConfig() | ||
| logger.info("`semantic_config` is `None`. Initializing the `BarkSemanticConfig` with default values.") |
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.
Let's remove those logs instead wdyt? One of the v5 goals is to have fewer and more informatives warnings and logs!
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.
oke, they are not super informative anyway
src/transformers/models/mm_grounding_dino/modular_mm_grounding_dino.py
Outdated
Show resolved
Hide resolved
* batch update models * delete even more * fix modular super init location * fix * fix copies * fix again, these have force-set values in configs * fix copies
What does this PR do?
This PR deletes
from_xxx_configand similar methods from everywhere and instead ensures that the config init can accept subconfigs of all formats (dict or object)Along the way, I found that not all configs call super init in the end and thus they can't set recursively attn implementation on subconfigs. I added a test for it and fixed all cases