This is a simple Hydra application that prints your configuration.
my_app function is a place holder
for your code. We will slowly evolve this example to show-case more Hydra features.
The examples in this tutorial are available here.
import firstname.lastname@example.org()def my_app(cfg):print(cfg.pretty())if __name__ == "__main__":my_app()
cfg is an OmegaConf
object that holds the configuration for your function.
You don't need a deep understanding of OmegaConf for this tutorial.
We can pass arbitrary command line arguments from which Hydra creates a hierarchical configuration object:
$ python my_app.py db.driver=mysql db.user=omry db.pass=secretdb:driver: mysqlpass: secretuser: omry