-
Notifications
You must be signed in to change notification settings - Fork 457
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
Cast DictConfig -> dict in instantiate #1450
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchtune/1450
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 87bf24d with merge base 4fba6cd (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1450 +/- ##
==========================================
- Coverage 70.01% 69.79% -0.23%
==========================================
Files 268 271 +3
Lines 12937 13052 +115
==========================================
+ Hits 9058 9109 +51
- Misses 3879 3943 +64 ☔ View full report in Codecov by Sentry. |
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.
good thing we have the config instantiation tests for all our configs, otherwise I would be very nervous
@@ -103,4 +103,4 @@ def instantiate( | |||
# Resolve all interpolations, or references to other fields within the same config | |||
OmegaConf.resolve(config) | |||
|
|||
return _instantiate_node(config, *args) | |||
return _instantiate_node(OmegaConf.to_object(config), *args) |
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 should update the typing of _instantiate_node
since now you're passing in a dict instead of DictConfig
Fixes #1444
Tested via
Logged
type(lora_modules)
here.On main:
<class 'omegaconf.listconfig.ListConfig'>
On this PR:
<class 'list'>