def test_hydra_main_passthrough(hydra_restore_singletons: Any) -> None: initialize_with_file(file="tests/test_apps/app_with_cfg_groups/my_app.py", config_path="conf") from tests.test_apps.app_with_cfg_groups.my_app import my_app cfg = compose(config_name="config", overrides=["optimizer.lr=0.1"]) assert my_app(cfg) == {"optimizer": {"type": "nesterov", "lr": 0.1}}
def test_initialize_with_file(hydra_restore_singletons: Any) -> None: initialize_with_file(file="tests/test_apps/app_with_cfg_groups/my_app.py", config_path="conf") assert compose(config_name="config") == { "optimizer": { "type": "nesterov", "lr": 0.001 } }