Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:Facebookresearch Habitat lab Configuration Composition

From Leeroopedia
Knowledge Sources
Domains Configuration_Management, Software_Architecture
Last Updated 2026-02-15 02:00 GMT

Overview

A hierarchical configuration composition pattern that merges YAML-defined defaults with runtime overrides to produce a single immutable experiment configuration.

Description

Configuration Composition in Habitat-Lab uses the Hydra framework with OmegaConf to compose experiment configurations from multiple YAML fragments. The system follows a layered approach: base defaults define the framework structure, task-specific configs add sensor/measure/action definitions, and experiment configs overlay training hyperparameters. Runtime CLI overrides provide final customization.

This pattern decouples experiment definition from code, enabling reproducible experiments through config files alone. The structured config dataclasses provide type-safety and IDE support.

Usage

Use this principle whenever launching a training run, evaluation, or interactive session. Configuration composition is the universal entry point for all Habitat workflows.

Theoretical Basis

The composition follows a precedence chain:

  1. Structured defaults: Python dataclasses define typed schema with default values
  2. YAML base configs: Task/simulator/dataset YAML fragments are composed via Hydra defaults lists
  3. Experiment overrides: Experiment-specific YAML files set training hyperparameters
  4. CLI overrides: Runtime arguments override any prior value (highest precedence)

Pseudo-code:

# Abstract composition algorithm
config = merge(
    structured_defaults,     # Python dataclasses
    yaml_base_configs,       # Hydra defaults composition
    experiment_overrides,    # Experiment YAML
    cli_overrides            # Runtime arguments
)
config = freeze(config)      # Make immutable

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment