Say I have an abstract class db
in my code and classes db1
, db1
, ... db1
that inherit from db
.
My project uses hydra and has this structure:
├── my_app.py
├── conf.yaml
└── db
├── db1.yaml
├── db2.yaml
└── db3.yaml
I need a list of db
so I would like to get a final configuration file like this :
db:
-
param1_of_db1: key_1_1
param2_of_db1: key_1_2
-
param1_of_db2: key_2_1
param2_of_db2: key_2_2
-
param1_of_db3: key_3_1
param2_of_db3: key_3_2
so that db
is a list of params of db1
, db2
, db3
.
In conf.yaml
file, I imagine something like:
defaults:
- db: [db1, db2, db3]
Is there a way to do something like that ?