hydra v1.0.0.rc1 Release Notes

Release Date: 2020-05-31 // over 1 year 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 and config_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

    ๐Ÿ—„ 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)