-
Notifications
You must be signed in to change notification settings - Fork 33
Minimalistic dynamic configs #268
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
for name in PeftType: | ||
# We need this because we are using the reserved field name `type`. | ||
# TODO: Implement proper dynamic typing. | ||
TransformerPeftConfig.register_subclass(name.value, TransformerPeftConfig) | ||
|
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.
can we use tag
instead of type
to avoid this workaround?
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.
We could but I don't think it's worth it. The workaround won't stay long since I already have dynamic implementations in #245. Also keeping type
makes the transition easier since we're already keeping that name, eg. so config change or backward compatibility fix is needed.
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.
LGTM, merge when ready please
✨ Description
A simplified version of #245, with only the dynamic config support and its example usage for gpt datasets, i.e. excluding the further usage in cli and transformer sub-configs. I also made it more opt-in by making registries only on request and removing the global config registry.
🔍 Type of change
Select all that apply: