hydra-core
A framework for elegantly configuring complex applications
Description
<p align="center"><img src="https://raw.githubusercontent.com/facebookresearch/hydra/master/website/static/img/Hydra-Readme-logo2.svg" alt="logo" width="70%" /></p> <p align="center"> <a href="https://pypi.org/project/hydra-core/"> <img src="https://img.shields.io/pypi/v/hydra-core" alt="PyPI" /> </a> <a href="https://circleci.com/gh/facebookresearch/hydra"> <img src="https://img.shields.io/circleci/build/github/facebookresearch/hydra?token=af199cd2deca9e70e53776f9ded96284b10687e9" alt="CircleCI" /> </a> <a href="#"> <img src="https://img.shields.io/pypi/l/hydra-core" alt="PyPI - License" /> </a> <a href="#"> <img src="https://img.shields.io/pypi/pyversions/hydra-core" alt="PyPI - Python Version" /> </a> <a href="https://pepy.tech/project/hydra-core?versions=0.11.*&versions=1.0.*&versions=1.1.*"> <img src="https://pepy.tech/badge/hydra-core/month" alt="Downloads" /> </a> <a href="https://github.com/psf/black"> <img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black" /> </a> <a href="https://lgtm.com/projects/g/facebookresearch/hydra/alerts/"> <img src="https://img.shields.io/lgtm/alerts/g/facebookresearch/hydra.svg?logo=lgtm&logoWidth=18" alt="Total alerts" /> </a> <a href="https://lgtm.com/projects/g/facebookresearch/hydra/context:python"> <img src="https://img.shields.io/lgtm/grade/python/g/facebookresearch/hydra.svg?logo=lgtm&logoWidth=18" alt="Language grade: Python" /> </a> <p align="center"> <i>A framework for elegantly configuring complex applications.</i> </p> <p align="center"> <i>Check the <a href="https://hydra.cc/">website</a> for more information,<br> or click the thumbnail below for a one-minute video introduction to Hydra.</i> </p> <p align="center"> <a href="http://www.youtube.com/watch?feature=player_embedded&v=Slc3gRQpnBI" target="_blank"> <img src="http://img.youtube.com/vi/Slc3gRQpnBI/hqdefault.jpg" alt="1 minute overview" width="240" height="180" border="10" /> </a> </p> </p> ---------------------- ### Releases #### Stable **Hydra 1.3** is the stable version of Hydra. - [Documentation](https://hydra.cc/docs/1.3/intro/) - Installation : `pip install hydra-core --upgrade` See the [NEWS.md](NEWS.md) file for a summary of recent changes to Hydra. ### License Hydra is licensed under [MIT License](LICENSE). ## Hydra Ecosystem #### Check out these third-party libraries that build on Hydra's functionality: * [hydra-zen](https://github.com/mit-ll-responsible-ai/hydra-zen): Pythonic utilities for working with Hydra. Dynamic config generation capabilities, enhanced config store features, a Python API for launching Hydra jobs, and more. * [lightning-hydra-template](https://github.com/ashleve/lightning-hydra-template): user-friendly template combining Hydra with [Pytorch-Lightning](https://github.com/Lightning-AI/lightning) for ML experimentation. * [hydra-torch](https://github.com/pytorch/hydra-torch): [configen](https://github.com/facebookresearch/hydra/tree/main/tools/configen)-generated configuration classes enabling type-safe PyTorch configuration for Hydra apps. * NVIDIA's DeepLearningExamples repository contains a Hydra Launcher plugin, the [distributed_launcher](https://github.com/NVIDIA/DeepLearningExamples/tree/9c34e35c218514b8607d7cf381d8a982a01175e9/Tools/PyTorch/TimeSeriesPredictionPlatform/distributed_launcher), which makes use of the pytorch [distributed.launch](https://pytorch.org/docs/stable/distributed.html#launch-utility) API. #### Ask questions in Github Discussions or StackOverflow (Use the tag #fb-hydra or #omegaconf): * [Github Discussions](https://github.com/facebookresearch/hydra/discussions) * [StackOverflow](https://stackexchange.com/filters/391828/hydra-questions) * [Twitter](https://twitter.com/Hydra_Framework) Check out the Meta AI [blog post](https://ai.facebook.com/blog/reengineering-facebook-ais-deep-learning-platforms-for-interoperability/) to learn about how Hydra fits into Meta's efforts to reengineer deep learning platforms for interoperability. ### Citing Hydra If you use Hydra in your research please use the following BibTeX entry: ```BibTeX @Misc{Yadan2019Hydra, author = {Omry Yadan}, title = {Hydra - A framework for elegantly configuring complex applications}, howpublished = {Github}, year = {2019}, url = {https://github.com/facebookresearch/hydra} } ```
Release History
| Version | Changes | Urgency | Date |
|---|---|---|---|
| 1.3.2 | Imported from PyPI (1.3.2) | Low | 4/21/2026 |
| v1.3.2 | 1.3.2 (2023-02-22) ================== ### Features - Add a `hydra.utils.get_object` function that gives users access to Hydra's dotpath-lookup machinery. ([#2139](https://github.com/facebookresearch/hydra/issues/2139)) - Allow config_path to specify a non-relative module path, by starting with `pkg://` ([#2564](https://github.com/facebookresearch/hydra/issues/2564)) ### Maintenance Changes - Drop support for python3.6 ([#2304](https://github.com/facebookresearch/hydra/issues/2304)) | Low | 2/23/2023 |
| v1.3.1 | 1.3.1 (2022-12-20) ================== This bugfix release updates a version pin on the OmegaConf library, allowing Hydra to be installed alongside the latest version of OmegaConf. ### Bug Fixes - Relax OmegaConf pin allowing OmegaConf 2.3 to be installed ([#2510](https://github.com/facebookresearch/hydra/issues/2510)) ### Links: - [Hydra on pypi](https://pypi.org/project/hydra-core/) - [Hydra 1.3 docs](https://hydra.cc/docs/1.3/intro/) | Low | 12/21/2022 |
| v1.3.0 | 1.3.0 (2022-12-08) ================== ### Features: - Implement `_convert_="object"` option for `instantiate`, enabling conversion of non-`_target_` structured configs to instances of the backing dataclass / attr class. ([#1719](https://github.com/facebookresearch/hydra/issues/1719)) - Enable layering of the `@hydra.main` decorator on top of other decorators produced using `functools.wraps`. ([#2303](https://github.com/facebookresearch/hydra/issues/2303)) - Allow for non-leading dashes | Low | 12/8/2022 |
| v1.2.0 | 1.2.0 (2022-05-17) ================== ### Bug fixes - `hydra.runtime.choices` is now updated correctly during multi-run ([#1882](https://github.com/facebookresearch/hydra/issues/1882)) - `hydra.verbose=True` now works with multirun. ([#1897](https://github.com/facebookresearch/hydra/issues/1897)) - Fix a resolution error occurring when a nested class is passed as a `_target_` keyword argument to `instantiate` ([#1914](https://github.com/facebookresearch/hydra/issues/1914)) - It is now | Low | 5/17/2022 |
| v1.1.2 | # 1.1.2 (2022-04-12) ### Features - Add support to Hydra's instantiation API for creation of `functools.partial` instances via a `_partial_` keyword. ([#1283](https://github.com/facebookresearch/hydra/issues/1283)) - The `instantiate` API now accepts `ListConfig`/`list`-type config as top-level input. ([#1950](https://github.com/facebookresearch/hydra/issues/1950)) - Improve error messages raised in case of instantiation failure. ([#2099](https://github.com/facebookresearch/hydra/issues/ | Low | 4/12/2022 |
| v1.1.1 | 1.1.1 (2021-08-19) ================== ### Features - Allow range() in override grammar to have only one argument (the stop value), e.g. range(3) ([#1664](https://github.com/facebookresearch/hydra/issues/1664)) - Add support for a HYDRA_DEPRECATION_WARNINGS_AS_ERRORS envorinment variable. When it is set, using deprecated features causes an exception instead of a warning. ([#1689](https://github.com/facebookresearch/hydra/issues/1689)) - To make migration from Hydra 1.0 to 1.1 easier, Hyd | Low | 8/19/2021 |
| v1.0.7 | 1.0.7 (2021-07-14) ================== This release contains a few small changes to make Hydra 1.0 a bit more compatible with OmegaConf 2.1 and Hydra 1.1 to enable easier migration. There is no risk in using it if you are using 1.0.6 now as it just makes the migration a bit smoother in some scenarios: 1. If you are upgrading OmegaConf to 2.1 before upgrading Hydra to 1.1. 2. It enables some configs to be compatible with both versions in some rare cases related to the change in the default co | Low | 7/15/2021 |
| v1.1.0 | 1.1.0 (2021-06-09) ================== This is the biggest Hydra release yet. #### Highlights - OmegaConf 2.1 supports relative interpolations, nested interpolations, more powerful resolvers and better compatibility with plain Python dict and list. - Recursive defaults list: Every config can now have a Defaults List. - Recursive instantiation: When instantiating objects using the `instantiate` API, nested defined objects are instantiated automatically. There have also been many bug f | Low | 6/10/2021 |
| v1.1.0.rc1 | 1.1.0.rc1 (2021-05-13) ====================== This is the biggest Hydra release yet. #### Highlights - OmegaConf 2.1 supports relative interpolations, nested interpolations, more powerful resolvers and better compatibility with plain Python dict and list. - Recursive defaults list: Every config can now have a Defaults List. - Recursive instantiation: When instantiating objects using the `instantiate` API, nested defined objects are instantiated automatically. There have also been ma | Low | 5/13/2021 |
| v1.1.0.dev6 | The following are informal release notes for Hydra 1.1 as of the publication of 1.1.0.dev6. Note that there are many changes in OmegaConf 2.1 that are not covered by these release notes. Once OmegaConf 2.1 is officially release it will have formal release notes. ### Features - Support for converting parameters to primitive containers during instantiation ([#1015](https://github.com/facebookresearch/hydra/issues/1015)) - It is now possible to override the _target_ of instantiation with a | Low | 4/28/2021 |
| v1.0.6 | 1.0.6 (2021-01-29) ================== ### Bug Fixes - Fix interpolation in Hydra config node ([#1335](https://github.com/facebookresearch/hydra/issues/1335)) ### Maintenance Changes - Remove `Plugins` from `Singleton.get_state()` ([#1330](https://github.com/facebookresearch/hydra/issues/1330)) | Low | 2/1/2021 |
| v1.0.5 | 1.0.5 (2021-01-07) ================== ### Features - Support Python 3.9 . ([#1062](https://github.com/facebookresearch/hydra/issues/1062)) ### API Change (Renames, deprecations and removals) - Deprecate support for renaming packages via the command line. ([#1140](https://github.com/facebookresearch/hydra/issues/1140)) ### Bug Fixes - Fixed hydra.job.id and hydra.job.num not getting passed to jobs in multirun ([#1270](https://github.com/facebookresearch/hydra/issues/1270)) # | Low | 1/7/2021 |
| v1.0.4 | 1.0.4 (2020-11-17) ================== ### Bug Fixes - Hydra no longer errorenously changes the USER environment variable in pytest unit tests once installed ([#1059](https://github.com/facebookresearch/hydra/issues/1059)) - Allow @ symbol in unquoted values in overrides ([#1074](https://github.com/facebookresearch/hydra/issues/1074)) - Fix a bug where Structured Config has a field like 'list : Optional[List[int]] = None` ([#1117](https://github.com/facebookresearch/hydra/issues/1117)) | Low | 11/18/2020 |
| v1.0.3 | 1.0.3 (2020-09-22) ================== ### Bug Fixes - Fixed interaction between interpolation and instantiate ([#1001](https://github.com/facebookresearch/hydra/issues/1001)) - Fix float parsing for values where the exponent starts with 0 (e.g 1e-05) ([#999](https://github.com/facebookresearch/hydra/issues/999)) | Low | 9/23/2020 |
| v1.0.2 | 1.0.2 (2020-09-20) ================== This is a small update improving support for config dataclasses generated by [configen](tools/configen). ### Features - Overridden parameters annotated as Any in the config are not type checked by instantiate() ([#982](https://github.com/facebookresearch/hydra/issues/982)) | Low | 9/20/2020 |
| v1.0.1 | 1.0.1 (2020-09-15) ================== ### Features - Add ability to escape special characters in unquoted command line values ([#954](https://github.com/facebookresearch/hydra/issues/954)) ### Bug Fixes - Add support for merging dicts and lists specified in the commend line ([#939](https://github.com/facebookresearch/hydra/issues/939)) - Fix appending dict values with new fields to config with + ([#946](https://github.com/facebookresearch/hydra/issues/946)) - Fix for Override Gram | Low | 9/15/2020 |
| v1.0.0 | 1.0.0 (2020-09-03) ================== Hydra 1.0 is out! See [blog post](https://hydra.cc/blog/2020/09/03/Hydra_1.0) for high level details. Major new features in Hydra 1.0 * Config type safety via Structured Configs * More powerful command line * New plugins enabling remote launching and hyper parameter optimization * Improved error reporting * Reduce nesting levels with config packages These release notes are covering the changes since 1.0.0rc4. To see the complete release note | Low | 9/3/2020 |
| v0.11.3 | 0.11.3 (2019-12-29) =================== Bug Fixes --------- - Pin Hydra 0.11 to OmegaConf 1.4 to avoid breaking compatibility when OmegaConf 2.0 is released ([#334](https://github.com/facebookresearch/hydra/issues/334)) Improved Documentation ---------------------- - Document a simple Ray example ([#317](https://github.com/facebookresearch/hydra/issues/317)) | Low | 8/18/2020 |
| v1.0.0rc1 | 1.0.0-rc1 (2020-05-31) ====================== Hydra 1.0 is a major release introducing many new features and breaking some compatibility. Features -------- - Upgrade to OmegaConf 2.0 ([Release notes](https://github.com/omry/omegaconf/releases/tag/2.0.0)) (#630) - Optional config type safety via Structured Configs (#629) - Improve command line and config composition error reporting (#349) - Hydra config can now be accessed through interpolation using ${hydra:key}, for example ${hydra:jo | Low | 8/18/2020 |
| v1.0.0rc4 | 1.0.0rc4 (2020-08-18) ===================== ### Features - Upgrade to OmegaConf 2.0.1rc12 ([#889](https://github.com/facebookresearch/hydra/issues/889)) ### Bug Fixes - Fix bug with bash autocompletion for the users who has `.` in their PATH environment variable ([#868](https://github.com/facebookresearch/hydra/issues/868)) - Fix instantiate to return None when None config is passed ([#887](https://github.com/facebookresearch/hydra/issues/887)) | Low | 8/18/2020 |
| v1.0.0rc3 | 1.0.0rc3 (2020-08-17) ===================== Features -------- - Extended Override grammar supports range(),glob(),type casts,shuffle, sort and more. ([#752](https://github.com/facebookresearch/hydra/issues/752)) - Add support for specifying an additional config dir in the command line ([#874](https://github.com/facebookresearch/hydra/issues/874)) - Allow overriding of the `defaults` and `hydra` nodes in primary Structured Configs that does not mentioned `defaults` and `hydra`. ([#877]( | Low | 8/17/2020 |
| v1.0.0rc2 | 1.0.0rc2 (2020-07-18) ===================== Features -------- - Introducing a DSL for the command line override syntax ([#797](https://github.com/facebookresearch/hydra/issues/797)) - Sanitize exception messages by default, showing only interesting stack frames ([#646](https://github.com/facebookresearch/hydra/issues/646)) - Add a new --info flag to show Hydra debug information without running the user function. ([#662](https://github.com/facebookresearch/hydra/issues/662)) - Add --pa | Low | 7/18/2020 |
