Evaluate reference with kwargs ?
witwolf opened this issue · 0 comments
witwolf commented
Sometimes it is necessary to pass the result of calling a specific function or class constructor. Gin supports "evaluating" configurable references via the @name() syntax, but do not support passing
kwargs , it's not flexible
For example, say we wanted to use the result of calling test_func
@gin.configurable
def test_func(a , b)
...
we should config as
scope/test_func.a='a'
scope/test_func.b='b'
ref=scope/test_func()
should it possible be simplified as
ref=scope/test_func(a='a', b='b')