gin-config
gin-config copied to clipboard
Binding to same value from multiple files
I wonder if it is/would be possible to bind multiple values to the same parameter via different config files. For instance:
File main.py
def myfunc(mylist):
print(mylist)
Gin-config file config1.gin
:
myfunc.mylist += 'apples'
Gin-config file config2.gin
:
myfunc.mylist += 'oranges'
Running the app
Then, when running the app, it should print:
['apples', 'oranges']
with the binding order based on the order of including 'config1.gin' and 'config2.gin'
Because I find this to be really valuable, I've made an implementation supporting dictionaries and lists here. I can make a PR if interested.