Organizing Hydra-Zen code: multiple or single file? #796
Unanswered
miguelbper
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, and thanks a lot for this nice project 🙂. I am trying to learn Hydra and Hydra-Zen. My goal with this question is to understand a bit better how config organization with Hydra-Zen was originally "envisioned": put all configs inside a file
config.py, or separate that file into subfiles and folders? I imagine that both options can be used and that depending on the project one might be better than the other. Let me elaborate a bit on my question, and feel free to correct any flaws on my understanding of Hydra / Hydra-Zen below..yamlfiles is meant to be used with a configs folder, with multiple folders inside and many.yamlfiles. For example, this nice deep learning project template lightning-hydra-template showcases such a config folder hierarchy.config.pyfile. The examples in responsible-ai-toolbox also seemed to follow the pattern of singleconfig.pyfile. As far as I understand, this is possible because the config group is specified in code instead of being inferred from the directory structure as in "usual" Hydra with.yamlfiles.So my question(s) would be: is it considered a Hydra-Zen "best practice" to place all configs in a single file? Or at least, was Hydra-Zen designed to be used in that way, in most cases? Or is it the case that I'm just reading too much into the examples provided in the docs, and that the single file config is just because such a structure is desirable in a tutorial / documentation setting? Is there some kind of recommendation of when to choose one or the other? I'm basically just trying to understand how the creators of the package would use themselves use the package when solving a new problem.
Again thanks to the creators for this project, packages like Hydra and Hydra-Zen make organized ML code significantly easier to write.
Beta Was this translation helpful? Give feedback.
All reactions