157 add a config db table - #251
Open
pmslavin wants to merge 29 commits into
Open
Conversation
pmslavin
commented
Jan 28, 2025
| from hydra_base.lib.hydraconfig import ( | ||
| config_key_get_value | ||
| ) | ||
| """ |
Contributor
Author
There was a problem hiding this comment.
This use of inspect is present only to allow the CI tests to pass with hydra-client-python master, which uses the old config.get() syntax with .ini file sections.
Contributor
Author
|
See also corresponding hydra-client changes in hydraplatform/hydra-client-python#19 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes
hydra.iniand any other file-based config from Hydra configuration.Config values which are required by the start-up routines and/or are essential to the import of common modules are now defined as environment variables, see the
envsection in.github/workflows/ci.ymlfor examples.All other config values used at runtime may now be defined programatically and reside in the db. These are managed using the interface defined in
lib/hydraconfigand usage examples are found intests/test_hydraconfig.py.A
ConfigSetis introduced which represents a snapshot of the configuration state. These can be serialised along with an HMAC signature which verifies their correctness and origin. The filedefault_configset.json, or an equivalent file indicated by theHYDRA_CONFIGSETenv var contains an initial state for the Hydra startup routines and is loaded into the db once on the first run following deployment.The
config.get()function inhydra_base/config.pyno longer takes a "section" argument - all config keys exist in a single namespace without sections. It is recommended that config keys be given consistent and descriptive names which makes clear their role in Hydra and relation to otther keys.