whatisgithub

What is hydra?

facebookresearch/hydra — explained in plain English

Analysis updated 2026-06-24

10,360PythonAudience · researcherComplexity · 2/5LicenseSetup · easy

In one sentence

A Python framework from Meta that manages complex application configuration through composable YAML files with command-line overrides, especially popular for running machine learning experiments with different settings.

Mindmap

mindmap
  root((Hydra))
    What it does
      YAML config loading
      Config composition
      Command-line overrides
    Key features
      Config groups
      Multirun sweeps
      Structured configs
    Use cases
      ML experiments
      Large app settings
      Replace argparse
    Ecosystem
      Third-party plugins
      Training framework templates
      Python 3.10 to 3.14
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run ML experiments with different hyperparameters by overriding YAML config values from the command line without editing files.

USE CASE 2

Split a large application's settings across multiple YAML files that Hydra automatically merges at startup.

USE CASE 3

Replace boilerplate argparse argument-parsing code with structured, composable configuration files.

USE CASE 4

Use Hydra's multirun feature to sweep over a grid of hyperparameters in a single command.

What is it built with?

PythonYAMLpip

How does it compare?

facebookresearch/hydraharelba/qvega/altair
Stars10,36010,34710,375
LanguagePythonPythonPython
Setup difficultyeasyeasyeasy
Complexity2/52/52/5
Audienceresearcherdatadata

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Requires Python 3.10+ and familiarity with YAML syntax to get the most out of config composition.

Licensed under the MIT license, use freely for any purpose, including commercial projects, as long as you keep the copyright notice.

So what is it?

Hydra is a Python framework from Meta's research team that makes it easier to manage configuration in complex applications. Configuration refers to all the settings and options your program needs to run: things like which model to use, where to find data, what learning rate to apply, or which server to connect to. As applications grow, managing all these settings in a clean and flexible way becomes a real challenge. Hydra is built to solve that. The core idea is that you define your configuration in structured files (using a format called YAML), and Hydra loads and composes those files when your program starts. You can override any setting from the command line without changing the files, which makes it easy to run experiments with different parameters. You can also combine multiple configuration files together, so a large application can split its settings across many files that get merged at runtime. Hydra is especially popular in machine learning research, where people frequently run the same program many times with slightly different settings to compare results. It reduces the boilerplate involved in parsing command-line arguments and managing configuration across runs. A number of third-party libraries build on top of it, including templates that combine Hydra with popular training frameworks for convenience. Installation is a single pip command. The stable version is 1.3, and a development version (1.4) is available from source. It supports Python 3.10 through 3.14 and is licensed under the MIT open-source license. Documentation lives on the project's own website, and the community uses GitHub Discussions and StackOverflow for questions.

Copy-paste prompts

Prompt 1
I'm training a PyTorch model with Hydra. Write a Python training script with a Hydra config that lets me override learning_rate, batch_size, and model_name from the command line, and logs the final config to a file.
Prompt 2
Set up Hydra config groups so I can switch between a 'small' and a 'large' model by running `python train.py model=small` or `python train.py model=large`, each with different layer counts and hidden sizes.
Prompt 3
Show me how to use Hydra's multirun feature to grid-search over learning_rate=[0.001,0.01] and batch_size=[32,64], running all 4 combinations in sequence from a single command.

Frequently asked questions

What is hydra?

A Python framework from Meta that manages complex application configuration through composable YAML files with command-line overrides, especially popular for running machine learning experiments with different settings.

What language is hydra written in?

Mainly Python. The stack also includes Python, YAML, pip.

What license does hydra use?

Licensed under the MIT license, use freely for any purpose, including commercial projects, as long as you keep the copyright notice.

How hard is hydra to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is hydra for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.