You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This may be kinda hacky, but what if I wanted to use some function and only define it via gin file,
so this is the solution I came up with:
Function:
#utils.py@gin.configurabledefarbitrary_func(module_name, func_name, kwargs):
"""Returns a function from a module."""module=importlib.import_module(module_name)
func=getattr(module, func_name)
returnfunc(**kwargs)
This may be kinda hacky, but what if I wanted to use some function and only define it via gin file,
so this is the solution I came up with:
Function:
Gin file:
let me know what you think.
The text was updated successfully, but these errors were encountered: