This is the most important concept in Hydra.
Suppose you want to benchmark PostgreSQL and MySQL for your application. When running of the application, you will need either MySQL or PostgreSQL - but not both.
The way to do this with Hydra is with a Config group. A config group is a mutually exclusive set of configuration files.
To create a config group, create a directory -
db - that will hold
a file for each database configuration alternative.
Since we are expecting to have multiple config groups, we will proactively move all the configuration
files into a
config_path can specify your config file as in the previous command line example, or the root directory for your configuration files.
If a config file is specified, its directory is the root directory.
The directory structure of our application now looks like:
If you run it, it prints an empty config because no configuration was specified.
You can now choose which database configuration to use from the command line:
Like before, you can still override individual values in the resulting config:
This simple example demonstrated a very powerful feature of Hydra: You can compose your configuration object from multiple configuration files.