Hydra Documentation

website·Indexed 36 days ago

https://hydra.cc

Documentation for Hydra, a framework for configuring complex applications. Includes guides on structured configs, plugin installation for Ray, Submitit, Ax, and Nevergrad, and detailed migration paths for versions 0.11 through 1.4.

Tokens
179.7K
Snippets
1.1K
Records
1.4K
Agent score
70%

What's inside Hydra

  1. Overview of Hydra framework

    Hydra is an open-source Python framework designed to simplify the development of research and complex applications. Its primary functionality is the ability to dynamically create hierarchical configurations via composition and override them using configuration files or the command line. Key features include:

    • Hierarchical configuration composable from multiple sources
    • Command-line overrides for configuration values
    • Dynamic command-line tab completion
    • Support for local and remote application launching
    • Ability to run multiple jobs with different arguments using a single command (multirun).
  2. Overview of Hydra framework features

    Hydra is a Python framework designed to simplify the development of complex applications by allowing the dynamic creation of hierarchical configurations. Key capabilities include:

    • Composing configurations from multiple sources.
    • Overriding configuration values via the command line.
    • Dynamic command-line tab completion.
    • Local and remote application launching.
    • Running multiple jobs with different arguments using a single command (multirun).
  3. Overview of Hydra configuration framework

    Hydra is an open-source Python framework designed to simplify the development of research and complex applications. Its primary capability is the dynamic creation of hierarchical configurations through composition, which can be further overridden via configuration files or the command line. Key features include:

    • Hierarchical configuration composable from multiple sources
    • Command-line overrides for configuration values
    • Dynamic command-line tab completion
    • Support for local and remote application launching
    • Ability to run multiple jobs with different arguments using a single command (multirun)
  4. Overview of Hydra Structured Configs

    Structured Configs in Hydra use Python dataclasses to define the structure and types of a configuration. This approach provides two main benefits: runtime type checking during config composition or mutation, and static type checking support for tools like mypy or PyCharm.
  5. Overview of Hydra's configuration and architecture

    Hydra is a framework designed to eliminate boilerplate code associated with command line flags, configuration file loading, and logging. It features a dynamic configuration system that allows users to compose configurations and override any parameter directly from the command line, facilitating rapid experimentation without the need for multiple static configuration files. Additionally, Hydra uses a pluggable architecture to integrate with various infrastructures and cloud providers.
  6. Overview of Hydra framework

    Hydra is an open-source Python framework designed to simplify the development of complex applications and research projects. Its primary capability is the dynamic creation of hierarchical configurations through composition, which can be overridden via configuration files or the command line. Key features include command line tab completion, remote launch capabilities, and the ability to run multiple jobs with different arguments using a single command.
  7. Overview of Hydra configuration framework

    Hydra is an open-source Python framework designed to simplify the development of research and complex applications. Its primary capability is the dynamic creation of hierarchical configurations via composition, which can be overridden using configuration files or the command line. Key features include:

    • Hierarchical configuration composable from multiple sources
    • Command-line overrides for configuration values
    • Dynamic command-line tab completion
    • Support for local and remote application launching
    • Ability to run multiple jobs with different arguments using a single command (multirun)
  8. Overview of Hydra framework

    Hydra is an open-source Python framework designed to simplify the development of research and complex applications. Its primary capability is the dynamic creation of hierarchical configurations through composition, which can be overridden via config files or the command line. Key features include:

    • Hierarchical configuration from multiple sources
    • Command-line overrides
    • Dynamic command-line tab completion
    • Local and remote application launching
    • Multirun capabilities to execute multiple jobs with different arguments in a single command.
  9. Understand Hydra multirun execution and plugins

    By default, Hydra runs multirun jobs locally and serially. To change this behavior, you can use plugins:

    • Sweepers: The default is BasicSweeper. Plugins like the Ax Sweeper can automatically optimize parameter combinations.
    • Launchers: Plugins like the JobLib Launcher allow executing parameter combinations in parallel on a local machine using multi-processing.

    Caveat: Hydra composes configs lazily at job launching time. Changes to code or configs after launching a sweep may impact the final composed configurations.

  10. Retrieve Hydra system information using --info

    Use the --info flag to print detailed diagnostic information about the Hydra runtime. This includes the config search path, profiling information, the composition trace, and the final resolved configuration.
    python my_app.py --info
  11. Inspect Hydra system and composition info with --info

    The --info flag provides diagnostic information about the Hydra environment and configuration composition. Available options include:

    • all: Prints all available information (default).
    • config: Prints the Config Search Path, Defaults Tree, Defaults List, and the final config.
    • defaults: Prints the Final Defaults List.
    • defaults-tree: Prints the Defaults Tree.
    • plugins: Prints information about installed plugins.
    # Example: Print only plugin information
    python my_app.py --info plugins
    
    # Example: Print defaults tree
    python my_app.py --info defaults-tree
  12. Understand Hydra Input and Output Configs

    In Hydra, Input Configs are the raw building blocks (YAML files or Structured Configs) used to construct the final configuration. The Primary Config is the specific input config named in @hydra.main() or the Compose API. The Output Config is the final result produced after Hydra composes the Input Configs and applies any Overrides.