hydra v1.0.0.rc1 Release Notes
Release Date: 2020-05-31 // almost 4 years ago-
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) (#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:job.name} (#325)
- ๐ Support for setting environment variable of running job (#7)
- ๐ Changes command line processing (requiring + and ~ prefixes for appending and removing items) (#598)
- ๐ฆ Introducing
@package
header for config files (#586) - Add command line override flags for
config_path
andconfig_name
(#386) - hydra.main() now take an optional cfg object to passthrough to the function (#575)
- Add hydra.experimental.{initialize_with_file, initialize_with_module} (#574)
- ๐ Support for disabling the creation of the
.hydra
subdirectory by overriding "hydra.output_subdir" to "null" (#324) - โ Add
hydra.utils.call()
to call methods and functions as well as instantiate objects. Search module paths more generically. (#498) - โ Add support for overriding package from command line and defaults list (#235)
- Config source is now abstracted, allowing additional config sources to be used (#257)
- ๐ New ConfigSource plugin API allowing configs to be provided by external plugins (#367)
- โ Add isort to ensure imports are always sorted (#340)
- Codebase is now passing mypy --strict type checking (#342)
- ๐ Improve performance of plugin discovery and instantiation (#489)
- ๐ Modules whose name starts with "_" are skipped during plugin discovery (#494)
๐ Plugins
- โ Add Ax Sweeper plugin (Shagun Sodhani)
- โ Add Nevergrad Sweeper plugin (Jรฉrรฉmy Rapin)
- โ Add Joblib Launcher plugin (Jan-Matthis)
- โ Add Submitit Launcher plugin to launch jobs to SLURM clusters
- โ Add Fish shell Tab Completion plugin (Binsheng Liu) (#549)
๐ API Change (Renames, deprecations and removals)
- โฌ๏ธ Drop support Python 2.7 and 3.5 (#313)
- ๐ hydra.main() now takes an additional optional config_name and composite-style config_path is deprecated (#395)
- ๐ท Launcher API launch method now takes an additional initial_job_idx indicating the id of the first job in the batch (#284)
- Singleton metaclass is now exposed at hydra.core.Singleton (#371)
- ๐ Moved HydraConfig from hydra.plugins.common.utils to hydra.core (#371)
- ๐ Move several formerly internal APIs to hydra/core to ensure plugins does not need to use internal APIs (#371)
- ๐ Plugin import now requires explicit name (from hydra.plugins.launcher import Launcher) (#371)
- ๐ Object Config "class" field is deprecated in favor of "cls" and will be removed in a future version. (#389)
- Experimental compose API config_file changed to config_name (#395)
- ๐ User plugins should be modified to not import twice during plugin discovery. see issue for details. (#482)
- ๐ Change hydra.core.plugins.Plugins class to a Singleton. access should be changed to the pattern Plugins.instance().foo() (#489)
- โ Plugins should now include test fixtures (sweep_runner, task_runner) via a standardized conftest.py (#521)
- ๐ Switch Python 3 native namespace packages for plugins (See task for details) (#534)
- Packaged configuration directories now requires an
__init__.py
at their top level (#536) - 0๏ธโฃ Appending config groups to the defaults list via the command line now requires a + prefix (#598)
- ๐ Removing an item from the defaults list by assigning null (db=null) is deprecated, use ~db instead (#598)
- Installed Hydra applications no longer need have an additional
entry()
function on the stack (#92)
๐ Bug Fixes
- ๐ Fix a bug causing sys.exit() error code to not be propagated (#351)
- ๐ท Shutdown logging subsystem aftter job finishes to ensure log files are flushed and closed (#378)
- ๐ Fix a bug with utils.instantiate() failing if params contains interpolated values. (#388)
- ๐ Allow hydra.utils.instantiate() to accept non primitive objects for passthrough by name (#400)
- ๐ Fix to work when an Hydra app is executed in Jupyter notebook using the %run command (#481)
- ๐ Plugins are no longer imported twice during plugin discovery (#482)
- to_absolute_dir(path) now converts relative path to be relative to os.cwd() when used outside of Hydra (#496)
๐ Improved Documentation
- ๐ Working examples are provided for all Hydra plugins in plugins/examples (#253)
- The basic tutorial was rewritten to reflect many changes (#602)
- โ Add a new tutorial covering Structured Configs (#628)