id: terminology
title: Terminology
Overview
This page describes some of the common concepts in Hydra. Most of the concepts are described in much more details throughout the documentation.
Input Configs
Input configs are used to construct the config object used by the application.
Supported input configs are:
- Config Files (YAML files)
- Command line arguments
- Structured Configs (Python @dataclasses)
Primary Config
The input config named in @hydra.main() or in
the Compose API.
The Primary Config is the only config that is allowed to have a Defaults List
Structured Config
A @dataclass or an instance of a @dataclass that is used to construct a config. These enable both runtime and static type checking.
There are two primary patterns for using Structured configs:
- As an Input Config.
- As a schema validating Config Files and command line arguments.
@dataclass
class User:
name: str = MISSING
age: int = MISSING
Defaults List
A list in the Primary Config that determines how to build the final Config Object. The list is typically composed of Config Group Options.
defaults:
- db: mysql
- schema: school
Config Group
A Config Group is a mutually exclusive set of Config Group Options. Config Groups can be hierarchical and in that case the path elements are separated by a forward slash ('/') regardless of the operating system.
Config Group Option
One of the configs in a Config Group.
Config Node
A Config Node is either a Value Node (a primitive type), or a Container Node. A Container Node is a list or dictionary of Value Nodes.
Package
A Package is the path of the Config Node in the Config Object.
Package directive
The Package Directive specifies the root Package of an Config File
Example
# @package _group_
codename: '007'
mi6:
agent:
codename: '007'
- Config Group: mi6/agent
- Config Group Option: james_bond
- Container Nodes:
{codename: '007'}, . . . ,{mi6: {agent: {codename: '007'}}} - Value Node: '007'
- Packages
<empty>,mi6,mi6.agent,mi6.agent.codename - Package directive :
@package _group_, which expands tomi6.agent
Output Config Object
The config for the application. It is a dictionary of Config Nodes generated from the Input Configs.
Misc
Config Search Path
The Config Search Path is a list of paths that are searched in order to find configs. It is similar to the Python PYTHONPATH.
Plugins
Plugins extend Hydra's capabilities. Some examples are Launcher and Sweeper.