是否有一个选项可以从@hydra.main装饰器下的函数中获取配置对象作为字典?
我试过这样的东西,但它返回None
@hydra.main(config_path="conf", config_name="config")
def my_app(cfg) -> dict:
print(cfg) # --> work, the cfg object exists inside the function scope
return cfg
a = my_app()
print(a)
我知道我可以使用compose API,但我不喜欢使用它,因为它的功能有限(Tab 补全、Multirun 等)