hydra-core 1.4.0.dev8__tar.gz → 1.4.0.dev9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hydra_core-1.4.0.dev8/hydra_core.egg-info → hydra_core-1.4.0.dev9}/PKG-INFO +26 -16
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/README.md +22 -12
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/__init__.py +1 -1
- hydra_core-1.4.0.dev9/hydra/_internal/_locate.py +58 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/config_repository.py +17 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/core_plugins/basic_launcher.py +10 -2
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/defaults_list.py +101 -4
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/grammar/grammar_functions.py +2 -2
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/hydra.py +7 -2
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/instantiate/_instantiate2.py +436 -320
- hydra_core-1.4.0.dev9/hydra/_internal/logging_config.py +345 -0
- hydra_core-1.4.0.dev9/hydra/_internal/target_policy.py +1131 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/utils.py +6 -55
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/core/default_element.py +16 -1
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/core/override_parser/overrides_visitor.py +1 -1
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/core/plugins.py +1 -1
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/core/utils.py +32 -2
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/main.py +26 -18
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/types.py +1 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/utils.py +7 -5
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9/hydra_core.egg-info}/PKG-INFO +26 -16
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra_core.egg-info/SOURCES.txt +4 -0
- hydra_core-1.4.0.dev9/hydra_core.egg-info/requires.txt +1 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/pyproject.toml +2 -2
- hydra_core-1.4.0.dev9/requirements/requirements.txt +1 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/setup.py +2 -2
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/tests/test_basic_sweeper.py +0 -2
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/tests/test_compose.py +1 -1
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/tests/test_core_utils.py +30 -2
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/tests/test_hydra.py +2 -13
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/tests/test_hydra_cli_errors.py +0 -4
- hydra_core-1.4.0.dev9/tests/test_logging_config.py +590 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/tests/test_overrides_parser.py +2 -2
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/tests/test_utils.py +1 -6
- hydra_core-1.4.0.dev8/hydra_core.egg-info/requires.txt +0 -1
- hydra_core-1.4.0.dev8/requirements/requirements.txt +0 -1
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/LICENSE +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/MANIFEST.in +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/build_helpers/__init__.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/build_helpers/bin/__init__.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/build_helpers/bin/antlr-4.11.1-complete.jar +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/build_helpers/build_helpers.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/build_helpers/test_helpers.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/__init__.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/callbacks.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/config_loader_impl.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/config_search_path_impl.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/core_plugins/__init__.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/core_plugins/bash_completion.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/core_plugins/basic_sweeper.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/core_plugins/file_config_source.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/core_plugins/fish_completion.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/core_plugins/importlib_resources_config_source.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/core_plugins/structured_config_source.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/core_plugins/zsh_completion.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/deprecation_warning.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/grammar/__init__.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/grammar/functions.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/grammar/utils.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/instantiate/__init__.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/sources_registry.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/compose.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/conf/__init__.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/conf/hydra/env/default.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/conf/hydra/help/default.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/conf/hydra/hydra_help/default.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/conf/hydra/hydra_logging/default.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/conf/hydra/hydra_logging/disabled.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/conf/hydra/hydra_logging/hydra_debug.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/conf/hydra/hydra_logging/none.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/conf/hydra/job_logging/default.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/conf/hydra/job_logging/disabled.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/conf/hydra/job_logging/none.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/conf/hydra/job_logging/stdout.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/conf/hydra/output/default.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/core/__init__.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/core/config_loader.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/core/config_search_path.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/core/config_store.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/core/global_hydra.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/core/hydra_config.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/core/object_type.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/core/override_parser/__init__.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/core/override_parser/overrides_parser.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/core/override_parser/types.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/core/singleton.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/errors.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/experimental/__init__.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/experimental/callback.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/experimental/callbacks.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/extra/pytest_plugin.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/grammar/.gitignore +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/grammar/OverrideLexer.g4 +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/grammar/OverrideParser.g4 +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/grammar/__init__.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/grammar/gen/.gitignore +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/grammar/gen/OverrideLexer.interp +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/grammar/gen/OverrideLexer.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/grammar/gen/OverrideLexer.tokens +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/grammar/gen/OverrideParser.interp +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/grammar/gen/OverrideParser.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/grammar/gen/OverrideParser.tokens +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/grammar/gen/OverrideParserListener.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/grammar/gen/OverrideParserVisitor.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/initialize.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/plugins/__init__.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/plugins/completion_plugin.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/plugins/config_source.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/plugins/launcher.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/plugins/plugin.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/plugins/search_path_plugin.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/plugins/sweeper.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/py.typed +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/__init__.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/a_module.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/completion.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/config_source_common_tests.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/__init__.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/accessing_hydra_config.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/completion_test/additional_searchpath.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/completion_test/config.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/completion_test/group/dict.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/completion_test/group/list.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/completion_test/hydra/launcher/fairtask.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/completion_test/missing_default.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/completion_test/test_hydra/launcher/fairtask.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/completion_test_additional_file/additional_group/file_opt_additional.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/completion_test_additional_file/group/file_opt.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/completion_test_additional_package/__init__.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/completion_test_additional_package/additional_group/pkg_opt_additional.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/completion_test_additional_package/group/pkg_opt.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/compose.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/conf.zip +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/config.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/config.yml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/custom_resolver.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/db/mysql.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/db/postgresql.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/db/validated_mysql.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/db/validated_postgresql.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/db_conf.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/defaults_not_list.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/group1/abc.cde.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/group1/file1.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/group1/file2.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/group2/file1.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/group2/file2.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/missing-default.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/missing-optional-default.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/missing_init_py/.gitignore +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/missing_init_py/test.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/optional-default.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/overriding_output_dir.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/overriding_run_dir.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/package_tests/__init__.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/package_tests/group1/option1.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/package_tests/group1/option2.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/package_tests/group2/option1.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/package_tests/group2/option2.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/package_tests/pkg_override.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/package_tests/two_packages_one_group.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/schema_key_error.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/schema_validation_error.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/some_config.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/top_level_list/file1.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/configs/unspecified_mandatory_default.yaml +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/example_app.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/launcher_common_tests.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/test_utils/test_utils.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/version.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra_core.egg-info/dependency_links.txt +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra_core.egg-info/entry_points.txt +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra_core.egg-info/top_level.txt +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/setup.cfg +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/tests/test_basic_launcher.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/tests/test_callbacks.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/tests/test_completion.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/tests/test_config_loader.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/tests/test_config_repository.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/tests/test_config_search_path.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/tests/test_env_defaults.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/tests/test_errors.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/tests/test_hydra_context_warnings.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/tests/test_internal_utils.py +0 -0
- {hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/tests/test_plugin_interface.py +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hydra-core
|
|
3
|
-
Version: 1.4.0.
|
|
3
|
+
Version: 1.4.0.dev9
|
|
4
4
|
Summary: A framework for elegantly configuring complex applications
|
|
5
|
-
Home-page: https://github.com/
|
|
5
|
+
Home-page: https://github.com/hydra-ecosystem/hydra
|
|
6
6
|
Author: Omry Yadan
|
|
7
|
-
Author-email: omry@
|
|
7
|
+
Author-email: omry@yadan.net
|
|
8
8
|
License: MIT
|
|
9
9
|
Keywords: command-line configuration yaml tab-completion
|
|
10
10
|
Classifier: Development Status :: 4 - Beta
|
|
@@ -19,7 +19,7 @@ Classifier: Operating System :: Microsoft :: Windows
|
|
|
19
19
|
Requires-Python: >=3.10
|
|
20
20
|
Description-Content-Type: text/markdown
|
|
21
21
|
License-File: LICENSE
|
|
22
|
-
Requires-Dist: omegaconf>=2.4.0.
|
|
22
|
+
Requires-Dist: omegaconf>=2.4.0.dev15
|
|
23
23
|
Dynamic: author
|
|
24
24
|
Dynamic: author-email
|
|
25
25
|
Dynamic: classifier
|
|
@@ -33,17 +33,19 @@ Dynamic: requires-dist
|
|
|
33
33
|
Dynamic: requires-python
|
|
34
34
|
Dynamic: summary
|
|
35
35
|
|
|
36
|
-
<p align="center"><img src="https://raw.githubusercontent.com/
|
|
36
|
+
<p align="center"><img src="https://raw.githubusercontent.com/hydra-ecosystem/hydra/main/website/static/img/Hydra-Readme-logo2.svg" alt="logo" width="70%" /></p>
|
|
37
37
|
|
|
38
38
|
<p align="center">
|
|
39
39
|
<a href="https://pypi.org/project/hydra-core/"><img src="https://img.shields.io/pypi/v/hydra-core" alt="PyPI" /></a>
|
|
40
40
|
<a href="#"><img src="https://img.shields.io/pypi/pyversions/hydra-core" alt="PyPI - Python Version" /></a>
|
|
41
|
-
<a href="https://github.com/
|
|
41
|
+
<a href="https://github.com/hydra-ecosystem/hydra/actions/workflows/core_tests.yml"><img src="https://github.com/hydra-ecosystem/hydra/actions/workflows/core_tests.yml/badge.svg?branch=main" alt="GitHub Actions build" /></a>
|
|
42
42
|
<a href="https://www.pepy.tech/projects/hydra-core?versions=0.11.*&versions=1.0.*&versions=1.1.*&versions=1.2.*&versions=1.3.*&versions=1.4.*"><img src="https://pepy.tech/badge/hydra-core/month" alt="Downloads" /></a>
|
|
43
|
+
<a href="https://hydra.cc"><img src="https://hydra.cc/img/hydra-config-badge.svg" alt="Config: Hydra" /></a>
|
|
44
|
+
<a href="https://cli.dev"><img src="https://cli.dev/img/badges/cli-dev-ecosystem.svg" alt="ecosystem: cli.dev" /></a>
|
|
43
45
|
</p>
|
|
44
46
|
|
|
45
47
|
<p align="center">
|
|
46
|
-
<a href="https://github.com/
|
|
48
|
+
<a href="https://github.com/hydra-ecosystem/hydra/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/hydra-core" alt="PyPI - License" /></a>
|
|
47
49
|
<a href="https://hydra-framework.zulipchat.com/"><img src="https://img.shields.io/badge/zulip-join_chat-brightgreen.svg" alt="Zulip chat" /></a>
|
|
48
50
|
<a href="https://github.com/astral-sh/ruff"><img src="https://img.shields.io/badge/code%20style-ruff-261230.svg" alt="Code style: Ruff" /></a>
|
|
49
51
|
</p>
|
|
@@ -57,6 +59,16 @@ Dynamic: summary
|
|
|
57
59
|
|
|
58
60
|
----------------------
|
|
59
61
|
|
|
62
|
+
> [!IMPORTANT]
|
|
63
|
+
> **Hydra project transition:** Hydra moved from the `facebookresearch`
|
|
64
|
+
> GitHub organization to
|
|
65
|
+
> [`hydra-ecosystem`](https://github.com/hydra-ecosystem). The repository moved
|
|
66
|
+
> with its history, issues, and pull requests intact. Hydra remains MIT-licensed.
|
|
67
|
+
> No action is required from Hydra users at this time. Contributors should
|
|
68
|
+
> review the current guidance in [CONTRIBUTING.md](CONTRIBUTING.md). Read
|
|
69
|
+
> [Hydra's next chapter: independent stewardship](https://hydra.cc/blog/2026/08/13/independent-stewardship/)
|
|
70
|
+
> for more about the transition.
|
|
71
|
+
|
|
60
72
|
### Releases
|
|
61
73
|
|
|
62
74
|
#### Development
|
|
@@ -79,16 +91,14 @@ See the [NEWS.md](NEWS.md) file for a summary of recent changes to Hydra.
|
|
|
79
91
|
### License
|
|
80
92
|
Hydra is licensed under [MIT License](LICENSE).
|
|
81
93
|
|
|
82
|
-
## Hydra
|
|
94
|
+
## Hydra Landscape
|
|
83
95
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
* [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.
|
|
88
|
-
* 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.
|
|
96
|
+
See the [Hydra Landscape](https://hydra.cc/docs/landscape/) for
|
|
97
|
+
third-party libraries, templates, plugins, and projects that use or extend
|
|
98
|
+
Hydra.
|
|
89
99
|
|
|
90
|
-
#### Ask questions in
|
|
91
|
-
* [
|
|
100
|
+
#### Ask questions in GitHub Discussions or StackOverflow (Use the tag #fb-hydra or #omegaconf):
|
|
101
|
+
* [GitHub Discussions](https://github.com/hydra-ecosystem/hydra/discussions)
|
|
92
102
|
* [StackOverflow](https://stackexchange.com/filters/391828/hydra-questions)
|
|
93
103
|
* [X](https://twitter.com/Hydra_Framework)
|
|
94
104
|
|
|
@@ -102,6 +112,6 @@ If you use Hydra in your research please use the following BibTeX entry:
|
|
|
102
112
|
title = {Hydra - A framework for elegantly configuring complex applications},
|
|
103
113
|
howpublished = {Github},
|
|
104
114
|
year = {2019},
|
|
105
|
-
url = {https://github.com/
|
|
115
|
+
url = {https://github.com/hydra-ecosystem/hydra}
|
|
106
116
|
}
|
|
107
117
|
```
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
<p align="center"><img src="https://raw.githubusercontent.com/
|
|
1
|
+
<p align="center"><img src="https://raw.githubusercontent.com/hydra-ecosystem/hydra/main/website/static/img/Hydra-Readme-logo2.svg" alt="logo" width="70%" /></p>
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<a href="https://pypi.org/project/hydra-core/"><img src="https://img.shields.io/pypi/v/hydra-core" alt="PyPI" /></a>
|
|
5
5
|
<a href="#"><img src="https://img.shields.io/pypi/pyversions/hydra-core" alt="PyPI - Python Version" /></a>
|
|
6
|
-
<a href="https://github.com/
|
|
6
|
+
<a href="https://github.com/hydra-ecosystem/hydra/actions/workflows/core_tests.yml"><img src="https://github.com/hydra-ecosystem/hydra/actions/workflows/core_tests.yml/badge.svg?branch=main" alt="GitHub Actions build" /></a>
|
|
7
7
|
<a href="https://www.pepy.tech/projects/hydra-core?versions=0.11.*&versions=1.0.*&versions=1.1.*&versions=1.2.*&versions=1.3.*&versions=1.4.*"><img src="https://pepy.tech/badge/hydra-core/month" alt="Downloads" /></a>
|
|
8
|
+
<a href="https://hydra.cc"><img src="https://hydra.cc/img/hydra-config-badge.svg" alt="Config: Hydra" /></a>
|
|
9
|
+
<a href="https://cli.dev"><img src="https://cli.dev/img/badges/cli-dev-ecosystem.svg" alt="ecosystem: cli.dev" /></a>
|
|
8
10
|
</p>
|
|
9
11
|
|
|
10
12
|
<p align="center">
|
|
11
|
-
<a href="https://github.com/
|
|
13
|
+
<a href="https://github.com/hydra-ecosystem/hydra/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/hydra-core" alt="PyPI - License" /></a>
|
|
12
14
|
<a href="https://hydra-framework.zulipchat.com/"><img src="https://img.shields.io/badge/zulip-join_chat-brightgreen.svg" alt="Zulip chat" /></a>
|
|
13
15
|
<a href="https://github.com/astral-sh/ruff"><img src="https://img.shields.io/badge/code%20style-ruff-261230.svg" alt="Code style: Ruff" /></a>
|
|
14
16
|
</p>
|
|
@@ -22,6 +24,16 @@
|
|
|
22
24
|
|
|
23
25
|
----------------------
|
|
24
26
|
|
|
27
|
+
> [!IMPORTANT]
|
|
28
|
+
> **Hydra project transition:** Hydra moved from the `facebookresearch`
|
|
29
|
+
> GitHub organization to
|
|
30
|
+
> [`hydra-ecosystem`](https://github.com/hydra-ecosystem). The repository moved
|
|
31
|
+
> with its history, issues, and pull requests intact. Hydra remains MIT-licensed.
|
|
32
|
+
> No action is required from Hydra users at this time. Contributors should
|
|
33
|
+
> review the current guidance in [CONTRIBUTING.md](CONTRIBUTING.md). Read
|
|
34
|
+
> [Hydra's next chapter: independent stewardship](https://hydra.cc/blog/2026/08/13/independent-stewardship/)
|
|
35
|
+
> for more about the transition.
|
|
36
|
+
|
|
25
37
|
### Releases
|
|
26
38
|
|
|
27
39
|
#### Development
|
|
@@ -44,16 +56,14 @@ See the [NEWS.md](NEWS.md) file for a summary of recent changes to Hydra.
|
|
|
44
56
|
### License
|
|
45
57
|
Hydra is licensed under [MIT License](LICENSE).
|
|
46
58
|
|
|
47
|
-
## Hydra
|
|
59
|
+
## Hydra Landscape
|
|
48
60
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
* [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.
|
|
53
|
-
* 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.
|
|
61
|
+
See the [Hydra Landscape](https://hydra.cc/docs/landscape/) for
|
|
62
|
+
third-party libraries, templates, plugins, and projects that use or extend
|
|
63
|
+
Hydra.
|
|
54
64
|
|
|
55
|
-
#### Ask questions in
|
|
56
|
-
* [
|
|
65
|
+
#### Ask questions in GitHub Discussions or StackOverflow (Use the tag #fb-hydra or #omegaconf):
|
|
66
|
+
* [GitHub Discussions](https://github.com/hydra-ecosystem/hydra/discussions)
|
|
57
67
|
* [StackOverflow](https://stackexchange.com/filters/391828/hydra-questions)
|
|
58
68
|
* [X](https://twitter.com/Hydra_Framework)
|
|
59
69
|
|
|
@@ -67,6 +77,6 @@ If you use Hydra in your research please use the following BibTeX entry:
|
|
|
67
77
|
title = {Hydra - A framework for elegantly configuring complex applications},
|
|
68
78
|
howpublished = {Github},
|
|
69
79
|
year = {2019},
|
|
70
|
-
url = {https://github.com/
|
|
80
|
+
url = {https://github.com/hydra-ecosystem/hydra}
|
|
71
81
|
}
|
|
72
82
|
```
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
|
2
2
|
|
|
3
3
|
# Source of truth for Hydra's version
|
|
4
|
-
__version__ = "1.4.0.
|
|
4
|
+
__version__ = "1.4.0.dev9"
|
|
5
5
|
from hydra import utils
|
|
6
6
|
from hydra.errors import MissingConfigException
|
|
7
7
|
from hydra.main import main
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Contributors to Hydra
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
from importlib import import_module
|
|
5
|
+
from types import ModuleType
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def _locate(path: str) -> Any:
|
|
10
|
+
"""
|
|
11
|
+
Locate an object by name or dotted path, importing as necessary.
|
|
12
|
+
This is similar to the pydoc function `locate`, except that it checks for
|
|
13
|
+
the module from the given path from back to front.
|
|
14
|
+
"""
|
|
15
|
+
if path == "":
|
|
16
|
+
raise ImportError("Empty path")
|
|
17
|
+
|
|
18
|
+
parts = [part for part in path.split(".")]
|
|
19
|
+
for part in parts:
|
|
20
|
+
if not len(part):
|
|
21
|
+
raise ValueError(
|
|
22
|
+
f"Error loading '{path}': invalid dotstring."
|
|
23
|
+
+ "\nRelative imports are not supported."
|
|
24
|
+
)
|
|
25
|
+
assert len(parts) > 0
|
|
26
|
+
part0 = parts[0]
|
|
27
|
+
try:
|
|
28
|
+
obj = import_module(part0)
|
|
29
|
+
except Exception as exc_import:
|
|
30
|
+
raise ImportError(
|
|
31
|
+
f"Error loading '{path}':\n{repr(exc_import)}"
|
|
32
|
+
+ f"\nAre you sure that module '{part0}' is installed?"
|
|
33
|
+
) from exc_import
|
|
34
|
+
for m in range(1, len(parts)):
|
|
35
|
+
part = parts[m]
|
|
36
|
+
try:
|
|
37
|
+
obj = getattr(obj, part)
|
|
38
|
+
except AttributeError as exc_attr:
|
|
39
|
+
parent_dotpath = ".".join(parts[:m])
|
|
40
|
+
if isinstance(obj, ModuleType):
|
|
41
|
+
mod = ".".join(parts[: m + 1])
|
|
42
|
+
try:
|
|
43
|
+
obj = import_module(mod)
|
|
44
|
+
continue
|
|
45
|
+
except ModuleNotFoundError as exc_import:
|
|
46
|
+
raise ImportError(
|
|
47
|
+
f"Error loading '{path}':\n{repr(exc_import)}"
|
|
48
|
+
+ f"\nAre you sure that '{part}' is importable from module '{parent_dotpath}'?"
|
|
49
|
+
) from exc_import
|
|
50
|
+
except Exception as exc_import:
|
|
51
|
+
raise ImportError(
|
|
52
|
+
f"Error loading '{path}':\n{repr(exc_import)}"
|
|
53
|
+
) from exc_import
|
|
54
|
+
raise ImportError(
|
|
55
|
+
f"Error loading '{path}':\n{repr(exc_attr)}"
|
|
56
|
+
+ f"\nAre you sure that '{part}' is an attribute of '{parent_dotpath}'?"
|
|
57
|
+
) from exc_attr
|
|
58
|
+
return obj
|
|
@@ -212,6 +212,21 @@ class ConfigRepository(IConfigRepository):
|
|
|
212
212
|
options.append(vv)
|
|
213
213
|
config_value = options
|
|
214
214
|
|
|
215
|
+
normalized_shorthand = False
|
|
216
|
+
original_group = None
|
|
217
|
+
if (
|
|
218
|
+
isinstance(config_value, str)
|
|
219
|
+
and "/" in config_value
|
|
220
|
+
and ".." not in config_value.split("/")
|
|
221
|
+
and "${" not in config_value
|
|
222
|
+
and config_value != "???"
|
|
223
|
+
):
|
|
224
|
+
original_group = keywords.group
|
|
225
|
+
group_suffix, option_name = config_value.rsplit("/", 1)
|
|
226
|
+
keywords.group = f"{keywords.group}/{group_suffix}"
|
|
227
|
+
config_value = option_name
|
|
228
|
+
normalized_shorthand = True
|
|
229
|
+
|
|
215
230
|
default = GroupDefault(
|
|
216
231
|
group=keywords.group,
|
|
217
232
|
value=config_value,
|
|
@@ -219,6 +234,8 @@ class ConfigRepository(IConfigRepository):
|
|
|
219
234
|
optional=keywords.optional,
|
|
220
235
|
override=keywords.override,
|
|
221
236
|
)
|
|
237
|
+
default.normalized_shorthand = normalized_shorthand
|
|
238
|
+
default.original_group = original_group
|
|
222
239
|
|
|
223
240
|
elif isinstance(item, str):
|
|
224
241
|
path, package, _package2 = self._split_group(item)
|
{hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/core_plugins/basic_launcher.py
RENAMED
|
@@ -56,7 +56,11 @@ class BasicLauncher(Launcher):
|
|
|
56
56
|
assert self.config is not None
|
|
57
57
|
assert self.task_function is not None
|
|
58
58
|
|
|
59
|
-
configure_log(
|
|
59
|
+
configure_log(
|
|
60
|
+
self.config.hydra.hydra_logging,
|
|
61
|
+
self.config.hydra.verbose,
|
|
62
|
+
execution_whitelist=self.hydra_context.execution_whitelist,
|
|
63
|
+
)
|
|
60
64
|
sweep_dir = self.config.hydra.sweep.dir
|
|
61
65
|
Path(str(sweep_dir)).mkdir(parents=True, exist_ok=True)
|
|
62
66
|
log.info(f"Launching {len(job_overrides)} jobs locally")
|
|
@@ -79,5 +83,9 @@ class BasicLauncher(Launcher):
|
|
|
79
83
|
job_subdir_key="hydra.sweep.subdir",
|
|
80
84
|
)
|
|
81
85
|
runs.append(ret)
|
|
82
|
-
configure_log(
|
|
86
|
+
configure_log(
|
|
87
|
+
self.config.hydra.hydra_logging,
|
|
88
|
+
self.config.hydra.verbose,
|
|
89
|
+
execution_whitelist=self.hydra_context.execution_whitelist,
|
|
90
|
+
)
|
|
83
91
|
return runs
|
|
@@ -411,7 +411,7 @@ def _resolve_deferred_interpolations(
|
|
|
411
411
|
# Another deferred subtree may provide the missing choice.
|
|
412
412
|
continue
|
|
413
413
|
|
|
414
|
-
|
|
414
|
+
_validate_paths(candidate, tree.node)
|
|
415
415
|
candidate.update_parent(
|
|
416
416
|
tree.node.get_group_path(),
|
|
417
417
|
tree.node.get_final_package(),
|
|
@@ -452,7 +452,7 @@ def _resolve_deferred_interpolations(
|
|
|
452
452
|
fail_on_unresolved(root)
|
|
453
453
|
|
|
454
454
|
|
|
455
|
-
def
|
|
455
|
+
def _validate_paths(default: InputDefault, parent: InputDefault) -> None:
|
|
456
456
|
if isinstance(default, ConfigDefault):
|
|
457
457
|
assert default.path is not None
|
|
458
458
|
paths = [("config", default.path)]
|
|
@@ -469,6 +469,22 @@ def _check_parent_traversal(default: InputDefault, parent: InputDefault) -> None
|
|
|
469
469
|
return
|
|
470
470
|
|
|
471
471
|
for path_type, path in paths:
|
|
472
|
+
# Check for backslashes before parent traversal: the traversal check
|
|
473
|
+
# splits on '/', so a path like '..\secret' would otherwise slip through
|
|
474
|
+
# as a single segment and reach operating-system path handling, where
|
|
475
|
+
# Windows interprets '\' as a separator but POSIX and ConfigStore do not.
|
|
476
|
+
if "\\" in path:
|
|
477
|
+
location = ""
|
|
478
|
+
if not parent.is_virtual():
|
|
479
|
+
location = f"In {parent.get_config_path()}: "
|
|
480
|
+
raise ConfigCompositionException(
|
|
481
|
+
f"{location}Backslash ('\\') in Defaults List "
|
|
482
|
+
f"{path_type} paths is not supported ('{path}').\n"
|
|
483
|
+
"Use '/' as the config group separator; it is the only "
|
|
484
|
+
"supported separator, regardless of the operating system.\n"
|
|
485
|
+
"See https://hydra.cc/docs/advanced/defaults_list/ for more "
|
|
486
|
+
"information."
|
|
487
|
+
)
|
|
472
488
|
if ".." not in path.split("/"):
|
|
473
489
|
continue
|
|
474
490
|
|
|
@@ -612,7 +628,7 @@ def _create_defaults_tree_impl(
|
|
|
612
628
|
defaults_list.extend(overrides.append_group_defaults)
|
|
613
629
|
|
|
614
630
|
for d in defaults_list:
|
|
615
|
-
|
|
631
|
+
_validate_paths(d, parent)
|
|
616
632
|
|
|
617
633
|
_update_overrides(defaults_list, overrides, parent, interpolated_subtree)
|
|
618
634
|
|
|
@@ -651,7 +667,7 @@ def _create_defaults_tree_impl(
|
|
|
651
667
|
assert isinstance(d, GroupDefault)
|
|
652
668
|
overrides.override_default_option(d)
|
|
653
669
|
|
|
654
|
-
|
|
670
|
+
_validate_paths(d, parent)
|
|
655
671
|
|
|
656
672
|
if isinstance(d, GroupDefault) and d.is_options():
|
|
657
673
|
# overriding may change from options to name
|
|
@@ -866,6 +882,69 @@ def create_defaults_list(
|
|
|
866
882
|
)
|
|
867
883
|
|
|
868
884
|
|
|
885
|
+
def _has_normalized_ancestor(
|
|
886
|
+
tree: DefaultsTreeNode,
|
|
887
|
+
) -> Optional[GroupDefault]:
|
|
888
|
+
curr: Optional[DefaultsTreeNode] = tree
|
|
889
|
+
while curr is not None:
|
|
890
|
+
node = curr.node
|
|
891
|
+
if isinstance(node, GroupDefault) and getattr(
|
|
892
|
+
node, "normalized_shorthand", False
|
|
893
|
+
):
|
|
894
|
+
return node
|
|
895
|
+
curr = curr.parent
|
|
896
|
+
return None
|
|
897
|
+
|
|
898
|
+
|
|
899
|
+
def _get_old_path(tree: DefaultsTreeNode) -> str:
|
|
900
|
+
# 1. Collect nodes from root to tree
|
|
901
|
+
nodes = []
|
|
902
|
+
curr: Optional[DefaultsTreeNode] = tree
|
|
903
|
+
while curr is not None:
|
|
904
|
+
nodes.append(curr)
|
|
905
|
+
curr = curr.parent
|
|
906
|
+
nodes.reverse()
|
|
907
|
+
|
|
908
|
+
# 2. Save original groups and parent_base_dirs
|
|
909
|
+
saved_groups = {}
|
|
910
|
+
saved_parent_base_dirs = {}
|
|
911
|
+
for n in nodes:
|
|
912
|
+
node = n.node
|
|
913
|
+
saved_parent_base_dirs[id(n)] = node.parent_base_dir
|
|
914
|
+
if isinstance(node, GroupDefault):
|
|
915
|
+
saved_groups[id(n)] = node.group
|
|
916
|
+
|
|
917
|
+
try:
|
|
918
|
+
# 3. Temporarily restore original group name for normalized nodes
|
|
919
|
+
for n in nodes:
|
|
920
|
+
node = n.node
|
|
921
|
+
if isinstance(node, GroupDefault):
|
|
922
|
+
if getattr(node, "normalized_shorthand", False):
|
|
923
|
+
node.group = getattr(node, "original_group", node.group)
|
|
924
|
+
|
|
925
|
+
# 4. Re-calculate parent_base_dir from root to tree
|
|
926
|
+
parent_base_dir = ""
|
|
927
|
+
for n in nodes:
|
|
928
|
+
node = n.node
|
|
929
|
+
node.parent_base_dir = parent_base_dir
|
|
930
|
+
if node.is_virtual():
|
|
931
|
+
parent_base_dir = ""
|
|
932
|
+
else:
|
|
933
|
+
parent_base_dir = node.get_group_path()
|
|
934
|
+
|
|
935
|
+
# 5. Get the old config path
|
|
936
|
+
old_path = tree.node.get_config_path()
|
|
937
|
+
finally:
|
|
938
|
+
# 6. Safely restore all original groups and parent_base_dirs
|
|
939
|
+
for n in nodes:
|
|
940
|
+
node = n.node
|
|
941
|
+
node.parent_base_dir = saved_parent_base_dirs[id(n)]
|
|
942
|
+
if id(n) in saved_groups and isinstance(node, GroupDefault):
|
|
943
|
+
node.group = saved_groups[id(n)]
|
|
944
|
+
|
|
945
|
+
return old_path
|
|
946
|
+
|
|
947
|
+
|
|
869
948
|
def config_not_found_error(repo: IConfigRepository, tree: DefaultsTreeNode) -> None:
|
|
870
949
|
element = tree.node
|
|
871
950
|
options = None
|
|
@@ -874,6 +953,24 @@ def config_not_found_error(repo: IConfigRepository, tree: DefaultsTreeNode) -> N
|
|
|
874
953
|
group = element.get_group_path()
|
|
875
954
|
options = repo.get_group_options(group, ObjectType.CONFIG)
|
|
876
955
|
|
|
956
|
+
# Check if the failure is caused by relying on the old slash-containing group defaults behavior
|
|
957
|
+
norm_node = _has_normalized_ancestor(tree)
|
|
958
|
+
if norm_node is not None:
|
|
959
|
+
old_path = _get_old_path(tree)
|
|
960
|
+
if repo.config_exists(old_path):
|
|
961
|
+
orig_gp = getattr(norm_node, "original_group", "")
|
|
962
|
+
norm_gp = norm_node.group
|
|
963
|
+
assert norm_gp is not None
|
|
964
|
+
msg = dedent(f"""\
|
|
965
|
+
Could not load '{element.get_config_path()}'.
|
|
966
|
+
However, a config was found at '{old_path}', which indicates this application
|
|
967
|
+
relies on the deprecated slash-containing default option shorthand behavior.
|
|
968
|
+
In Hydra 1.4, defaults list items like '{orig_gp}: {norm_gp[len(orig_gp) + 1 :]}/...' are
|
|
969
|
+
normalized early to '{norm_gp}: ...'. Please update your configs or refer to the
|
|
970
|
+
migration page: https://hydra.cc/docs/upgrades/1.3_to_1.4/slash_in_default/
|
|
971
|
+
""")
|
|
972
|
+
raise ConfigCompositionException(msg)
|
|
973
|
+
|
|
877
974
|
if element.primary:
|
|
878
975
|
msg = dedent(f"""\
|
|
879
976
|
Cannot find primary config '{element.get_config_path()}'. Check that it's in your config search path.
|
{hydra_core-1.4.0.dev8 → hydra_core-1.4.0.dev9}/hydra/_internal/grammar/grammar_functions.py
RENAMED
|
@@ -161,7 +161,7 @@ def extract_text(*args: Any, value: Optional[Any] = None) -> Any:
|
|
|
161
161
|
def cast_json_str(*args: Any, value: Optional[Any] = None) -> Any:
|
|
162
162
|
deprecation_warning(
|
|
163
163
|
"json_str(...) is deprecated and will be removed in Hydra 1.5. "
|
|
164
|
-
"See https://github.com/
|
|
164
|
+
"See https://github.com/hydra-ecosystem/hydra/pull/2930#issuecomment-5018616929",
|
|
165
165
|
stacklevel=2,
|
|
166
166
|
)
|
|
167
167
|
value = _normalize_cast_value(*args, value=value)
|
|
@@ -442,6 +442,6 @@ def glob(
|
|
|
442
442
|
def extend_list(*args: Any) -> ListExtensionOverrideValue:
|
|
443
443
|
"""
|
|
444
444
|
Deprecated in Hydra 1.4 and scheduled for removal in Hydra 1.5.
|
|
445
|
-
See https://github.com/
|
|
445
|
+
See https://github.com/hydra-ecosystem/hydra/issues/3200.
|
|
446
446
|
"""
|
|
447
447
|
return ListExtensionOverrideValue(values=list(args))
|
|
@@ -17,6 +17,7 @@ from omegaconf import (
|
|
|
17
17
|
)
|
|
18
18
|
from omegaconf.errors import InterpolationToMissingValueError
|
|
19
19
|
|
|
20
|
+
from hydra._internal.target_policy import _get_active_execution_whitelist
|
|
20
21
|
from hydra._internal.utils import get_column_widths, run_and_report
|
|
21
22
|
from hydra.core.config_loader import ConfigLoader
|
|
22
23
|
from hydra.core.config_search_path import ConfigSearchPath
|
|
@@ -162,7 +163,9 @@ class Hydra:
|
|
|
162
163
|
try:
|
|
163
164
|
ret = run_job(
|
|
164
165
|
hydra_context=HydraContext(
|
|
165
|
-
config_loader=self.config_loader,
|
|
166
|
+
config_loader=self.config_loader,
|
|
167
|
+
callbacks=callbacks,
|
|
168
|
+
execution_whitelist=_get_active_execution_whitelist(),
|
|
166
169
|
),
|
|
167
170
|
task_function=task_function,
|
|
168
171
|
config=cfg,
|
|
@@ -211,7 +214,9 @@ class Hydra:
|
|
|
211
214
|
sweeper = Plugins.instance().instantiate_sweeper(
|
|
212
215
|
config=cfg,
|
|
213
216
|
hydra_context=HydraContext(
|
|
214
|
-
config_loader=self.config_loader,
|
|
217
|
+
config_loader=self.config_loader,
|
|
218
|
+
callbacks=callbacks,
|
|
219
|
+
execution_whitelist=_get_active_execution_whitelist(),
|
|
215
220
|
),
|
|
216
221
|
task_function=task_function,
|
|
217
222
|
)
|