Skip to content

Latest commit

 

History

History
77 lines (47 loc) · 3.38 KB

ConfigFiles.md

File metadata and controls

77 lines (47 loc) · 3.38 KB

Configuration

A core element behind the agent is it's flexible and dynamic configuration. Loaded is the configuration from YAML files (conf/) with the help of the Hydra ghicon library, which in turn builds upon the flexible DictConfig from the omegaconf library.

The entry point to the configuration is the conf/launch_config.yaml file. Which defines high-level settings for the simulator and user-interface.

Hydra Framework

Hydra ghicon allows to manage the configuration in a flexible way. Configuration files are composed hierarchically from multiple sources. The different configuration options can be specified or overridden from the command line.

Additionally, Hydra also tracks and logs the output of experiments, for example each output of a run is stored in the outputs folder configured by hydra.run.dir in the {py:class}.LaunchConfig, likewise will recordings and a copy of the configuration of the experiment stored in this folder.

Launching Customized Experiments

Experiments with different configurations can launched over the command line like:

python AgentGameLoop.py \
        agent=leaderboard \
        experiments=[sync_on,fast_driver] \
        agent.ignore_traffic_lights=true

In the script is a with @hydra.main decorated main function that loads the configuration in the following way:

  • agent=leaderboard selects the main configuration from conf/agent/leaderboard.yaml. Default: conf/agent/default_settings.yaml.
  • experiments=[sync_on,fast_driver] merges the smaller configurations from conf/experiments/sync_on.yaml and conf/experiments/fast_driver.yaml on top.
  • agent.ignore_traffic_lights=true overrides a single option.

The order of the command line arguments do not matter. The resolution order picked from the conf/ directory is:

  1. launch_config.yaml
  2. agent/
  3. config_extensions/camera.yaml
  4. config_extension/job_logging.yaml
  5. experiments
  6. single command line overrides

:::{attention} The {py:meth}.GameFramework.quickstart method is currently not available when using @hydra.main. :::

:::{danger} Caveats

  • It is important to not leave any spaces around the = sign and the arguments that follow.
  • Use null for None values, None will be treated as a literal string.

:::

:::{seealso}

For more information about the command line syntax refer to Hydra override grammar.

:::

Launch Config

See also {py:class}.LaunchConfig

Agent Config vs. Context Config

The context config is a temporary clone of the agent's con

Agent Config Context Config
agent.config ctx.config
permanent temporary
updatable by actions manually automatically updated by {py:attr}.Rule.overwrite_settings
creates the context config used to calculate the VehicleControls