How to use Hydra Config alongside user-defined parameters?

Viewed 16

Is there a way to use Hydra Config alongside other parameters?

I want some arguments to be defined in the code, and others to be read from the config file.

@hydra.main(config_path="conf", config_name="vehicle_manager")
def __init__(self, client: carla.Client, cfg: DictConfig) -> None :
  self.client = client
  self.traffic_manager = self.client.get_trafficmanager(cfg.tm_port)

The client will be provided by another module, and cfg should be read from the config file.

Is it possible to do so?

0 Answers
Related