确认Hydra递归实例化PR支持层级对象实例化及相关问询
Hey Hugh! Let's tackle your Hydra-related questions one by one:
1. Does the recursive instantiation PR support your config and code?
Absolutely! That PR is built specifically to handle nested object instantiation exactly like your setup.
Your YAML config uses nested _target_ fields for lightning_module and data_module under the top-level runner—this is precisely the scenario the PR addresses. When you call hydra.utils.instantiate(cfg), Hydra will recursively instantiate all nested objects automatically:
- First, it will instantiate
MyLightingModulewith the specifiedprecision: 16 - Then, it will instantiate
MyDataModulewith your S3 data paths - Finally, it will pass these already-instantiated modules to
my_module.Runner
So your existing code flow (runner = hydra.utils.instantiate(cfg) followed by runner.run()) will work perfectly once the PR's functionality is included in a released version of Hydra.
2. When will the merged PR be released?
The PR has been merged into Hydra's main branch, but the exact release timeline depends on the project's planned version updates. Typically, features like recursive instantiation are included in the next minor or major stable release.
To stay in the loop, keep an eye on Hydra's official release notes—this feature will be clearly highlighted when it rolls out to a publicly available version.
3. Better channels for feature-related questions
While Stack Overflow works well for general usage troubleshooting, for feature requests, design discussions, or Hydra-specific deep dives, these channels are more appropriate and aligned with the project's norms:
- GitHub Discussions: The official community space for talking through Hydra's roadmap, feature ideas, and best practices—core maintainers actively engage here.
- Official Slack Community: A real-time chat space where you can connect with other Hydra users and contributors, great for quick feedback or brainstorming.
- GitHub Issues: If you have a concrete feature proposal or bug report (always search existing issues first to avoid duplicates), this is the right place to formalize your request.
内容的提问来源于stack exchange,提问作者Hugh Perkins

