-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Expose timm constructor arguments #960
Conversation
@qubvel @adamjstewart I kind of need this, and the community appears to do so as well. What is missing to make it land? |
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.
Thanks for the contribution! Overall looks good to me, just a nit comment
def _merge_kwargs_no_dupls(a: dict[str, Any], b: dict[str, Any]) -> dict[str, Any]: | ||
dupls = a.keys() & b.keys() | ||
if dupls: | ||
raise ValueError(f"'{dupls}' already specified internally") | ||
|
||
return a | b |
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 refactor it a bit:
- dupls -> duplicates
- "|" not sure which python version introduced it, maybe
{**a, **b}
would be more robust
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.
- Looks like it was added in Python 3.9, so no need to change this: https://peps.python.org/pep-0584/
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.
Thanks for the update!
Resolves #954