Skip to content
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

use Hydra and Hydra-zen for configuration management and loading #1618

Open
davidslater opened this issue Sep 22, 2022 · 3 comments
Open

use Hydra and Hydra-zen for configuration management and loading #1618

davidslater opened this issue Sep 22, 2022 · 3 comments
Assignees

Comments

@davidslater
Copy link
Contributor

https://hydra.cc/

Hydra-zen adds python things to it (pure python)
https://github.com/mit-ll-responsible-ai/hydra-zen

@davidslater
Copy link
Contributor Author

I think it could really simplify a lot of our command line, config parsing, python object loading, and config verification.

@mwartell
Copy link
Collaborator

Hydra-zen does offer some things that we have wanted for Armory.

It allows hierarchical dataclass-like initializing from declared defaults: an Experiment (config.json) can be composed of a Dataset, Attack, etc. You can also "subclass" with configuration overrides, for example, a carla_obj_det_dpatch_defended can be described as a carla_obj_det_dpatch_undefended plus a specific Defense override to what is null in the base case. Similarly, a performer could define a new Experiment as taking a dpatch_undefended base configuration and overriding just the parameters relevant to their defense.

Hydra-zen also creates detailed, datetime separated logs of how it was invoked and where parameter variants came from. This could naturally output to .armory/output_dir enriching the data output.json we currently put there.

The documentation is complete, but the learning curve is longer than I'd like because there seems to be a confusing amount of library specific boilerplate. If we use this though, it will be mostly set-and-forget, it seems.

@mwartell
Copy link
Collaborator

Related to #1698

@mwartell mwartell changed the title Consider Hydra and Hydra-zen for configuration management and loading use Hydra and Hydra-zen for configuration management and loading Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants