Principle:Facebookresearch Habitat lab Hydra Config Wiring
| Knowledge Sources | |
|---|---|
| Domains | Configuration_Management, Software_Architecture |
| Last Updated | 2026-02-15 02:00 GMT |
Overview
Programmatic injection of custom component configurations into the Habitat config hierarchy using the read_write context manager.
Description
Hydra Config Wiring is the process of adding custom sensor, measure, and action config dataclasses to the appropriate sections of the Habitat config (task.lab_sensors, task.measurements, task.actions). Since the composed config is normally frozen (read-only), modifications require the read_write context manager. This step connects the custom config definitions to the runtime config that Habitat uses to instantiate components.
Usage
Use after defining config dataclasses and before creating the Habitat environment. This is the bridge between custom config definitions and the Habitat runtime.
Theoretical Basis
The wiring process modifies the frozen config tree:
# Abstract config injection
config = get_config("base_config.yaml")
with read_write(config):
# Add custom sensor to config
config.habitat.task.lab_sensors["my_sensor"] = MySensorConfig()
# Add custom measure
config.habitat.task.measurements["my_measure"] = MyMeasureConfig()
# Add custom action
config.habitat.task.actions["my_action"] = MyActionConfig()
# Config is re-frozen after context exits