├── .bandit ├── .coveragerc ├── .flake8 ├── .gitattributes ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── PULL_REQUEST_TEMPLATE.md ├── actions │ ├── linux │ │ └── action.yml │ ├── macos │ │ └── action.yml │ └── windows │ │ └── action.yml ├── codeql.yml └── workflows │ ├── codeql.yml │ ├── core_tests.yml │ └── deploy_website.yml ├── .gitignore ├── .isort.cfg ├── .mypy.ini ├── .pre-commit-config.yaml ├── .stubs ├── hydra_plugins.pyi ├── importlib_resources.pyi ├── nox.pyi ├── ray.pyi └── setuptools.pyi ├── .yamllint ├── ATTRIBUTION ├── LICENSE-antlr4 ├── LICENSE-sample-namespace-packages └── README.md ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── MANIFEST.in ├── NEWS.md ├── README.md ├── apt.txt ├── build_helpers ├── __init__.py ├── bin │ ├── __init__.py │ ├── antlr-4.11.1-complete.jar │ ├── antlr4 │ └── grun ├── build_helpers.py ├── test_files │ ├── a │ │ └── b │ │ │ ├── bad_dir │ │ │ └── .gitkeep │ │ │ ├── file1.txt │ │ │ ├── file2.txt │ │ │ └── junk.txt │ └── c │ │ ├── bad_dir │ │ └── .gitkeep │ │ ├── file1.txt │ │ ├── file2.txt │ │ └── junk.txt └── test_helpers.py ├── contrib ├── README.md └── hydra_torchrun_launcher │ ├── LICENSE │ ├── MIT_LICENSE │ ├── README.md │ ├── __init__.py │ ├── hydra_plugins │ └── hydra_torchrun_launcher │ │ ├── __init__.py │ │ ├── _core.py │ │ ├── config.py │ │ └── distributed_launcher.py │ ├── setup.py │ └── tests │ ├── __init__.py │ └── test_torchrun_launcher.py ├── examples ├── README.md ├── advanced │ ├── ad_hoc_composition │ │ ├── conf │ │ │ ├── config.yaml │ │ │ ├── db │ │ │ │ ├── mysql.yaml │ │ │ │ └── postgresql.yaml │ │ │ ├── schema │ │ │ │ ├── school.yaml │ │ │ │ ├── support.yaml │ │ │ │ └── warehouse.yaml │ │ │ └── ui │ │ │ │ ├── full.yaml │ │ │ │ └── view.yaml │ │ └── hydra_compose_example.py │ ├── config_search_path │ │ ├── __init__.py │ │ ├── additional_conf │ │ │ ├── __init__.py │ │ │ └── dataset │ │ │ │ └── imagenet.yaml │ │ ├── conf │ │ │ ├── config.yaml │ │ │ └── dataset │ │ │ │ └── cifar10.yaml │ │ └── my_app.py │ ├── defaults_list_interpolation │ │ ├── conf │ │ │ ├── config.yaml │ │ │ ├── db │ │ │ │ ├── mysql.yaml │ │ │ │ └── sqlite.yaml │ │ │ ├── server │ │ │ │ ├── apache.yaml │ │ │ │ └── nginx.yaml │ │ │ └── server_db │ │ │ │ └── apache_sqlite.yaml │ │ └── my_app.py │ ├── hydra_app_example │ │ ├── MANIFEST.in │ │ ├── hydra_app │ │ │ ├── __init__.py │ │ │ ├── conf │ │ │ │ ├── __init__.py │ │ │ │ ├── config.yaml │ │ │ │ └── db │ │ │ │ │ └── mysql.yaml │ │ │ └── main.py │ │ ├── setup.py │ │ └── tests │ │ │ ├── __init__.py │ │ │ ├── test_example.py │ │ │ └── test_installed_app.py │ ├── nested_defaults_list │ │ ├── conf │ │ │ ├── config.yaml │ │ │ └── server │ │ │ │ ├── apache.yaml │ │ │ │ └── db │ │ │ │ ├── mysql.yaml │ │ │ │ └── sqlite.yaml │ │ └── my_app.py │ ├── package_overrides │ │ ├── conf │ │ │ ├── db │ │ │ │ ├── mysql.yaml │ │ │ │ └── postgresql.yaml │ │ │ ├── simple.yaml │ │ │ └── two_packages.yaml │ │ ├── simple.py │ │ └── two_packages.py │ └── ray_example │ │ ├── conf │ │ ├── config.yaml │ │ ├── dataset │ │ │ ├── cifar10.yaml │ │ │ └── imagenet.yaml │ │ └── model │ │ │ ├── alexnet.yaml │ │ │ └── resnet.yaml │ │ └── ray_compose_example.py ├── configure_hydra │ ├── custom_help │ │ ├── conf │ │ │ ├── config.yaml │ │ │ ├── db │ │ │ │ ├── mysql.yaml │ │ │ │ └── postgresql.yaml │ │ │ └── hydra │ │ │ │ └── help │ │ │ │ └── my_app_help.yaml │ │ └── my_app.py │ ├── job_name │ │ ├── config.yaml │ │ ├── no_config_file_override.py │ │ └── with_config_file_override.py │ ├── job_override_dirname │ │ ├── config.yaml │ │ └── my_app.py │ ├── logging │ │ ├── conf │ │ │ ├── config.yaml │ │ │ └── hydra │ │ │ │ └── job_logging │ │ │ │ └── custom.yaml │ │ └── my_app.py │ └── workdir │ │ ├── conf │ │ └── config.yaml │ │ └── my_app.py ├── experimental │ └── rerun │ │ ├── config.yaml │ │ └── my_app.py ├── instantiate │ ├── docs_example │ │ ├── config.yaml │ │ └── my_app.py │ ├── object │ │ ├── conf │ │ │ ├── config.yaml │ │ │ └── db │ │ │ │ ├── mysql.yaml │ │ │ │ └── postgresql.yaml │ │ └── my_app.py │ ├── object_recursive │ │ ├── config.yaml │ │ └── my_app.py │ ├── partial │ │ ├── config.yaml │ │ └── my_app.py │ ├── schema │ │ └── my_app.py │ └── schema_recursive │ │ ├── config.yaml │ │ └── my_app.py ├── jupyter_notebooks │ ├── README.md │ ├── cloud_app │ │ └── conf │ │ │ ├── __init__.py │ │ │ ├── application │ │ │ ├── bananas.yaml │ │ │ └── donkey.yaml │ │ │ ├── cloud_provider │ │ │ ├── aws.yaml │ │ │ └── local.yaml │ │ │ ├── config.yaml │ │ │ ├── db │ │ │ ├── mysql.yaml │ │ │ └── sqlite.yaml │ │ │ └── environment │ │ │ ├── production.yaml │ │ │ └── testing.yaml │ └── compose_configs_in_notebook.ipynb ├── patterns │ ├── configuring_experiments │ │ ├── conf │ │ │ ├── config.yaml │ │ │ ├── db │ │ │ │ ├── mysql.yaml │ │ │ │ └── sqlite.yaml │ │ │ ├── experiment │ │ │ │ ├── aplite.yaml │ │ │ │ └── nglite.yaml │ │ │ └── server │ │ │ │ ├── apache.yaml │ │ │ │ └── nginx.yaml │ │ └── my_app.py │ ├── extending_configs │ │ ├── conf │ │ │ ├── config.yaml │ │ │ ├── db │ │ │ │ ├── base_mysql.yaml │ │ │ │ ├── mysql_extending_from_another_group.yaml │ │ │ │ └── mysql_extending_from_this_group.yaml │ │ │ └── db_schema │ │ │ │ └── base_mysql.yaml │ │ └── my_app.py │ ├── multi-select │ │ ├── conf │ │ │ ├── config.yaml │ │ │ └── server │ │ │ │ ├── apache.yaml │ │ │ │ ├── apache_https.yaml │ │ │ │ └── site │ │ │ │ ├── amazon.yaml │ │ │ │ ├── fb.yaml │ │ │ │ └── google.yaml │ │ └── my_app.py │ ├── specializing_config │ │ ├── conf │ │ │ ├── config.yaml │ │ │ ├── dataset │ │ │ │ ├── cifar10.yaml │ │ │ │ └── imagenet.yaml │ │ │ ├── dataset_model │ │ │ │ └── cifar10_alexnet.yaml │ │ │ └── model │ │ │ │ ├── alexnet.yaml │ │ │ │ └── resnet.yaml │ │ └── example.py │ └── write_protect_config_node │ │ └── frozen.py ├── plugins │ ├── example_configsource_plugin │ │ ├── MANIFEST.in │ │ ├── README.md │ │ ├── hydra_plugins │ │ │ └── example_configsource_plugin │ │ │ │ ├── __init__.py │ │ │ │ ├── example_configsource_plugin.py │ │ │ │ └── py.typed │ │ ├── setup.py │ │ └── tests │ │ │ ├── __init__.py │ │ │ └── test_example_config_source.py │ ├── example_generic_plugin │ │ ├── MANIFEST.in │ │ ├── README.md │ │ ├── hydra_plugins │ │ │ └── example_generic_plugin │ │ │ │ ├── __init__.py │ │ │ │ ├── example_plugin.py │ │ │ │ └── py.typed │ │ ├── setup.py │ │ └── tests │ │ │ ├── __init__.py │ │ │ └── test_example_plugin.py │ ├── example_launcher_plugin │ │ ├── MANIFEST.in │ │ ├── README.md │ │ ├── example │ │ │ ├── conf │ │ │ │ ├── config.yaml │ │ │ │ └── db │ │ │ │ │ ├── mysql.yaml │ │ │ │ │ └── postgresql.yaml │ │ │ └── my_app.py │ │ ├── hydra_plugins │ │ │ └── example_launcher_plugin │ │ │ │ ├── __init__.py │ │ │ │ ├── example_launcher.py │ │ │ │ └── py.typed │ │ ├── setup.py │ │ └── tests │ │ │ ├── __init__.py │ │ │ └── test_example_launcher_plugin.py │ ├── example_registered_plugin │ │ ├── MANIFEST.in │ │ ├── README.md │ │ ├── example_registered_plugin │ │ │ ├── __init__.py │ │ │ └── py.typed │ │ ├── setup.py │ │ └── tests │ │ │ ├── __init__.py │ │ │ └── test_example_registered_plugin.py │ ├── example_searchpath_plugin │ │ ├── MANIFEST.in │ │ ├── README.md │ │ ├── arbitrary_package │ │ │ ├── __init__.py │ │ │ └── conf │ │ │ │ ├── __init__.py │ │ │ │ └── hydra │ │ │ │ └── output │ │ │ │ └── my_default_output_dir.yaml │ │ ├── hydra_plugins │ │ │ └── example_searchpath_plugin │ │ │ │ ├── __init__.py │ │ │ │ ├── example_searchpath_plugin.py │ │ │ │ └── py.typed │ │ ├── setup.py │ │ └── tests │ │ │ ├── __init__.py │ │ │ └── test_example_search_path_plugin.py │ └── example_sweeper_plugin │ │ ├── MANIFEST.in │ │ ├── README.md │ │ ├── example │ │ ├── conf │ │ │ ├── config.yaml │ │ │ └── db │ │ │ │ ├── mysql.yaml │ │ │ │ └── postgresql.yaml │ │ └── my_app.py │ │ ├── hydra_plugins │ │ └── example_sweeper_plugin │ │ │ ├── __init__.py │ │ │ ├── example_sweeper.py │ │ │ └── py.typed │ │ ├── setup.py │ │ └── tests │ │ ├── __init__.py │ │ └── test_example_sweeper_plugin.py └── tutorials │ ├── basic │ ├── running_your_hydra_app │ │ ├── 3_working_directory │ │ │ ├── my_app.py │ │ │ └── original_cwd.py │ │ ├── 4_logging │ │ │ └── my_app.py │ │ └── 5_basic_sweep │ │ │ ├── conf │ │ │ ├── config.yaml │ │ │ └── db │ │ │ │ ├── mysql.yaml │ │ │ │ └── postgresql.yaml │ │ │ └── my_app.py │ └── your_first_hydra_app │ │ ├── 1_simple_cli │ │ └── my_app.py │ │ ├── 2_config_file │ │ ├── config.yaml │ │ └── my_app.py │ │ ├── 3_using_config │ │ ├── config.yaml │ │ └── my_app.py │ │ ├── 4_config_groups │ │ ├── conf │ │ │ ├── __init__.py │ │ │ └── db │ │ │ │ ├── mysql.yaml │ │ │ │ └── postgresql.yaml │ │ └── my_app.py │ │ ├── 5_defaults │ │ ├── conf │ │ │ ├── __init__.py │ │ │ ├── config.yaml │ │ │ └── db │ │ │ │ ├── mysql.yaml │ │ │ │ └── postgresql.yaml │ │ └── my_app.py │ │ └── 6_composition │ │ ├── conf │ │ ├── __init__.py │ │ ├── config.yaml │ │ ├── db │ │ │ ├── mysql.yaml │ │ │ └── postgresql.yaml │ │ ├── schema │ │ │ ├── school.yaml │ │ │ ├── support.yaml │ │ │ └── warehouse.yaml │ │ └── ui │ │ │ ├── full.yaml │ │ │ └── view.yaml │ │ └── my_app.py │ └── structured_configs │ ├── 1_minimal │ ├── my_app.py │ └── my_app_type_error.py │ ├── 2_static_complex │ └── my_app.py │ ├── 3_config_groups │ ├── my_app.py │ └── my_app_with_inheritance.py │ ├── 4_defaults │ └── my_app.py │ ├── 5.1_structured_config_schema_same_config_group │ ├── conf │ │ ├── __init__.py │ │ ├── config.yaml │ │ └── db │ │ │ ├── mysql.yaml │ │ │ └── postgresql.yaml │ └── my_app.py │ └── 5.2_structured_config_schema_different_config_group │ ├── conf │ ├── __init__.py │ ├── config.yaml │ └── db │ │ ├── mysql.yaml │ │ └── postgresql.yaml │ ├── database_lib.py │ └── my_app.py ├── hydra ├── __init__.py ├── _internal │ ├── __init__.py │ ├── callbacks.py │ ├── config_loader_impl.py │ ├── config_repository.py │ ├── config_search_path_impl.py │ ├── core_plugins │ │ ├── __init__.py │ │ ├── bash_completion.py │ │ ├── basic_launcher.py │ │ ├── basic_sweeper.py │ │ ├── file_config_source.py │ │ ├── fish_completion.py │ │ ├── importlib_resources_config_source.py │ │ ├── structured_config_source.py │ │ └── zsh_completion.py │ ├── defaults_list.py │ ├── deprecation_warning.py │ ├── grammar │ │ ├── __init__.py │ │ ├── functions.py │ │ ├── grammar_functions.py │ │ └── utils.py │ ├── hydra.py │ ├── instantiate │ │ ├── __init__.py │ │ └── _instantiate2.py │ ├── sources_registry.py │ └── utils.py ├── compose.py ├── conf │ ├── __init__.py │ └── hydra │ │ ├── env │ │ └── default.yaml │ │ ├── help │ │ └── default.yaml │ │ ├── hydra_help │ │ └── default.yaml │ │ ├── hydra_logging │ │ ├── default.yaml │ │ ├── disabled.yaml │ │ ├── hydra_debug.yaml │ │ └── none.yaml │ │ ├── job_logging │ │ ├── default.yaml │ │ ├── disabled.yaml │ │ ├── none.yaml │ │ └── stdout.yaml │ │ └── output │ │ └── default.yaml ├── core │ ├── __init__.py │ ├── config_loader.py │ ├── config_search_path.py │ ├── config_store.py │ ├── default_element.py │ ├── global_hydra.py │ ├── hydra_config.py │ ├── object_type.py │ ├── override_parser │ │ ├── __init__.py │ │ ├── overrides_parser.py │ │ ├── overrides_visitor.py │ │ └── types.py │ ├── plugins.py │ ├── singleton.py │ └── utils.py ├── errors.py ├── experimental │ ├── __init__.py │ ├── callback.py │ ├── callbacks.py │ ├── compose.py │ └── initialize.py ├── extra │ └── pytest_plugin.py ├── grammar │ ├── .gitignore │ ├── OverrideLexer.g4 │ ├── OverrideParser.g4 │ ├── __init__.py │ └── gen │ │ └── .gitignore ├── initialize.py ├── main.py ├── plugins │ ├── __init__.py │ ├── completion_plugin.py │ ├── config_source.py │ ├── launcher.py │ ├── plugin.py │ ├── search_path_plugin.py │ └── sweeper.py ├── py.typed ├── test_utils │ ├── __init__.py │ ├── a_module.py │ ├── completion.py │ ├── config_source_common_tests.py │ ├── configs │ │ ├── __init__.py │ │ ├── accessing_hydra_config.yaml │ │ ├── completion_test │ │ │ ├── additional_searchpath.yaml │ │ │ ├── config.yaml │ │ │ ├── group │ │ │ │ ├── dict.yaml │ │ │ │ └── list.yaml │ │ │ ├── hydra │ │ │ │ └── launcher │ │ │ │ │ └── fairtask.yaml │ │ │ ├── missing_default.yaml │ │ │ └── test_hydra │ │ │ │ └── launcher │ │ │ │ └── fairtask.yaml │ │ ├── completion_test_additional_file │ │ │ ├── additional_group │ │ │ │ └── file_opt_additional.yaml │ │ │ └── group │ │ │ │ └── file_opt.yaml │ │ ├── completion_test_additional_package │ │ │ ├── __init__.py │ │ │ ├── additional_group │ │ │ │ └── pkg_opt_additional.yaml │ │ │ └── group │ │ │ │ └── pkg_opt.yaml │ │ ├── compose.yaml │ │ ├── conf.zip │ │ ├── config.yaml │ │ ├── config.yml │ │ ├── custom_resolver.yaml │ │ ├── db │ │ │ ├── mysql.yaml │ │ │ ├── postgresql.yaml │ │ │ ├── validated_mysql.yaml │ │ │ └── validated_postgresql.yaml │ │ ├── db_conf.yaml │ │ ├── defaults_not_list.yaml │ │ ├── group1 │ │ │ ├── abc.cde.yaml │ │ │ ├── file1.yaml │ │ │ └── file2.yaml │ │ ├── group2 │ │ │ ├── file1.yaml │ │ │ └── file2.yaml │ │ ├── missing-default.yaml │ │ ├── missing-optional-default.yaml │ │ ├── missing_init_py │ │ │ ├── .gitignore │ │ │ └── test.yaml │ │ ├── optional-default.yaml │ │ ├── overriding_output_dir.yaml │ │ ├── overriding_run_dir.yaml │ │ ├── package_tests │ │ │ ├── __init__.py │ │ │ ├── group1 │ │ │ │ ├── option1.yaml │ │ │ │ └── option2.yaml │ │ │ ├── group2 │ │ │ │ ├── option1.yaml │ │ │ │ └── option2.yaml │ │ │ ├── pkg_override.yaml │ │ │ └── two_packages_one_group.yaml │ │ ├── schema_key_error.yaml │ │ ├── schema_validation_error.yaml │ │ ├── some_config.yaml │ │ ├── top_level_list │ │ │ └── file1.yaml │ │ └── unspecified_mandatory_default.yaml │ ├── example_app.py │ ├── launcher_common_tests.py │ └── test_utils.py ├── types.py ├── utils.py └── version.py ├── lgtm.yml ├── news ├── .gitignore ├── 1547.feature ├── 2570.bugfix ├── 2699.maintenance ├── 2852.api_change ├── 2928.bugfix ├── 2929.feature ├── 2934.feature ├── 3001.bugfix └── _template.rst ├── noxfile.py ├── plugins ├── .isort.cfg ├── hydra_ax_sweeper │ ├── MANIFEST.in │ ├── NEWS.md │ ├── README.md │ ├── example │ │ ├── banana.py │ │ └── conf │ │ │ └── config.yaml │ ├── hydra_plugins │ │ └── hydra_ax_sweeper │ │ │ ├── __init__.py │ │ │ ├── _core.py │ │ │ ├── _earlystopper.py │ │ │ ├── ax_sweeper.py │ │ │ ├── config.py │ │ │ └── py.typed │ ├── news │ │ ├── .gitignore │ │ └── 2330.feature │ ├── pyproject.toml │ ├── setup.py │ └── tests │ │ ├── apps │ │ ├── polynomial.py │ │ ├── polynomial.yaml │ │ ├── polynomial_with_coefficients.yaml │ │ ├── polynomial_with_constraint.py │ │ ├── polynomial_with_constraint.yaml │ │ ├── polynomial_with_dict_coefficients.py │ │ ├── polynomial_with_dict_coefficients.yaml │ │ └── polynomial_with_list_coefficients.py │ │ ├── config │ │ ├── config.yaml │ │ ├── params │ │ │ ├── basic.yaml │ │ │ └── logscale.yaml │ │ └── quadratic │ │ │ └── basic.yaml │ │ └── test_ax_sweeper_plugin.py ├── hydra_colorlog │ ├── MANIFEST.in │ ├── NEWS.md │ ├── README.md │ ├── example │ │ ├── config.yaml │ │ └── my_app.py │ ├── hydra_plugins │ │ └── hydra_colorlog │ │ │ ├── __init__.py │ │ │ ├── colorlog.py │ │ │ ├── conf │ │ │ ├── __init__.py │ │ │ └── hydra │ │ │ │ ├── hydra_logging │ │ │ │ └── colorlog.yaml │ │ │ │ └── job_logging │ │ │ │ └── colorlog.yaml │ │ │ └── py.typed │ ├── news │ │ ├── .gitignore │ │ ├── 2443.feature │ │ └── 2663.bugfix │ ├── pyproject.toml │ ├── setup.py │ └── tests │ │ ├── __init__.py │ │ └── test_colorlog.py ├── hydra_joblib_launcher │ ├── MANIFEST.in │ ├── NEWS.md │ ├── README.md │ ├── example │ │ ├── config.yaml │ │ └── my_app.py │ ├── hydra_plugins │ │ └── hydra_joblib_launcher │ │ │ ├── __init__.py │ │ │ ├── _core.py │ │ │ ├── config.py │ │ │ ├── joblib_launcher.py │ │ │ └── py.typed │ ├── news │ │ ├── .gitignore │ │ └── 2443.feature │ ├── pyproject.toml │ ├── setup.py │ └── tests │ │ ├── __init__.py │ │ └── test_joblib_launcher.py ├── hydra_nevergrad_sweeper │ ├── .gitignore │ ├── MANIFEST.in │ ├── NEWS.md │ ├── README.md │ ├── example │ │ ├── config.yaml │ │ └── my_app.py │ ├── hydra_plugins │ │ └── hydra_nevergrad_sweeper │ │ │ ├── __init__.py │ │ │ ├── _impl.py │ │ │ ├── config.py │ │ │ ├── nevergrad_sweeper.py │ │ │ └── py.typed │ ├── news │ │ ├── .gitignore │ │ └── 2443.feature │ ├── pyproject.toml │ ├── setup.py │ └── tests │ │ ├── __init__.py │ │ └── test_nevergrad_sweeper_plugin.py ├── hydra_optuna_sweeper │ ├── MANIFEST.in │ ├── NEWS.md │ ├── README.md │ ├── example │ │ ├── conf │ │ │ └── config.yaml │ │ ├── custom-search-space-objective.py │ │ ├── custom-search-space │ │ │ └── config.yaml │ │ ├── multi-objective-conf │ │ │ └── config.yaml │ │ ├── multi-objective.py │ │ └── sphere.py │ ├── hydra_plugins │ │ └── hydra_optuna_sweeper │ │ │ ├── __init__.py │ │ │ ├── _impl.py │ │ │ ├── config.py │ │ │ ├── optuna_sweeper.py │ │ │ └── py.typed │ ├── news │ │ ├── .gitignore │ │ ├── 1513.feature │ │ └── 2443.feature │ ├── pyproject.toml │ ├── setup.py │ └── tests │ │ ├── __init__.py │ │ ├── conf │ │ ├── test_deprecated_search_space.yaml │ │ └── test_grid.yaml │ │ └── test_optuna_sweeper_plugin.py ├── hydra_ray_launcher │ ├── MANIFEST.in │ ├── NEWS.md │ ├── README.md │ ├── __init__.py │ ├── examples │ │ ├── simple │ │ │ ├── config.yaml │ │ │ └── my_app.py │ │ └── upload_download │ │ │ ├── conf │ │ │ ├── config.yaml │ │ │ └── hydra │ │ │ │ └── launcher │ │ │ │ └── custom_ray_aws.yaml │ │ │ ├── model │ │ │ └── my_model.py │ │ │ └── train.py │ ├── hydra_plugins │ │ └── hydra_ray_launcher │ │ │ ├── __init__.py │ │ │ ├── _config.py │ │ │ ├── _core.py │ │ │ ├── _core_aws.py │ │ │ ├── _launcher_util.py │ │ │ ├── _remote_invoke.py │ │ │ ├── py.typed │ │ │ ├── ray_aws_launcher.py │ │ │ └── ray_launcher.py │ ├── integration_test_tools │ │ ├── README.md │ │ ├── create_integration_test_ami.py │ │ ├── create_integration_test_ami_config.yaml │ │ └── setup_integration_test_ami.py │ ├── news │ │ └── .gitignore │ ├── pyproject.toml │ ├── pytest.ini │ ├── setup.py │ └── tests │ │ ├── __init__.py │ │ ├── test_ray_aws_launcher.py │ │ └── test_ray_launcher.py ├── hydra_rq_launcher │ ├── MANIFEST.in │ ├── NEWS.md │ ├── README.md │ ├── example │ │ ├── config.yaml │ │ └── my_app.py │ ├── hydra_plugins │ │ └── hydra_rq_launcher │ │ │ ├── __init__.py │ │ │ ├── _core.py │ │ │ ├── config.py │ │ │ ├── py.typed │ │ │ └── rq_launcher.py │ ├── news │ │ ├── .gitignore │ │ └── 2443.feature │ ├── pyproject.toml │ ├── setup.py │ └── tests │ │ ├── __init__.py │ │ ├── conftest.py │ │ └── test_rq_launcher.py └── hydra_submitit_launcher │ ├── MANIFEST.in │ ├── NEWS.md │ ├── README.md │ ├── example │ ├── config.yaml │ └── my_app.py │ ├── hydra_plugins │ └── hydra_submitit_launcher │ │ ├── __init__.py │ │ ├── config.py │ │ ├── py.typed │ │ └── submitit_launcher.py │ ├── news │ ├── .gitignore │ ├── 2429.feature │ └── 2443.feature │ ├── pyproject.toml │ ├── setup.py │ └── tests │ ├── __init__.py │ └── test_submitit_launcher.py ├── pyproject.toml ├── pytest.ini ├── requirements ├── dev.txt └── requirements.txt ├── setup.py ├── tests ├── __init__.py ├── benchmark.py ├── data.py ├── defaults_list │ ├── __init__.py │ ├── data │ │ ├── config_default.yaml │ │ ├── config_default_pkg1.yaml │ │ ├── config_with_same_name_as_group.yaml │ │ ├── config_with_same_name_as_group │ │ │ └── item.yaml │ │ ├── db │ │ │ └── base_db.yaml │ │ ├── defaults_with_override_only.yaml │ │ ├── deprecated_headers │ │ │ ├── group.yaml │ │ │ ├── group_foo.yaml │ │ │ ├── group_name.yaml │ │ │ └── name.yaml │ │ ├── duplicate_self.yaml │ │ ├── empty.yaml │ │ ├── error_changing_group.yaml │ │ ├── error_duplicate_group.yaml │ │ ├── error_duplicate_group_nested.yaml │ │ ├── error_invalid_override.yaml │ │ ├── error_self_pkg1.yaml │ │ ├── experiment │ │ │ ├── error_override_without_abs_and_header.yaml │ │ │ ├── error_override_without_global.yaml │ │ │ ├── include_absolute_config.yaml │ │ │ ├── override_config_group.yaml │ │ │ ├── override_hydra.yaml │ │ │ ├── override_with_global_default.yaml │ │ │ └── override_with_global_default2.yaml │ │ ├── extend │ │ │ ├── base_db.yaml │ │ │ ├── external.yaml │ │ │ ├── here.yaml │ │ │ ├── nested.yaml │ │ │ ├── nested │ │ │ │ └── base_db.yaml │ │ │ └── nested_here_keyword.yaml │ │ ├── group1 │ │ │ ├── config_item.yaml │ │ │ ├── config_item_global_.yaml │ │ │ ├── config_item_name_.yaml │ │ │ ├── config_item_pkg2.yaml │ │ │ ├── file1.yaml │ │ │ ├── file2.yaml │ │ │ ├── file3.yaml │ │ │ ├── file_with_global_header.yaml │ │ │ ├── file_with_group_header.yaml │ │ │ ├── group2 │ │ │ │ ├── file1.yaml │ │ │ │ ├── file1_pkg_header_foo.yaml │ │ │ │ ├── file2.yaml │ │ │ │ ├── file3.yaml │ │ │ │ ├── file_with_group_header.yaml │ │ │ │ └── interpolation_ext.yaml │ │ │ ├── group_item1.yaml │ │ │ ├── group_item1_global_.yaml │ │ │ ├── group_item1_global_foo.yaml │ │ │ ├── group_item1_name_.yaml │ │ │ ├── group_item1_pkg2.yaml │ │ │ ├── group_item1_pkg_header_foo.yaml │ │ │ ├── group_item1_with_pkg_header_foo.yaml │ │ │ ├── group_item2.yaml │ │ │ ├── group_item2_pkg_header_bar.yaml │ │ │ ├── group_item2_pkg_header_foo.yaml │ │ │ ├── interpolation.yaml │ │ │ ├── override_invalid.yaml │ │ │ ├── override_invalid2.yaml │ │ │ ├── override_same_level.yaml │ │ │ ├── placeholder.yaml │ │ │ ├── resolver.yaml │ │ │ ├── select_multi.yaml │ │ │ ├── select_multi_pkg.yaml │ │ │ ├── with_missing.yaml │ │ │ └── with_missing_at_foo.yaml │ │ ├── group1_group2 │ │ │ ├── empty1.yaml │ │ │ ├── empty2.yaml │ │ │ ├── file1_file1.yaml │ │ │ ├── file1_file1_defaults_with_override.yaml │ │ │ ├── file1_file1_with_defaults_list.yaml │ │ │ ├── file1_file2.yaml │ │ │ ├── file1_file2_with_defaults_list.yaml │ │ │ ├── file2_file2.yaml │ │ │ ├── foo_file1.yaml │ │ │ └── foo_file2.yaml │ │ ├── group2 │ │ │ ├── file1.yaml │ │ │ └── file2.yaml │ │ ├── group_default.yaml │ │ ├── group_default_at_global.yaml │ │ ├── group_default_global.yaml │ │ ├── group_default_pkg1.yaml │ │ ├── group_default_with_explicit_experiment.yaml │ │ ├── hydra │ │ │ ├── config.yaml │ │ │ ├── help │ │ │ │ ├── custom1.yaml │ │ │ │ ├── custom2.yaml │ │ │ │ └── default.yaml │ │ │ ├── output │ │ │ │ ├── default.yaml │ │ │ │ └── disabled.yaml │ │ │ └── run │ │ │ │ └── custom1.yaml │ │ ├── include_group_with_same_name_as_config.yaml │ │ ├── include_nested_config_item.yaml │ │ ├── include_nested_config_item_global.yaml │ │ ├── include_nested_config_item_name_.yaml │ │ ├── include_nested_config_item_pkg2.yaml │ │ ├── include_nested_group.yaml │ │ ├── include_nested_group_global_.yaml │ │ ├── include_nested_group_global_foo.yaml │ │ ├── include_nested_group_name_.yaml │ │ ├── include_nested_group_pkg2.yaml │ │ ├── include_nested_group_pkg_header_foo.yaml │ │ ├── include_nested_group_pkg_header_foo_override_pkg_bar.yaml │ │ ├── include_override_same_level.yaml │ │ ├── interpolation_bad_key.yaml │ │ ├── interpolation_config_default.yaml │ │ ├── interpolation_forward.yaml │ │ ├── interpolation_in_nested.yaml │ │ ├── interpolation_legacy_with_self.yaml │ │ ├── interpolation_legacy_without_self.yaml │ │ ├── interpolation_nested.yaml │ │ ├── interpolation_resolver_in_nested.yaml │ │ ├── interpolation_simple.yaml │ │ ├── interpolation_with_nested_defaults_list.yaml │ │ ├── interpolation_with_nested_defaults_list_with_override.yaml │ │ ├── interpolation_with_package_override.yaml │ │ ├── invalid_override_in_defaults.yaml │ │ ├── keyword_as_groups.yaml │ │ ├── keyword_optional_optional.yaml │ │ ├── keyword_override_override.yaml │ │ ├── legacy_override_hydra.yaml │ │ ├── legacy_override_hydra2.yaml │ │ ├── legacy_override_hydra_wrong_order.yaml │ │ ├── missing_optional_default.yaml │ │ ├── nested_placeholder.yaml │ │ ├── optional.yaml │ │ ├── optional │ │ │ ├── file1.yaml │ │ │ └── file2.yaml │ │ ├── optional_deprecated.yaml │ │ ├── override │ │ │ ├── file1.yaml │ │ │ └── file2.yaml │ │ ├── override_hydra1.yaml │ │ ├── override_hydra2.yaml │ │ ├── override_hydra3.yaml │ │ ├── override_hydra4.yaml │ │ ├── override_hydra_wrong_order.yaml │ │ ├── override_nested_group_item.yaml │ │ ├── override_nested_to_null.yaml │ │ ├── override_same_level.yaml │ │ ├── override_wrong_order.yaml │ │ ├── placeholder.yaml │ │ ├── primary_pkg_header_foo.yaml │ │ ├── select_multi.yaml │ │ ├── select_multi_interpolation.yaml │ │ ├── select_multi_optional.yaml │ │ ├── select_multi_override.yaml │ │ ├── select_multi_pkg.yaml │ │ ├── self_leading.yaml │ │ ├── self_trailing.yaml │ │ ├── test_extend_from_config_with_same_name_as_group.yaml │ │ ├── test_extend_from_external_group.yaml │ │ ├── test_extend_from_group_with_same_name_as_config.yaml │ │ ├── test_extend_from_nested_group.yaml │ │ ├── test_extend_same_group.yaml │ │ ├── two_config_items.yaml │ │ ├── two_group_defaults_different_pkgs.yaml │ │ ├── two_group_defaults_different_pkgs_global.yaml │ │ ├── with_missing.yaml │ │ ├── with_missing_at_foo.yaml │ │ └── with_missing_at_global.yaml │ ├── test_defaults_list.py │ └── test_defaults_tree.py ├── instantiate │ ├── __init__.py │ ├── import_error.py │ ├── module_shadowed_by_function.py │ ├── positional_only.py │ ├── test_helpers.py │ ├── test_instantiate.py │ ├── test_positional.py │ └── test_positional_only_arguments.py ├── jupyter │ ├── %run_test.ipynb │ ├── a_module.py │ └── test_initialize_in_module.ipynb ├── scripts │ ├── test_bash_completion.exp │ ├── test_bash_dot_in_path.bash │ ├── test_bash_install_uninstall.sh │ ├── test_fish_completion.exp │ ├── test_fish_install_uninstall.fish │ └── test_zsh_completion.exp ├── standalone_apps │ ├── discovery_test_plugin │ │ ├── hydra_plugins │ │ │ └── discovery_test │ │ │ │ ├── __init__.py │ │ │ │ ├── __not_hidden_plugin.py │ │ │ │ ├── _hidden_plugin.py │ │ │ │ └── discovery_test.py │ │ ├── setup.py │ │ └── tests │ │ │ ├── __init__.py │ │ │ └── test_discovery.py │ ├── initialization_test_app │ │ ├── MANIFEST.in │ │ ├── __init__.py │ │ ├── initialization_test_app │ │ │ ├── __init__.py │ │ │ ├── conf │ │ │ │ ├── __init__.py │ │ │ │ └── config.yaml │ │ │ └── main.py │ │ ├── setup.py │ │ └── tests │ │ │ ├── __init__.py │ │ │ └── test_app.py │ └── namespace_pkg_config_source_test │ │ ├── namespace_test │ │ ├── __init__.py │ │ └── test_namespace.py │ │ ├── setup.py │ │ └── some_namespace │ │ └── namespace_test │ │ └── dir │ │ ├── __init__.py │ │ ├── config_with_defaults_list.yaml │ │ ├── config_with_unicode.yaml │ │ ├── config_without_group.yaml │ │ ├── configs_with_defaults_list │ │ ├── global_package.yaml │ │ ├── group_package.yaml │ │ └── no_package.yaml │ │ ├── dataset.yaml │ │ ├── dataset │ │ ├── cifar10.yaml │ │ └── imagenet.yaml │ │ ├── level1 │ │ └── level2 │ │ │ ├── nested1.yaml │ │ │ └── nested2.yaml │ │ ├── optimizer │ │ ├── adam.yaml │ │ └── nesterov.yaml │ │ ├── package_test │ │ ├── explicit.yaml │ │ ├── global.yaml │ │ ├── group.yaml │ │ ├── group_name.yaml │ │ ├── name.yaml │ │ └── none.yaml │ │ ├── primary_config.yaml │ │ └── primary_config_with_non_global_package.yaml ├── test_apps │ ├── app_can_fail │ │ ├── __init__.py │ │ └── my_app.py │ ├── app_change_dir │ │ └── my_app.py │ ├── app_exception │ │ ├── __init__.py │ │ └── my_app.py │ ├── app_print_hydra_mode │ │ ├── __init__.py │ │ ├── conf │ │ │ ├── config.yaml │ │ │ └── hydra │ │ │ │ └── sweeper │ │ │ │ └── test.yaml │ │ └── my_app.py │ ├── app_with_callbacks │ │ ├── app_with_log_compose_callback │ │ │ ├── __init__.py │ │ │ ├── config.yaml │ │ │ ├── group │ │ │ │ └── a.yaml │ │ │ └── my_app.py │ │ ├── custom_callback │ │ │ ├── __init__.py │ │ │ ├── config.yaml │ │ │ ├── config_with_two_callbacks.yaml │ │ │ └── my_app.py │ │ └── on_job_start_accepts_task_function │ │ │ ├── __init__.py │ │ │ ├── config.yaml │ │ │ └── my_app.py │ ├── app_with_cfg │ │ ├── __init__.py │ │ ├── config.yaml │ │ └── my_app.py │ ├── app_with_cfg_decorated │ │ ├── __init__.py │ │ ├── config.yaml │ │ ├── decorators │ │ │ ├── __init__.py │ │ │ ├── inner_decorator.py │ │ │ └── outer_decorator.py │ │ └── my_app.py │ ├── app_with_cfg_groups │ │ ├── __init__.py │ │ ├── conf │ │ │ ├── __init__.py │ │ │ ├── config.yaml │ │ │ ├── config_with_runtime_option.yaml │ │ │ ├── dataset │ │ │ │ └── imagenet.yaml │ │ │ ├── missing_default.yaml │ │ │ └── optimizer │ │ │ │ ├── adam.yaml │ │ │ │ └── nesterov.yaml │ │ ├── my_app.py │ │ └── my_app_with_runtime_choices_print.py │ ├── app_with_cfg_groups_no_header │ │ ├── conf │ │ │ ├── __init__.py │ │ │ ├── config.yaml │ │ │ └── optimizer │ │ │ │ └── nesterov.yaml │ │ └── my_app.py │ ├── app_with_config_with_free_group │ │ ├── __init__.py │ │ ├── conf │ │ │ ├── __init__.py │ │ │ ├── config.yaml │ │ │ ├── free_group │ │ │ │ ├── opt1.yaml │ │ │ │ └── opt2.yaml │ │ │ └── group │ │ │ │ ├── opt1.yaml │ │ │ │ └── opt2.yaml │ │ └── my_app.py │ ├── app_with_custom_launcher │ │ ├── __init__.py │ │ ├── config.yaml │ │ └── my_app.py │ ├── app_with_log_jobreturn_callback │ │ ├── __init__.py │ │ ├── config.yaml │ │ └── my_app.py │ ├── app_with_multiple_config_dirs │ │ ├── __init__.py │ │ ├── dir1 │ │ │ ├── __init__.py │ │ │ ├── cfg1.yaml │ │ │ └── cfg2.yaml │ │ ├── dir2 │ │ │ ├── __init__.py │ │ │ ├── cfg1.yaml │ │ │ └── cfg2.yaml │ │ └── my_app.py │ ├── app_with_no_chdir_override │ │ └── my_app.py │ ├── app_with_pickle_job_info_callback │ │ ├── __init__.py │ │ ├── config.yaml │ │ └── my_app.py │ ├── app_with_runtime_config_error │ │ ├── config.yaml │ │ └── my_app.py │ ├── app_with_split_cfg │ │ ├── __init__.py │ │ ├── config.yaml │ │ ├── imagenet.yaml │ │ ├── my_app.py │ │ └── nesterov.yaml │ ├── app_with_unicode_in_config │ │ ├── __init__.py │ │ ├── config.yaml │ │ └── my_app.py │ ├── app_without_config │ │ ├── __init__.py │ │ └── my_app.py │ ├── config_source_test │ │ ├── __init__.py │ │ ├── dir │ │ │ ├── __init__.py │ │ │ ├── config_with_defaults_list.yaml │ │ │ ├── config_with_unicode.yaml │ │ │ ├── config_without_group.yaml │ │ │ ├── configs_with_defaults_list │ │ │ │ ├── global_package.yaml │ │ │ │ ├── group_package.yaml │ │ │ │ └── no_package.yaml │ │ │ ├── dataset.yaml │ │ │ ├── dataset │ │ │ │ ├── cifar10.yaml │ │ │ │ └── imagenet.yaml │ │ │ ├── level1 │ │ │ │ └── level2 │ │ │ │ │ ├── nested1.yaml │ │ │ │ │ └── nested2.yaml │ │ │ ├── optimizer │ │ │ │ ├── adam.yaml │ │ │ │ └── nesterov.yaml │ │ │ ├── package_test │ │ │ │ ├── explicit.yaml │ │ │ │ ├── global.yaml │ │ │ │ ├── group.yaml │ │ │ │ ├── group_name.yaml │ │ │ │ ├── name.yaml │ │ │ │ └── none.yaml │ │ │ ├── primary_config.yaml │ │ │ └── primary_config_with_non_global_package.yaml │ │ └── structured.py │ ├── custom_env_defaults │ │ ├── hydra_plugins │ │ │ └── env_defaults │ │ │ │ ├── __init__.py │ │ │ │ ├── conf │ │ │ │ ├── __init__.py │ │ │ │ └── hydra │ │ │ │ │ └── env │ │ │ │ │ └── default.yaml │ │ │ │ └── env_defaults.py │ │ └── my_app.py │ ├── defaults_in_schema_missing │ │ ├── conf │ │ │ ├── config.yaml │ │ │ └── db │ │ │ │ └── mysql.yaml │ │ └── my_app.py │ ├── defaults_pkg_with_dot │ │ ├── __init__.py │ │ ├── config.yaml │ │ ├── dataset │ │ │ └── imagenet.yaml │ │ └── my_app.py │ ├── deprecation_warning │ │ └── my_app.py │ ├── hydra_main_rerun │ │ ├── __init__.py │ │ └── my_app.py │ ├── hydra_main_without_config_path │ │ └── my_app.py │ ├── hydra_resolver_in_output_dir │ │ └── my_app.py │ ├── hydra_to_cfg_interpolation │ │ ├── config.yaml │ │ └── my_app.py │ ├── hydra_verbose │ │ ├── __init__.py │ │ ├── config.yaml │ │ └── my_app.py │ ├── init_in_app_without_module │ │ ├── config.yaml │ │ └── main.py │ ├── interpolating_dir_hydra_to_app │ │ ├── __init__.py │ │ ├── config.yaml │ │ └── my_app.py │ ├── multirun_structured_conflict │ │ ├── config.yaml │ │ └── my_app.py │ ├── passes_callable_class_to_hydra_main │ │ ├── __init__.py │ │ └── my_app.py │ ├── run_as_module_1 │ │ ├── config.yaml │ │ └── my_app.py │ ├── run_as_module_2 │ │ ├── conf │ │ │ ├── __init__.py │ │ │ └── config.yaml │ │ └── my_app.py │ ├── run_as_module_3 │ │ └── module │ │ │ ├── __init__.py │ │ │ ├── conf │ │ │ └── __init__.py │ │ │ ├── config.yaml │ │ │ └── my_app.py │ ├── run_as_module_4 │ │ └── module │ │ │ ├── __init__.py │ │ │ ├── conf │ │ │ ├── __init__.py │ │ │ └── config.yaml │ │ │ └── my_app.py │ ├── run_dir_test │ │ ├── __init__.py │ │ └── my_app.py │ ├── schema_overrides_hydra │ │ ├── __init__.py │ │ ├── config.yaml │ │ ├── group │ │ │ └── a.yaml │ │ └── my_app.py │ ├── setting_env │ │ ├── __init__.py │ │ ├── config.yaml │ │ └── my_app.py │ ├── simple_app │ │ ├── __init__.py │ │ ├── interp_to_hydra.yaml │ │ └── my_app.py │ ├── simple_interpolation │ │ ├── config.yaml │ │ └── my_app.py │ ├── structured_with_none_list │ │ └── my_app.py │ ├── sweep_complex_defaults │ │ ├── __init__.py │ │ ├── conf │ │ │ ├── __init__.py │ │ │ ├── config.yaml │ │ │ ├── dataset │ │ │ │ └── imagenet.yaml │ │ │ ├── optimizer │ │ │ │ ├── adam.yaml │ │ │ │ └── nesterov.yaml │ │ │ └── optimizer_dataset │ │ │ │ ├── adam_imagenet.yaml │ │ │ │ └── nesterov_imagenet.yaml │ │ └── my_app.py │ ├── sys_exit │ │ ├── __init__.py │ │ └── my_app.py │ └── user-config-dir │ │ ├── conf │ │ ├── config.yaml │ │ └── dataset │ │ │ └── imagenet.yaml │ │ ├── my_app.py │ │ └── user-dir │ │ └── dataset │ │ └── cifar10.yaml ├── test_basic_launcher.py ├── test_basic_sweeper.py ├── test_callbacks.py ├── test_completion.py ├── test_compose.py ├── test_config_loader.py ├── test_config_repository.py ├── test_config_search_path.py ├── test_core_utils.py ├── test_env_defaults.py ├── test_errors.py ├── test_examples │ ├── __init__.py │ ├── test_advanced_config_search_path.py │ ├── test_advanced_package_overrides.py │ ├── test_basic_sweep.py │ ├── test_configure_hydra.py │ ├── test_experimental.py │ ├── test_instantiate_examples.py │ ├── test_patterns.py │ ├── test_structured_configs_tutorial.py │ └── test_tutorials_basic.py ├── test_hydra.py ├── test_hydra_cli_errors.py ├── test_hydra_context_warnings.py ├── test_internal_utils.py ├── test_overrides_parser.py ├── test_plugin_interface.py └── test_utils.py ├── tools ├── .isort.cfg ├── README.md ├── configen │ ├── .gitignore │ ├── MANIFEST.in │ ├── README.md │ ├── conf │ │ └── configen.yaml │ ├── configen │ │ ├── __init__.py │ │ ├── config.py │ │ ├── configen.py │ │ ├── samples │ │ │ ├── __init__.py │ │ │ └── my_module.py │ │ ├── templates │ │ │ ├── module.j2 │ │ │ └── sample_config.yaml │ │ └── utils.py │ ├── example │ │ ├── __init__.py │ │ ├── config.yaml │ │ ├── config │ │ │ ├── __init__.py │ │ │ └── configen │ │ │ │ ├── __init__.py │ │ │ │ └── samples │ │ │ │ ├── __init__.py │ │ │ │ └── my_module.py │ │ └── my_app.py │ ├── setup.py │ └── tests │ │ ├── __init__.py │ │ ├── gen-test-expected │ │ └── configen.yaml │ │ ├── test_generate.py │ │ └── test_modules │ │ ├── __init__.py │ │ ├── default_flags │ │ ├── both.py │ │ ├── convert.py │ │ ├── noflags.py │ │ └── recursive.py │ │ ├── future_annotations.py │ │ ├── generated.py │ │ └── generated_future_annotations.py └── release │ ├── README.md │ ├── conf │ ├── config.yaml │ ├── packages │ │ ├── configen.yaml │ │ ├── hydra.yaml │ │ ├── hydra_ax_sweeper.yaml │ │ ├── hydra_colorlog.yaml │ │ ├── hydra_joblib_launcher.yaml │ │ ├── hydra_nevergrad_sweeper.yaml │ │ ├── hydra_optuna_sweeper.yaml │ │ ├── hydra_ray_launcher.yaml │ │ ├── hydra_rq_launcher.yaml │ │ └── hydra_submitit_launcher.yaml │ └── set │ │ ├── all.yaml │ │ └── plugins.yaml │ └── release.py └── website ├── .gitignore ├── .yarnclean ├── README.md ├── blog ├── 2020-05-04-New-blog.md ├── 2020-09-03-Hydra_1.0.md ├── 2020-12-22-Hydra_Ray_Launcher.md ├── 2021-06-13-Hydra_1.1.md └── 2022-05-18-Hydra_1.2.md ├── docs ├── advanced │ ├── compose_api.md │ ├── decorating_main.md │ ├── defaults_list.md │ ├── hydra-command-line-flags.md │ ├── instantiate_objects │ │ ├── config_files.md │ │ ├── overview.md │ │ └── structured_config.md │ ├── jupyter_notebooks.md │ ├── override_grammar │ │ ├── basic.md │ │ └── extended.md │ ├── overriding_packages.md │ ├── packaging.md │ ├── plugins │ │ ├── develop.md │ │ └── intro.md │ ├── search_path.md │ ├── terminology.md │ └── unit_testing.md ├── configure_hydra │ ├── Intro.md │ ├── app_help.md │ ├── job.md │ ├── logging.md │ └── workdir.md ├── development │ ├── documentation.md │ ├── overview.md │ ├── release.md │ ├── style_guide.md │ └── testing.md ├── experimental │ ├── callbacks.md │ ├── intro.md │ └── rerun.md ├── fb │ ├── ai-cluster.md │ ├── configerator-config-source.md │ ├── fair-cluster.md │ ├── fbcode.md │ ├── flow-launcher.md │ └── intro.md ├── index.html ├── intro.md ├── patterns │ ├── configuring_experiments.md │ ├── configuring_plugins.md │ ├── extending_configs.md │ ├── select_multiple_configs_from_config_group.md │ ├── specializing_config.md │ └── write_protect_config_node.md ├── plugins │ ├── ax_sweeper.md │ ├── colorlog.md │ ├── joblib_launcher.md │ ├── nevergrad_sweeper.md │ ├── optuna_sweeper.md │ ├── ray_launcher.md │ ├── rq_launcher.md │ └── submitit_launcher.md ├── tutorials │ ├── basic │ │ ├── running_your_app │ │ │ ├── 2_multirun.md │ │ │ ├── 3_working_directory.md │ │ │ ├── 4_logging.md │ │ │ ├── 5_debugging.md │ │ │ └── 6_tab_completion.md │ │ └── your_first_app │ │ │ ├── 1_simple_cli.md │ │ │ ├── 2_config_file.md │ │ │ ├── 3_using_config.md │ │ │ ├── 4_config_groups.md │ │ │ ├── 5_defaults.md │ │ │ └── 6_composition.md │ ├── intro.md │ └── structured_config │ │ ├── 0_intro.md │ │ ├── 10_config_store.md │ │ ├── 1_minimal_example.md │ │ ├── 2_hierarchical_static_config.md │ │ ├── 3_config_groups.md │ │ ├── 4_defaults.md │ │ └── 5_schema.md └── upgrades │ ├── 0.11_to_1.0 │ ├── adding_a_package_directive.md │ ├── config_path_changes.md │ ├── object_instantiation_changes.md │ └── strict_mode_flag_deprecated.md │ ├── 1.0_to_1.1 │ ├── automatic_schema_matching.md │ ├── changes_to_default_composition_order.md │ ├── changes_to_package_header.md │ ├── defaults_list_interpolation_changes.md │ ├── defaults_list_override.md │ └── hydra_main_config_path.md │ ├── 1.1_to_1.2 │ ├── changes_to_job_working_dir.md │ ├── changes_to_sweeper_config.md │ └── hydra_main_config_path.md │ ├── intro.md │ └── version_base.md ├── docusaurus.config.js ├── package.json ├── sidebars.js ├── src ├── components │ ├── GithubLink.jsx │ └── Script.jsx ├── css │ └── custom.css ├── pages │ ├── index.js │ └── styles.module.css └── theme │ └── NotFound.js ├── static ├── .circleci │ └── config.yml ├── CNAME ├── img │ ├── Hydra-Final_sticker_with_url_final.svg │ ├── Hydra-Readme-logo1.svg │ ├── Hydra-Readme-logo2.svg │ ├── Hydra-head.svg │ ├── Hydra-plugins.svg │ ├── Hydra-plugins2.svg │ ├── logo.svg │ ├── undraw_product_teardown_hydra_plain.svg │ └── undraw_site_content_hydra_plain.svg └── plugins │ ├── colorlog │ └── colorlog.png │ └── optuna_sweeper │ └── multi_objective_result.png ├── versioned_docs ├── version-0.11 │ ├── advanced │ │ ├── hydra_compose.md │ │ ├── packaging.md │ │ ├── plugins.md │ │ ├── ray_example.md │ │ └── search_path.md │ ├── configure_hydra │ │ ├── Intro.md │ │ ├── app_help.md │ │ ├── logging.md │ │ └── workdir.md │ ├── development │ │ ├── contributing.md │ │ └── release.md │ ├── fb │ │ └── intro.md │ ├── index.html │ ├── intro.md │ ├── patterns │ │ ├── objects.md │ │ └── specializing_config.md │ ├── plugins │ │ └── colorlog.md │ └── tutorial │ │ ├── 10_debugging.md │ │ ├── 1_simple_cli_app.md │ │ ├── 2_config_file.md │ │ ├── 3_config_groups.md │ │ ├── 4_defaults.md │ │ ├── 5_composition.md │ │ ├── 6_multirun.md │ │ ├── 7_tab_completion.md │ │ ├── 8_working_directory.md │ │ └── 9_logging.md ├── version-1.0 │ ├── advanced │ │ ├── hydra-command-line-flags.md │ │ ├── jupyter_notebooks.md │ │ ├── override_grammar │ │ │ ├── basic.md │ │ │ └── extended.md │ │ ├── overriding_packages.md │ │ ├── packaging.md │ │ ├── plugins.md │ │ ├── search_path.md │ │ └── unit_testing.md │ ├── configure_hydra │ │ ├── Intro.md │ │ ├── app_help.md │ │ ├── job.md │ │ ├── logging.md │ │ └── workdir.md │ ├── development │ │ ├── documentation.md │ │ ├── overview.md │ │ ├── release.md │ │ ├── style_guide.md │ │ └── testing.md │ ├── experimental │ │ ├── hydra_compose.md │ │ └── intro.md │ ├── index.html │ ├── intro.md │ ├── patterns │ │ ├── instantiate_objects │ │ │ ├── config_files.md │ │ │ ├── overview.md │ │ │ └── structured_config.md │ │ ├── specializing_config.md │ │ └── write_protect_config_node.md │ ├── plugins │ │ ├── ax_sweeper.md │ │ ├── colorlog.md │ │ ├── joblib_launcher.md │ │ ├── nevergrad_sweeper.md │ │ ├── ray_launcher.md │ │ ├── rq_launcher.md │ │ └── submitit_launcher.md │ ├── terminology.md │ ├── tutorials │ │ ├── basic │ │ │ ├── running_your_app │ │ │ │ ├── 2_multirun.md │ │ │ │ ├── 3_working_directory.md │ │ │ │ ├── 4_logging.md │ │ │ │ ├── 5_debugging.md │ │ │ │ └── 6_tab_completion.md │ │ │ └── your_first_app │ │ │ │ ├── 1_simple_cli.md │ │ │ │ ├── 2_config_file.md │ │ │ │ ├── 3_using_config.md │ │ │ │ ├── 4_config_groups.md │ │ │ │ ├── 5_defaults.md │ │ │ │ └── 6_composition.md │ │ ├── intro.md │ │ └── structured_config │ │ │ ├── 0_intro.md │ │ │ ├── 10_config_store.md │ │ │ ├── 1_minimal_example.md │ │ │ ├── 2_hierarchical_static_config.md │ │ │ ├── 3_config_groups.md │ │ │ ├── 4_defaults.md │ │ │ ├── 5_schema.md │ │ │ ├── 6_static_schema_many_configs.md │ │ │ └── 7_dynamic_schema_many_configs.md │ └── upgrades │ │ └── 0.11_to_1.0 │ │ ├── adding_a_package_directive.md │ │ ├── config_path_changes.md │ │ ├── object_instantiation_changes.md │ │ └── strict_mode_flag_deprecated.md ├── version-1.1 │ ├── advanced │ │ ├── compose_api.md │ │ ├── defaults_list.md │ │ ├── hydra-command-line-flags.md │ │ ├── instantiate_objects │ │ │ ├── config_files.md │ │ │ ├── overview.md │ │ │ └── structured_config.md │ │ ├── jupyter_notebooks.md │ │ ├── override_grammar │ │ │ ├── basic.md │ │ │ └── extended.md │ │ ├── overriding_packages.md │ │ ├── packaging.md │ │ ├── plugins │ │ │ ├── develop.md │ │ │ └── intro.md │ │ ├── search_path.md │ │ ├── terminology.md │ │ └── unit_testing.md │ ├── configure_hydra │ │ ├── Intro.md │ │ ├── app_help.md │ │ ├── job.md │ │ ├── logging.md │ │ └── workdir.md │ ├── development │ │ ├── documentation.md │ │ ├── overview.md │ │ ├── release.md │ │ ├── style_guide.md │ │ └── testing.md │ ├── experimental │ │ ├── callbacks.md │ │ └── intro.md │ ├── index.html │ ├── intro.md │ ├── patterns │ │ ├── configuring_experiments.md │ │ ├── configuring_plugins.md │ │ ├── extending_configs.md │ │ ├── select_multiple_configs_from_config_group.md │ │ ├── specializing_config.md │ │ └── write_protect_config_node.md │ ├── plugins │ │ ├── ax_sweeper.md │ │ ├── colorlog.md │ │ ├── joblib_launcher.md │ │ ├── nevergrad_sweeper.md │ │ ├── optuna_sweeper.md │ │ ├── ray_launcher.md │ │ ├── rq_launcher.md │ │ └── submitit_launcher.md │ ├── tutorials │ │ ├── basic │ │ │ ├── running_your_app │ │ │ │ ├── 2_multirun.md │ │ │ │ ├── 3_working_directory.md │ │ │ │ ├── 4_logging.md │ │ │ │ ├── 5_debugging.md │ │ │ │ └── 6_tab_completion.md │ │ │ └── your_first_app │ │ │ │ ├── 1_simple_cli.md │ │ │ │ ├── 2_config_file.md │ │ │ │ ├── 3_using_config.md │ │ │ │ ├── 4_config_groups.md │ │ │ │ ├── 5_defaults.md │ │ │ │ └── 6_composition.md │ │ ├── intro.md │ │ └── structured_config │ │ │ ├── 0_intro.md │ │ │ ├── 10_config_store.md │ │ │ ├── 1_minimal_example.md │ │ │ ├── 2_hierarchical_static_config.md │ │ │ ├── 3_config_groups.md │ │ │ ├── 4_defaults.md │ │ │ └── 5_schema.md │ └── upgrades │ │ ├── 0.11_to_1.0 │ │ ├── adding_a_package_directive.md │ │ ├── config_path_changes.md │ │ ├── object_instantiation_changes.md │ │ └── strict_mode_flag_deprecated.md │ │ ├── 1.0_to_1.1 │ │ ├── automatic_schema_matching.md │ │ ├── changes_to_default_composition_order.md │ │ ├── changes_to_package_header.md │ │ ├── defaults_list_interpolation_changes.md │ │ ├── defaults_list_override.md │ │ └── hydra_main_config_path.md │ │ └── intro.md ├── version-1.2 │ ├── advanced │ │ ├── compose_api.md │ │ ├── defaults_list.md │ │ ├── hydra-command-line-flags.md │ │ ├── instantiate_objects │ │ │ ├── config_files.md │ │ │ ├── overview.md │ │ │ └── structured_config.md │ │ ├── jupyter_notebooks.md │ │ ├── override_grammar │ │ │ ├── basic.md │ │ │ └── extended.md │ │ ├── overriding_packages.md │ │ ├── packaging.md │ │ ├── plugins │ │ │ ├── develop.md │ │ │ └── intro.md │ │ ├── search_path.md │ │ ├── terminology.md │ │ └── unit_testing.md │ ├── configure_hydra │ │ ├── Intro.md │ │ ├── app_help.md │ │ ├── job.md │ │ ├── logging.md │ │ └── workdir.md │ ├── development │ │ ├── documentation.md │ │ ├── overview.md │ │ ├── release.md │ │ ├── style_guide.md │ │ └── testing.md │ ├── experimental │ │ ├── callbacks.md │ │ ├── intro.md │ │ └── rerun.md │ ├── index.html │ ├── intro.md │ ├── patterns │ │ ├── configuring_experiments.md │ │ ├── configuring_plugins.md │ │ ├── extending_configs.md │ │ ├── select_multiple_configs_from_config_group.md │ │ ├── specializing_config.md │ │ └── write_protect_config_node.md │ ├── plugins │ │ ├── ax_sweeper.md │ │ ├── colorlog.md │ │ ├── joblib_launcher.md │ │ ├── nevergrad_sweeper.md │ │ ├── optuna_sweeper.md │ │ ├── ray_launcher.md │ │ ├── rq_launcher.md │ │ └── submitit_launcher.md │ ├── tutorials │ │ ├── basic │ │ │ ├── running_your_app │ │ │ │ ├── 2_multirun.md │ │ │ │ ├── 3_working_directory.md │ │ │ │ ├── 4_logging.md │ │ │ │ ├── 5_debugging.md │ │ │ │ └── 6_tab_completion.md │ │ │ └── your_first_app │ │ │ │ ├── 1_simple_cli.md │ │ │ │ ├── 2_config_file.md │ │ │ │ ├── 3_using_config.md │ │ │ │ ├── 4_config_groups.md │ │ │ │ ├── 5_defaults.md │ │ │ │ └── 6_composition.md │ │ ├── intro.md │ │ └── structured_config │ │ │ ├── 0_intro.md │ │ │ ├── 10_config_store.md │ │ │ ├── 1_minimal_example.md │ │ │ ├── 2_hierarchical_static_config.md │ │ │ ├── 3_config_groups.md │ │ │ ├── 4_defaults.md │ │ │ └── 5_schema.md │ └── upgrades │ │ ├── 0.11_to_1.0 │ │ ├── adding_a_package_directive.md │ │ ├── config_path_changes.md │ │ ├── object_instantiation_changes.md │ │ └── strict_mode_flag_deprecated.md │ │ ├── 1.0_to_1.1 │ │ ├── automatic_schema_matching.md │ │ ├── changes_to_default_composition_order.md │ │ ├── changes_to_package_header.md │ │ ├── defaults_list_interpolation_changes.md │ │ ├── defaults_list_override.md │ │ └── hydra_main_config_path.md │ │ ├── 1.1_to_1.2 │ │ ├── changes_to_job_working_dir.md │ │ ├── changes_to_sweeper_config.md │ │ └── hydra_main_config_path.md │ │ ├── intro.md │ │ └── version_base.md └── version-1.3 │ ├── advanced │ ├── compose_api.md │ ├── decorating_main.md │ ├── defaults_list.md │ ├── hydra-command-line-flags.md │ ├── instantiate_objects │ │ ├── config_files.md │ │ ├── overview.md │ │ └── structured_config.md │ ├── jupyter_notebooks.md │ ├── override_grammar │ │ ├── basic.md │ │ └── extended.md │ ├── overriding_packages.md │ ├── packaging.md │ ├── plugins │ │ ├── develop.md │ │ └── intro.md │ ├── search_path.md │ ├── terminology.md │ └── unit_testing.md │ ├── configure_hydra │ ├── Intro.md │ ├── app_help.md │ ├── job.md │ ├── logging.md │ └── workdir.md │ ├── development │ ├── documentation.md │ ├── overview.md │ ├── release.md │ ├── style_guide.md │ └── testing.md │ ├── experimental │ ├── callbacks.md │ ├── intro.md │ └── rerun.md │ ├── index.html │ ├── intro.md │ ├── patterns │ ├── configuring_experiments.md │ ├── configuring_plugins.md │ ├── extending_configs.md │ ├── select_multiple_configs_from_config_group.md │ ├── specializing_config.md │ └── write_protect_config_node.md │ ├── plugins │ ├── ax_sweeper.md │ ├── colorlog.md │ ├── joblib_launcher.md │ ├── nevergrad_sweeper.md │ ├── optuna_sweeper.md │ ├── ray_launcher.md │ ├── rq_launcher.md │ └── submitit_launcher.md │ ├── tutorials │ ├── basic │ │ ├── running_your_app │ │ │ ├── 2_multirun.md │ │ │ ├── 3_working_directory.md │ │ │ ├── 4_logging.md │ │ │ ├── 5_debugging.md │ │ │ └── 6_tab_completion.md │ │ └── your_first_app │ │ │ ├── 1_simple_cli.md │ │ │ ├── 2_config_file.md │ │ │ ├── 3_using_config.md │ │ │ ├── 4_config_groups.md │ │ │ ├── 5_defaults.md │ │ │ └── 6_composition.md │ ├── intro.md │ └── structured_config │ │ ├── 0_intro.md │ │ ├── 10_config_store.md │ │ ├── 1_minimal_example.md │ │ ├── 2_hierarchical_static_config.md │ │ ├── 3_config_groups.md │ │ ├── 4_defaults.md │ │ └── 5_schema.md │ └── upgrades │ ├── 0.11_to_1.0 │ ├── adding_a_package_directive.md │ ├── config_path_changes.md │ ├── object_instantiation_changes.md │ └── strict_mode_flag_deprecated.md │ ├── 1.0_to_1.1 │ ├── automatic_schema_matching.md │ ├── changes_to_default_composition_order.md │ ├── changes_to_package_header.md │ ├── defaults_list_interpolation_changes.md │ ├── defaults_list_override.md │ └── hydra_main_config_path.md │ ├── 1.1_to_1.2 │ ├── changes_to_job_working_dir.md │ ├── changes_to_sweeper_config.md │ └── hydra_main_config_path.md │ ├── intro.md │ └── version_base.md ├── versioned_sidebars ├── version-0.11-sidebars.json ├── version-1.0-sidebars.json ├── version-1.1-sidebars.json ├── version-1.2-sidebars.json └── version-1.3-sidebars.json ├── versions.json └── yarn.lock /.bandit: -------------------------------------------------------------------------------- 1 | [bandit] 2 | skips: B701,B608 3 | -------------------------------------------------------------------------------- /.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | omit = 3 | ${COVERAGE_HOME}/.nox/* 4 | ${COVERAGE_HOME}/*tests* 5 | ${COVERAGE_HOME}/plugins/* 6 | 7 | [report] 8 | exclude_lines = 9 | pragma: no cover 10 | # Don't complain if tests don't hit defensive assertion code: 11 | raise AssertionError 12 | raise NotImplementedError 13 | raise TypeError 14 | @deprecated 15 | assert False 16 | 17 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | open_collective: hydra 2 | -------------------------------------------------------------------------------- /.github/codeql.yml: -------------------------------------------------------------------------------- 1 | query-filters: 2 | - exclude: 3 | id: py/import-own-module 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .benchmarks 2 | /.idea 3 | /temp 4 | outputs 5 | multirun 6 | dist 7 | build 8 | __pycache__ 9 | *.pyc 10 | *.egg-info 11 | /.nox 12 | /report.json 13 | /.coverage 14 | /temp 15 | .mypy_cache 16 | pip-wheel-metadata 17 | .ipynb_checkpoints 18 | /.dmypy.json 19 | TODO.txt 20 | /venv 21 | -------------------------------------------------------------------------------- /.mypy.ini: -------------------------------------------------------------------------------- 1 | [mypy] 2 | mypy_path=.stubs 3 | exclude = (?x)( 4 | build/ 5 | | contrib/ 6 | ) 7 | 8 | [mypy-antlr4.*] 9 | ignore_missing_imports = True 10 | 11 | [mypy-hydra.grammar.gen.*] 12 | ignore_missing_imports = True 13 | ignore_errors = True 14 | 15 | [mypy-nevergrad.*] 16 | ignore_missing_imports = True 17 | 18 | [mypy-rq.*] 19 | ignore_missing_imports = True 20 | -------------------------------------------------------------------------------- /.stubs/hydra_plugins.pyi: -------------------------------------------------------------------------------- 1 | def __getattr__(name): ... # type: ignore 2 | -------------------------------------------------------------------------------- /.stubs/importlib_resources.pyi: -------------------------------------------------------------------------------- 1 | def __getattr__(name): ... # type: ignore 2 | -------------------------------------------------------------------------------- /.stubs/nox.pyi: -------------------------------------------------------------------------------- 1 | def __getattr__(name): ... # type: ignore 2 | -------------------------------------------------------------------------------- /.stubs/ray.pyi: -------------------------------------------------------------------------------- 1 | def __getattr__(name): ... # type: ignore 2 | -------------------------------------------------------------------------------- /.stubs/setuptools.pyi: -------------------------------------------------------------------------------- 1 | def __getattr__(name): ... # type: ignore 2 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Please see [NEWS.md](/NEWS.md) for an updated change log. 2 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.fb.com/codeofconduct) so that you can understand what actions will and will not be tolerated. -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include hydra/py.typed 2 | include requirements/requirements.txt 3 | global-exclude *.pyc 4 | global-exclude __pycache__ 5 | recursive-include hydra/* * 6 | recursive-include build_helpers *.py *.jar 7 | -------------------------------------------------------------------------------- /apt.txt: -------------------------------------------------------------------------------- 1 | default-jre 2 | -------------------------------------------------------------------------------- /build_helpers/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | import setuptools # isort:skip # noqa 3 | -------------------------------------------------------------------------------- /build_helpers/bin/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /build_helpers/bin/antlr-4.11.1-complete.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/build_helpers/bin/antlr-4.11.1-complete.jar -------------------------------------------------------------------------------- /build_helpers/bin/antlr4: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import subprocess 4 | import sys 5 | 6 | my_dir = os.path.realpath(os.path.dirname(__file__)) 7 | antlr = "antlr-4.11.1-complete.jar" 8 | args = ["java", "-jar", my_dir + "/" + antlr] 9 | args.extend(sys.argv[1:]) 10 | subprocess.check_call(args) 11 | -------------------------------------------------------------------------------- /build_helpers/bin/grun: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import subprocess 4 | import sys 5 | 6 | my_dir = os.path.realpath(os.path.dirname(__file__)) 7 | antlr = "antlr-4.11.1-complete.jar" 8 | args = ["java", "-cp", my_dir + "/" + antlr, "org.antlr.v4.gui.TestRig"] 9 | args.extend(sys.argv[1:]) 10 | subprocess.check_call(args) 11 | -------------------------------------------------------------------------------- /build_helpers/test_files/a/b/bad_dir/.gitkeep: -------------------------------------------------------------------------------- 1 | Intentionally left empty because git is stupid like that. -------------------------------------------------------------------------------- /build_helpers/test_files/a/b/file1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/build_helpers/test_files/a/b/file1.txt -------------------------------------------------------------------------------- /build_helpers/test_files/a/b/file2.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/build_helpers/test_files/a/b/file2.txt -------------------------------------------------------------------------------- /build_helpers/test_files/a/b/junk.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/build_helpers/test_files/a/b/junk.txt -------------------------------------------------------------------------------- /build_helpers/test_files/c/bad_dir/.gitkeep: -------------------------------------------------------------------------------- 1 | Intentionally left empty because git is stupid like that. -------------------------------------------------------------------------------- /build_helpers/test_files/c/file1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/build_helpers/test_files/c/file1.txt -------------------------------------------------------------------------------- /build_helpers/test_files/c/file2.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/build_helpers/test_files/c/file2.txt -------------------------------------------------------------------------------- /build_helpers/test_files/c/junk.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/build_helpers/test_files/c/junk.txt -------------------------------------------------------------------------------- /contrib/hydra_torchrun_launcher/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/contrib/hydra_torchrun_launcher/__init__.py -------------------------------------------------------------------------------- /contrib/hydra_torchrun_launcher/hydra_plugins/hydra_torchrun_launcher/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/contrib/hydra_torchrun_launcher/hydra_plugins/hydra_torchrun_launcher/__init__.py -------------------------------------------------------------------------------- /contrib/hydra_torchrun_launcher/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | The directory structure here is similar to the directory structure in the website/docs directory. -------------------------------------------------------------------------------- /examples/advanced/ad_hoc_composition/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - db: mysql 3 | - ui: full 4 | - schema: school 5 | -------------------------------------------------------------------------------- /examples/advanced/ad_hoc_composition/conf/db/mysql.yaml: -------------------------------------------------------------------------------- 1 | driver: mysql 2 | user: omry 3 | pass: secret 4 | -------------------------------------------------------------------------------- /examples/advanced/ad_hoc_composition/conf/db/postgresql.yaml: -------------------------------------------------------------------------------- 1 | driver: postgresql 2 | user: postgres_user 3 | pass: drowssap 4 | timeout: 10 5 | -------------------------------------------------------------------------------- /examples/advanced/ad_hoc_composition/conf/schema/school.yaml: -------------------------------------------------------------------------------- 1 | database: school 2 | tables: 3 | - name: students 4 | fields: 5 | - name: string 6 | - class: int 7 | - name: exams 8 | fields: 9 | - profession: string 10 | - time: data 11 | - class: int 12 | -------------------------------------------------------------------------------- /examples/advanced/ad_hoc_composition/conf/schema/support.yaml: -------------------------------------------------------------------------------- 1 | database: support 2 | tables: 3 | - name: users 4 | fields: 5 | - name: string 6 | - password: string 7 | - name: issues 8 | fields: 9 | - title: string 10 | - description: string 11 | - reported_by: string 12 | - priority: int 13 | -------------------------------------------------------------------------------- /examples/advanced/ad_hoc_composition/conf/schema/warehouse.yaml: -------------------------------------------------------------------------------- 1 | database: warehouse 2 | tables: 3 | - name: items 4 | fields: 5 | - name: string 6 | - acquisition_date: date 7 | - price: int 8 | -------------------------------------------------------------------------------- /examples/advanced/ad_hoc_composition/conf/ui/full.yaml: -------------------------------------------------------------------------------- 1 | windows: 2 | create_db: true 3 | view: true 4 | -------------------------------------------------------------------------------- /examples/advanced/ad_hoc_composition/conf/ui/view.yaml: -------------------------------------------------------------------------------- 1 | windows: 2 | view: true 3 | -------------------------------------------------------------------------------- /examples/advanced/config_search_path/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/advanced/config_search_path/additional_conf/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/advanced/config_search_path/additional_conf/dataset/imagenet.yaml: -------------------------------------------------------------------------------- 1 | name: imagenet 2 | path: /datasets/imagenet 3 | -------------------------------------------------------------------------------- /examples/advanced/config_search_path/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - dataset: cifar10 3 | - _self_ 4 | 5 | hydra: 6 | searchpath: 7 | - pkg://additional_conf 8 | # You can also use file based schema, for example: 9 | # - file:///etc/my_app 10 | # - file://${oc.env:HOME}/.my_app 11 | -------------------------------------------------------------------------------- /examples/advanced/config_search_path/conf/dataset/cifar10.yaml: -------------------------------------------------------------------------------- 1 | name: cifar10 2 | path: /datasets/cifar10 3 | -------------------------------------------------------------------------------- /examples/advanced/config_search_path/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path="conf", config_name="config") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg)) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /examples/advanced/defaults_list_interpolation/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - db: mysql 3 | - server: apache 4 | - optional server_db: ${server}_${db} 5 | -------------------------------------------------------------------------------- /examples/advanced/defaults_list_interpolation/conf/db/mysql.yaml: -------------------------------------------------------------------------------- 1 | name: mysql 2 | -------------------------------------------------------------------------------- /examples/advanced/defaults_list_interpolation/conf/db/sqlite.yaml: -------------------------------------------------------------------------------- 1 | name: sqlite 2 | -------------------------------------------------------------------------------- /examples/advanced/defaults_list_interpolation/conf/server/apache.yaml: -------------------------------------------------------------------------------- 1 | name: apache 2 | workers: 10 3 | -------------------------------------------------------------------------------- /examples/advanced/defaults_list_interpolation/conf/server/nginx.yaml: -------------------------------------------------------------------------------- 1 | name: nginx 2 | -------------------------------------------------------------------------------- /examples/advanced/defaults_list_interpolation/conf/server_db/apache_sqlite.yaml: -------------------------------------------------------------------------------- 1 | # @package server 2 | workers: 5 3 | -------------------------------------------------------------------------------- /examples/advanced/defaults_list_interpolation/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path="conf", config_name="config") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg)) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /examples/advanced/hydra_app_example/MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include hydra_app *.py 2 | recursive-include hydra_app *.yaml 3 | global-exclude *.pyc 4 | global-exclude __pycache__ 5 | -------------------------------------------------------------------------------- /examples/advanced/hydra_app_example/hydra_app/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/advanced/hydra_app_example/hydra_app/conf/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/advanced/hydra_app_example/hydra_app/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - db: mysql 3 | - _self_ 4 | 5 | app: 6 | user: ${oc.env:USER} 7 | 8 | num1: 10 9 | num2: 20 10 | 11 | db: ??? 12 | -------------------------------------------------------------------------------- /examples/advanced/hydra_app_example/hydra_app/conf/db/mysql.yaml: -------------------------------------------------------------------------------- 1 | host: localhost 2 | port: 3306 3 | -------------------------------------------------------------------------------- /examples/advanced/hydra_app_example/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/advanced/nested_defaults_list/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - server/apache 3 | 4 | debug: false 5 | -------------------------------------------------------------------------------- /examples/advanced/nested_defaults_list/conf/server/apache.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - db: mysql 3 | 4 | name: apache 5 | -------------------------------------------------------------------------------- /examples/advanced/nested_defaults_list/conf/server/db/mysql.yaml: -------------------------------------------------------------------------------- 1 | name: mysql 2 | -------------------------------------------------------------------------------- /examples/advanced/nested_defaults_list/conf/server/db/sqlite.yaml: -------------------------------------------------------------------------------- 1 | name: sqlite 2 | -------------------------------------------------------------------------------- /examples/advanced/nested_defaults_list/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path="conf", config_name="config") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg)) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /examples/advanced/package_overrides/conf/db/mysql.yaml: -------------------------------------------------------------------------------- 1 | driver: mysql 2 | user: omry 3 | pass: secret 4 | -------------------------------------------------------------------------------- /examples/advanced/package_overrides/conf/db/postgresql.yaml: -------------------------------------------------------------------------------- 1 | driver: postgresql 2 | user: postgres_user 3 | pass: drowssap 4 | timeout: 10 5 | -------------------------------------------------------------------------------- /examples/advanced/package_overrides/conf/simple.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - db: mysql 3 | -------------------------------------------------------------------------------- /examples/advanced/package_overrides/conf/two_packages.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - db@source: mysql 3 | - db@destination: mysql 4 | -------------------------------------------------------------------------------- /examples/advanced/package_overrides/simple.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path="conf", config_name="simple") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg)) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /examples/advanced/package_overrides/two_packages.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path="conf", config_name="two_packages") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg)) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /examples/advanced/ray_example/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - dataset: imagenet 3 | - model: alexnet 4 | 5 | ray: 6 | init: 7 | num_cpus: 4 8 | -------------------------------------------------------------------------------- /examples/advanced/ray_example/conf/dataset/cifar10.yaml: -------------------------------------------------------------------------------- 1 | name: cifar10 2 | path: /datasets/cifar10 3 | -------------------------------------------------------------------------------- /examples/advanced/ray_example/conf/dataset/imagenet.yaml: -------------------------------------------------------------------------------- 1 | name: imagenet 2 | path: /datasets/imagenet 3 | -------------------------------------------------------------------------------- /examples/advanced/ray_example/conf/model/alexnet.yaml: -------------------------------------------------------------------------------- 1 | type: alexnet 2 | num_layers: 7 3 | -------------------------------------------------------------------------------- /examples/advanced/ray_example/conf/model/resnet.yaml: -------------------------------------------------------------------------------- 1 | type: resnet 2 | num_layers: 50 3 | width: 10 4 | -------------------------------------------------------------------------------- /examples/configure_hydra/custom_help/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - db: mysql 3 | - override hydra/help: my_app_help 4 | -------------------------------------------------------------------------------- /examples/configure_hydra/custom_help/conf/db/mysql.yaml: -------------------------------------------------------------------------------- 1 | driver: mysql 2 | user: omry 3 | pass: secret 4 | -------------------------------------------------------------------------------- /examples/configure_hydra/custom_help/conf/db/postgresql.yaml: -------------------------------------------------------------------------------- 1 | driver: postgresql 2 | user: postgres_user 3 | pass: drowssap 4 | timeout: 10 5 | -------------------------------------------------------------------------------- /examples/configure_hydra/custom_help/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path="conf", config_name="config") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg)) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /examples/configure_hydra/job_name/config.yaml: -------------------------------------------------------------------------------- 1 | hydra: 2 | job: 3 | name: name_from_config_file 4 | -------------------------------------------------------------------------------- /examples/configure_hydra/job_override_dirname/config.yaml: -------------------------------------------------------------------------------- 1 | hydra: 2 | sweep: 3 | dir: multirun 4 | subdir: ${hydra.job.override_dirname}/seed=${seed} 5 | job: 6 | config: 7 | override_dirname: 8 | exclude_keys: 9 | - seed 10 | 11 | learning_rate: 0.1 12 | batch_size: 32 13 | seed: 1 14 | -------------------------------------------------------------------------------- /examples/configure_hydra/logging/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - override hydra/job_logging: custom 3 | -------------------------------------------------------------------------------- /examples/configure_hydra/logging/conf/hydra/job_logging/custom.yaml: -------------------------------------------------------------------------------- 1 | version: 1 2 | formatters: 3 | simple: 4 | format: '[%(levelname)s] - %(message)s' 5 | handlers: 6 | console: 7 | class: logging.StreamHandler 8 | formatter: simple 9 | stream: ext://sys.stdout 10 | root: 11 | handlers: [console] 12 | 13 | disable_existing_loggers: false 14 | -------------------------------------------------------------------------------- /examples/configure_hydra/workdir/conf/config.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | hydra: 3 | run: 4 | dir: run_dir 5 | sweep: 6 | dir: sweep_dir 7 | subdir: ${hydra.job.num} 8 | 9 | a: a1 10 | -------------------------------------------------------------------------------- /examples/configure_hydra/workdir/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | import os 3 | 4 | from omegaconf import DictConfig 5 | 6 | import hydra 7 | 8 | 9 | @hydra.main(version_base=None, config_path="conf", config_name="config") 10 | def experiment(_cfg: DictConfig) -> None: 11 | print(os.getcwd()) 12 | 13 | 14 | if __name__ == "__main__": 15 | experiment() 16 | -------------------------------------------------------------------------------- /examples/experimental/rerun/config.yaml: -------------------------------------------------------------------------------- 1 | foo: bar 2 | 3 | hydra: 4 | callbacks: 5 | save_job_info: 6 | _target_: hydra.experimental.callbacks.PickleJobInfoCallback 7 | job: 8 | chdir: false 9 | -------------------------------------------------------------------------------- /examples/instantiate/docs_example/config.yaml: -------------------------------------------------------------------------------- 1 | trainer: 2 | _target_: my_app.Trainer 3 | optimizer: 4 | _target_: my_app.Optimizer 5 | algo: SGD 6 | lr: 0.01 7 | dataset: 8 | _target_: my_app.Dataset 9 | name: Imagenet 10 | path: /datasets/imagenet 11 | -------------------------------------------------------------------------------- /examples/instantiate/object/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - db: mysql 3 | -------------------------------------------------------------------------------- /examples/instantiate/object/conf/db/mysql.yaml: -------------------------------------------------------------------------------- 1 | _target_: my_app.MySQLConnection 2 | host: localhost 3 | user: root 4 | password: 1234 5 | -------------------------------------------------------------------------------- /examples/instantiate/object/conf/db/postgresql.yaml: -------------------------------------------------------------------------------- 1 | _target_: my_app.PostgreSQLConnection 2 | host: localhost 3 | user: root 4 | password: 1234 5 | database: tutorial 6 | -------------------------------------------------------------------------------- /examples/instantiate/partial/config.yaml: -------------------------------------------------------------------------------- 1 | model: 2 | _target_: my_app.Model 3 | optim_partial: 4 | _partial_: true 5 | _target_: my_app.Optimizer 6 | algo: SGD 7 | -------------------------------------------------------------------------------- /examples/instantiate/schema_recursive/config.yaml: -------------------------------------------------------------------------------- 1 | tree: 2 | value: 1 3 | left: 4 | value: 20 5 | right: 6 | value: 30 7 | right: 8 | value: 300 9 | left: 10 | value: 400 11 | 12 | defaults: 13 | - config_schema 14 | - _self_ 15 | -------------------------------------------------------------------------------- /examples/jupyter_notebooks/README.md: -------------------------------------------------------------------------------- 1 | ## Jupyter notebooks 2 | 3 | - **compose_configs_in_notebook.ipynb** [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/facebookresearch/hydra/main?filepath=examples%2Fjupyter_notebooks%2Fcompose_configs_in_notebook.ipynb) 4 | -------------------------------------------------------------------------------- /examples/jupyter_notebooks/cloud_app/conf/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/jupyter_notebooks/cloud_app/conf/application/bananas.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | banana_fabribator: 3 | num_bananas: 42 4 | -------------------------------------------------------------------------------- /examples/jupyter_notebooks/cloud_app/conf/application/donkey.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | donkey: 3 | name: kong 4 | rank: king 5 | -------------------------------------------------------------------------------- /examples/jupyter_notebooks/cloud_app/conf/cloud_provider/aws.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | cloud: 3 | name: aws 4 | api_key: ${oc.env:AWS_API_KEY} 5 | ami_id: 1234 6 | -------------------------------------------------------------------------------- /examples/jupyter_notebooks/cloud_app/conf/cloud_provider/local.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | cloud: 3 | name: local 4 | host: localhost 5 | port: 9876 6 | -------------------------------------------------------------------------------- /examples/jupyter_notebooks/cloud_app/conf/config.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | defaults: 3 | - db: sqlite 4 | - cloud_provider: local 5 | - environment: testing 6 | -------------------------------------------------------------------------------- /examples/jupyter_notebooks/cloud_app/conf/db/mysql.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | db: 3 | driver: mysql 4 | user: ??? 5 | pass: ??? 6 | -------------------------------------------------------------------------------- /examples/jupyter_notebooks/cloud_app/conf/db/sqlite.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | db: 3 | driver: sqlite 4 | user: ??? 5 | pass: ??? 6 | file: test.db 7 | -------------------------------------------------------------------------------- /examples/jupyter_notebooks/cloud_app/conf/environment/production.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | db: 3 | user: mysql 4 | pass: r4Zn*jQ9JB1Rz2kfz 5 | -------------------------------------------------------------------------------- /examples/jupyter_notebooks/cloud_app/conf/environment/testing.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | db: 3 | user: test 4 | pass: test 5 | -------------------------------------------------------------------------------- /examples/patterns/configuring_experiments/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - db: mysql 3 | - server: apache 4 | -------------------------------------------------------------------------------- /examples/patterns/configuring_experiments/conf/db/mysql.yaml: -------------------------------------------------------------------------------- 1 | name: mysql 2 | -------------------------------------------------------------------------------- /examples/patterns/configuring_experiments/conf/db/sqlite.yaml: -------------------------------------------------------------------------------- 1 | name: sqlite 2 | -------------------------------------------------------------------------------- /examples/patterns/configuring_experiments/conf/experiment/aplite.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | defaults: 3 | - override /db: sqlite 4 | 5 | 6 | server: 7 | port: 8080 8 | -------------------------------------------------------------------------------- /examples/patterns/configuring_experiments/conf/experiment/nglite.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | defaults: 3 | - override /server: nginx 4 | - override /db: sqlite 5 | 6 | server: 7 | port: 8080 8 | -------------------------------------------------------------------------------- /examples/patterns/configuring_experiments/conf/server/apache.yaml: -------------------------------------------------------------------------------- 1 | name: apache 2 | port: 80 3 | -------------------------------------------------------------------------------- /examples/patterns/configuring_experiments/conf/server/nginx.yaml: -------------------------------------------------------------------------------- 1 | name: nginx 2 | port: 80 3 | -------------------------------------------------------------------------------- /examples/patterns/configuring_experiments/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path="conf", config_name="config") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg)) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /examples/patterns/extending_configs/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - db: ??? 3 | -------------------------------------------------------------------------------- /examples/patterns/extending_configs/conf/db/base_mysql.yaml: -------------------------------------------------------------------------------- 1 | host: localhost 2 | port: 3306 3 | user: ??? 4 | password: ??? 5 | -------------------------------------------------------------------------------- /examples/patterns/extending_configs/conf/db/mysql_extending_from_another_group.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - /db_schema/base_mysql@_here_ 3 | 4 | user: omry 5 | password: secret 6 | port: 3307 7 | encoding: utf8 8 | -------------------------------------------------------------------------------- /examples/patterns/extending_configs/conf/db/mysql_extending_from_this_group.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - base_mysql 3 | 4 | user: omry 5 | password: secret 6 | port: 3307 7 | encoding: utf8 8 | -------------------------------------------------------------------------------- /examples/patterns/extending_configs/conf/db_schema/base_mysql.yaml: -------------------------------------------------------------------------------- 1 | host: localhost 2 | port: 3306 3 | user: ??? 4 | password: ??? 5 | -------------------------------------------------------------------------------- /examples/patterns/extending_configs/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path="conf", config_name="config") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg)) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /examples/patterns/multi-select/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - server: apache 3 | -------------------------------------------------------------------------------- /examples/patterns/multi-select/conf/server/apache.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - site: 3 | - fb 4 | - google 5 | 6 | host: localhost 7 | port: 443 8 | -------------------------------------------------------------------------------- /examples/patterns/multi-select/conf/server/apache_https.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - site@https: 3 | - fb 4 | - google 5 | 6 | host: localhost 7 | port: 443 8 | -------------------------------------------------------------------------------- /examples/patterns/multi-select/conf/server/site/amazon.yaml: -------------------------------------------------------------------------------- 1 | amazon: 2 | domain: amazon.com 3 | -------------------------------------------------------------------------------- /examples/patterns/multi-select/conf/server/site/fb.yaml: -------------------------------------------------------------------------------- 1 | fb: 2 | domain: facebook.com 3 | -------------------------------------------------------------------------------- /examples/patterns/multi-select/conf/server/site/google.yaml: -------------------------------------------------------------------------------- 1 | google: 2 | domain: google.com 3 | -------------------------------------------------------------------------------- /examples/patterns/multi-select/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path="conf", config_name="config") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg)) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /examples/patterns/specializing_config/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - dataset: imagenet 3 | - model: alexnet 4 | - optional dataset_model: ${dataset}_${model} 5 | -------------------------------------------------------------------------------- /examples/patterns/specializing_config/conf/dataset/cifar10.yaml: -------------------------------------------------------------------------------- 1 | name: cifar10 2 | path: /datasets/cifar10 3 | -------------------------------------------------------------------------------- /examples/patterns/specializing_config/conf/dataset/imagenet.yaml: -------------------------------------------------------------------------------- 1 | name: imagenet 2 | path: /datasets/imagenet 3 | -------------------------------------------------------------------------------- /examples/patterns/specializing_config/conf/dataset_model/cifar10_alexnet.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | model: 3 | num_layers: 5 4 | -------------------------------------------------------------------------------- /examples/patterns/specializing_config/conf/model/alexnet.yaml: -------------------------------------------------------------------------------- 1 | type: alexnet 2 | num_layers: 7 3 | -------------------------------------------------------------------------------- /examples/patterns/specializing_config/conf/model/resnet.yaml: -------------------------------------------------------------------------------- 1 | type: resnet 2 | num_layers: 50 3 | width: 10 4 | -------------------------------------------------------------------------------- /examples/plugins/example_configsource_plugin/MANIFEST.in: -------------------------------------------------------------------------------- 1 | global-exclude *.pyc 2 | global-exclude __pycache__ 3 | recursive-include hydra_plugins/* *.yaml py.typed 4 | -------------------------------------------------------------------------------- /examples/plugins/example_configsource_plugin/hydra_plugins/example_configsource_plugin/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/plugins/example_configsource_plugin/hydra_plugins/example_configsource_plugin/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/examples/plugins/example_configsource_plugin/hydra_plugins/example_configsource_plugin/py.typed -------------------------------------------------------------------------------- /examples/plugins/example_configsource_plugin/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/plugins/example_generic_plugin/MANIFEST.in: -------------------------------------------------------------------------------- 1 | global-exclude *.pyc 2 | global-exclude __pycache__ 3 | recursive-include hydra_plugins/* *.yaml py.typed 4 | -------------------------------------------------------------------------------- /examples/plugins/example_generic_plugin/README.md: -------------------------------------------------------------------------------- 1 | # Hydra example plugin 2 | this plugin is not very useful, but demonstrates the plugin discovery capability of Hydra. 3 | 4 | Core plugins (Plugins that are developed jointly with Hydra) lives in the plugins subdirectory inside the Hydra repo. 5 | Third party plugins can live anywhere (public or private Github repos, Organizations in-house SCM etc) -------------------------------------------------------------------------------- /examples/plugins/example_generic_plugin/hydra_plugins/example_generic_plugin/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/plugins/example_generic_plugin/hydra_plugins/example_generic_plugin/example_plugin.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from hydra.plugins.plugin import Plugin 3 | 4 | 5 | class ExamplePlugin(Plugin): 6 | def __init__(self, v: int) -> None: 7 | self.v = v 8 | 9 | def add(self, x: int) -> int: 10 | return self.v + x 11 | -------------------------------------------------------------------------------- /examples/plugins/example_generic_plugin/hydra_plugins/example_generic_plugin/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/examples/plugins/example_generic_plugin/hydra_plugins/example_generic_plugin/py.typed -------------------------------------------------------------------------------- /examples/plugins/example_generic_plugin/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/plugins/example_launcher_plugin/MANIFEST.in: -------------------------------------------------------------------------------- 1 | global-exclude *.pyc 2 | global-exclude __pycache__ 3 | recursive-include hydra_plugins/* *.yaml py.typed 4 | -------------------------------------------------------------------------------- /examples/plugins/example_launcher_plugin/example/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - db: mysql 3 | - override hydra/launcher: example 4 | -------------------------------------------------------------------------------- /examples/plugins/example_launcher_plugin/example/conf/db/mysql.yaml: -------------------------------------------------------------------------------- 1 | driver: mysql 2 | user: omry 3 | pass: secret 4 | -------------------------------------------------------------------------------- /examples/plugins/example_launcher_plugin/example/conf/db/postgresql.yaml: -------------------------------------------------------------------------------- 1 | driver: postgresql 2 | user: postgres_user 3 | pass: drowssap 4 | timeout: 10 5 | -------------------------------------------------------------------------------- /examples/plugins/example_launcher_plugin/example/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | import hydra 3 | from omegaconf import OmegaConf, DictConfig 4 | 5 | 6 | @hydra.main(version_base=None, config_path="conf", config_name="config") 7 | def my_app(cfg: DictConfig) -> None: 8 | print(OmegaConf.to_yaml(cfg)) 9 | 10 | 11 | if __name__ == "__main__": 12 | my_app() 13 | -------------------------------------------------------------------------------- /examples/plugins/example_launcher_plugin/hydra_plugins/example_launcher_plugin/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/plugins/example_launcher_plugin/hydra_plugins/example_launcher_plugin/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/examples/plugins/example_launcher_plugin/hydra_plugins/example_launcher_plugin/py.typed -------------------------------------------------------------------------------- /examples/plugins/example_launcher_plugin/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/plugins/example_registered_plugin/MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include example_registered_plugin/* py.typed 2 | -------------------------------------------------------------------------------- /examples/plugins/example_registered_plugin/README.md: -------------------------------------------------------------------------------- 1 | # Hydra example plugin via `Plugins.register` 2 | This plugin is not very useful, but it demonstrates how to register a plugin using the `Plugins.register` method. -------------------------------------------------------------------------------- /examples/plugins/example_registered_plugin/example_registered_plugin/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/examples/plugins/example_registered_plugin/example_registered_plugin/py.typed -------------------------------------------------------------------------------- /examples/plugins/example_registered_plugin/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/plugins/example_searchpath_plugin/MANIFEST.in: -------------------------------------------------------------------------------- 1 | global-exclude *.pyc 2 | global-exclude __pycache__ 3 | recursive-include arbitrary_package/* *.yaml 4 | recursive-include hydra_plugins/* *.yaml py.typed 5 | -------------------------------------------------------------------------------- /examples/plugins/example_searchpath_plugin/arbitrary_package/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/plugins/example_searchpath_plugin/arbitrary_package/conf/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/plugins/example_searchpath_plugin/arbitrary_package/conf/hydra/output/my_default_output_dir.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | hydra: 3 | run: 4 | dir: /tmp/${now:%Y-%m-%d}/${now:%H-%M-%S} 5 | -------------------------------------------------------------------------------- /examples/plugins/example_searchpath_plugin/hydra_plugins/example_searchpath_plugin/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/plugins/example_searchpath_plugin/hydra_plugins/example_searchpath_plugin/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/examples/plugins/example_searchpath_plugin/hydra_plugins/example_searchpath_plugin/py.typed -------------------------------------------------------------------------------- /examples/plugins/example_searchpath_plugin/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/plugins/example_sweeper_plugin/MANIFEST.in: -------------------------------------------------------------------------------- 1 | global-exclude *.pyc 2 | global-exclude __pycache__ 3 | recursive-include hydra_plugins/* *.yaml py.typed 4 | -------------------------------------------------------------------------------- /examples/plugins/example_sweeper_plugin/example/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - db: mysql 3 | - override hydra/sweeper: example 4 | -------------------------------------------------------------------------------- /examples/plugins/example_sweeper_plugin/example/conf/db/mysql.yaml: -------------------------------------------------------------------------------- 1 | driver: mysql 2 | user: omry 3 | pass: secret 4 | -------------------------------------------------------------------------------- /examples/plugins/example_sweeper_plugin/example/conf/db/postgresql.yaml: -------------------------------------------------------------------------------- 1 | driver: postgresql 2 | user: postgres_user 3 | pass: drowssap 4 | timeout: 10 5 | -------------------------------------------------------------------------------- /examples/plugins/example_sweeper_plugin/example/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | import hydra 3 | from omegaconf import OmegaConf, DictConfig 4 | 5 | 6 | @hydra.main(version_base=None, config_path="conf", config_name="config") 7 | def my_app(cfg: DictConfig) -> None: 8 | print(OmegaConf.to_yaml(cfg)) 9 | 10 | 11 | if __name__ == "__main__": 12 | my_app() 13 | -------------------------------------------------------------------------------- /examples/plugins/example_sweeper_plugin/hydra_plugins/example_sweeper_plugin/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/plugins/example_sweeper_plugin/hydra_plugins/example_sweeper_plugin/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/examples/plugins/example_sweeper_plugin/hydra_plugins/example_sweeper_plugin/py.typed -------------------------------------------------------------------------------- /examples/plugins/example_sweeper_plugin/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/tutorials/basic/running_your_hydra_app/5_basic_sweep/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - db: ??? 3 | - _self_ 4 | 5 | hydra: 6 | sweeper: 7 | params: 8 | db: glob(*) 9 | db.timeout: 5,10 10 | -------------------------------------------------------------------------------- /examples/tutorials/basic/running_your_hydra_app/5_basic_sweep/conf/db/mysql.yaml: -------------------------------------------------------------------------------- 1 | driver: mysql 2 | user: omry 3 | password: secret 4 | timeout: 5 5 | -------------------------------------------------------------------------------- /examples/tutorials/basic/running_your_hydra_app/5_basic_sweep/conf/db/postgresql.yaml: -------------------------------------------------------------------------------- 1 | driver: postgresql 2 | user: postgres_user 3 | password: drowssap 4 | timeout: 10 5 | -------------------------------------------------------------------------------- /examples/tutorials/basic/your_first_hydra_app/1_simple_cli/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None) 8 | def my_app(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg)) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /examples/tutorials/basic/your_first_hydra_app/2_config_file/config.yaml: -------------------------------------------------------------------------------- 1 | db: 2 | driver: mysql 3 | user: omry 4 | password: secret 5 | -------------------------------------------------------------------------------- /examples/tutorials/basic/your_first_hydra_app/3_using_config/config.yaml: -------------------------------------------------------------------------------- 1 | node: # Config is hierarchical 2 | loompa: 10 # Simple value 3 | zippity: ${node.loompa} # Value interpolation 4 | do: "oompa ${node.loompa}" # String interpolation 5 | waldo: ??? # Missing value, must be populated prior to access 6 | -------------------------------------------------------------------------------- /examples/tutorials/basic/your_first_hydra_app/4_config_groups/conf/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/tutorials/basic/your_first_hydra_app/4_config_groups/conf/db/mysql.yaml: -------------------------------------------------------------------------------- 1 | driver: mysql 2 | user: omry 3 | password: secret 4 | -------------------------------------------------------------------------------- /examples/tutorials/basic/your_first_hydra_app/4_config_groups/conf/db/postgresql.yaml: -------------------------------------------------------------------------------- 1 | driver: postgresql 2 | user: postgres_user 3 | password: drowssap 4 | timeout: 10 5 | -------------------------------------------------------------------------------- /examples/tutorials/basic/your_first_hydra_app/4_config_groups/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path="conf") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg)) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /examples/tutorials/basic/your_first_hydra_app/5_defaults/conf/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/tutorials/basic/your_first_hydra_app/5_defaults/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - db: mysql 3 | -------------------------------------------------------------------------------- /examples/tutorials/basic/your_first_hydra_app/5_defaults/conf/db/mysql.yaml: -------------------------------------------------------------------------------- 1 | driver: mysql 2 | user: omry 3 | pass: secret 4 | -------------------------------------------------------------------------------- /examples/tutorials/basic/your_first_hydra_app/5_defaults/conf/db/postgresql.yaml: -------------------------------------------------------------------------------- 1 | driver: postgresql 2 | user: postgres_user 3 | pass: drowssap 4 | timeout: 10 5 | -------------------------------------------------------------------------------- /examples/tutorials/basic/your_first_hydra_app/6_composition/conf/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/tutorials/basic/your_first_hydra_app/6_composition/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - db: mysql 3 | - ui: full 4 | - schema: school 5 | -------------------------------------------------------------------------------- /examples/tutorials/basic/your_first_hydra_app/6_composition/conf/db/mysql.yaml: -------------------------------------------------------------------------------- 1 | driver: mysql 2 | user: omry 3 | pass: secret 4 | -------------------------------------------------------------------------------- /examples/tutorials/basic/your_first_hydra_app/6_composition/conf/db/postgresql.yaml: -------------------------------------------------------------------------------- 1 | driver: postgresql 2 | user: postgres_user 3 | pass: drowssap 4 | timeout: 10 5 | -------------------------------------------------------------------------------- /examples/tutorials/basic/your_first_hydra_app/6_composition/conf/schema/school.yaml: -------------------------------------------------------------------------------- 1 | database: school 2 | tables: 3 | - name: students 4 | fields: 5 | - name: string 6 | - class: int 7 | - name: exams 8 | fields: 9 | - profession: string 10 | - time: data 11 | - class: int 12 | -------------------------------------------------------------------------------- /examples/tutorials/basic/your_first_hydra_app/6_composition/conf/schema/support.yaml: -------------------------------------------------------------------------------- 1 | database: support 2 | tables: 3 | - name: users 4 | fields: 5 | - name: string 6 | - password: string 7 | - name: issues 8 | fields: 9 | - title: string 10 | - description: string 11 | - reported_by: string 12 | - priority: int 13 | -------------------------------------------------------------------------------- /examples/tutorials/basic/your_first_hydra_app/6_composition/conf/schema/warehouse.yaml: -------------------------------------------------------------------------------- 1 | database: warehouse 2 | tables: 3 | - name: items 4 | fields: 5 | - name: string 6 | - acquisition_date: date 7 | - price: int 8 | -------------------------------------------------------------------------------- /examples/tutorials/basic/your_first_hydra_app/6_composition/conf/ui/full.yaml: -------------------------------------------------------------------------------- 1 | windows: 2 | create_db: true 3 | view: true 4 | -------------------------------------------------------------------------------- /examples/tutorials/basic/your_first_hydra_app/6_composition/conf/ui/view.yaml: -------------------------------------------------------------------------------- 1 | windows: 2 | view: true 3 | -------------------------------------------------------------------------------- /examples/tutorials/structured_configs/5.1_structured_config_schema_same_config_group/conf/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/tutorials/structured_configs/5.1_structured_config_schema_same_config_group/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - base_config 3 | - db: mysql 4 | # You typically want _self_ somewhere after the schema (base_config) 5 | - _self_ 6 | 7 | debug: true 8 | -------------------------------------------------------------------------------- /examples/tutorials/structured_configs/5.1_structured_config_schema_same_config_group/conf/db/mysql.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - base_mysql 3 | 4 | user: omry 5 | password: secret 6 | -------------------------------------------------------------------------------- /examples/tutorials/structured_configs/5.1_structured_config_schema_same_config_group/conf/db/postgresql.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - base_postgresql 3 | 4 | user: postgres_user 5 | password: drowssap 6 | -------------------------------------------------------------------------------- /examples/tutorials/structured_configs/5.2_structured_config_schema_different_config_group/conf/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /examples/tutorials/structured_configs/5.2_structured_config_schema_different_config_group/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - base_config 3 | - db: mysql 4 | # You typically want _self_ somewhere after the schema (base_config) 5 | - _self_ 6 | 7 | debug: true 8 | -------------------------------------------------------------------------------- /examples/tutorials/structured_configs/5.2_structured_config_schema_different_config_group/conf/db/mysql.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - /database_lib/db/mysql@_here_ 3 | 4 | user: omry 5 | password: secret 6 | -------------------------------------------------------------------------------- /examples/tutorials/structured_configs/5.2_structured_config_schema_different_config_group/conf/db/postgresql.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - /database_lib/db/postgresql@_here_ 3 | 4 | user: postgres_user 5 | password: drowssap 6 | -------------------------------------------------------------------------------- /hydra/_internal/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /hydra/_internal/core_plugins/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /hydra/_internal/grammar/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /hydra/_internal/instantiate/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /hydra/conf/hydra/env/default.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/hydra/conf/hydra/env/default.yaml -------------------------------------------------------------------------------- /hydra/conf/hydra/hydra_logging/disabled.yaml: -------------------------------------------------------------------------------- 1 | version: 1 2 | root: 3 | level: ERROR 4 | disable_existing_loggers: true 5 | -------------------------------------------------------------------------------- /hydra/conf/hydra/hydra_logging/none.yaml: -------------------------------------------------------------------------------- 1 | version: 1 2 | root: null 3 | disable_existing_loggers: false 4 | -------------------------------------------------------------------------------- /hydra/conf/hydra/job_logging/disabled.yaml: -------------------------------------------------------------------------------- 1 | version: 1 2 | root: 3 | level: ERROR 4 | disable_existing_loggers: true 5 | -------------------------------------------------------------------------------- /hydra/conf/hydra/job_logging/none.yaml: -------------------------------------------------------------------------------- 1 | version: 1 2 | root: null 3 | disable_existing_loggers: false 4 | -------------------------------------------------------------------------------- /hydra/conf/hydra/job_logging/stdout.yaml: -------------------------------------------------------------------------------- 1 | # python logging configuration for tasks 2 | version: 1 3 | formatters: 4 | simple: 5 | format: '%(message)s' 6 | handlers: 7 | console: 8 | class: logging.StreamHandler 9 | formatter: simple 10 | stream: ext://sys.stdout 11 | root: 12 | level: INFO 13 | handlers: [console] 14 | 15 | disable_existing_loggers: false 16 | -------------------------------------------------------------------------------- /hydra/conf/hydra/output/default.yaml: -------------------------------------------------------------------------------- 1 | # @package hydra 2 | 3 | run: 4 | dir: outputs/${now:%Y-%m-%d}/${now:%H-%M-%S} 5 | sweep: 6 | dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S} 7 | subdir: ${hydra.job.num} 8 | -------------------------------------------------------------------------------- /hydra/core/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /hydra/core/object_type.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from enum import Enum 3 | 4 | 5 | class ObjectType(Enum): 6 | NOT_FOUND = 0 7 | CONFIG = 1 8 | GROUP = 2 9 | -------------------------------------------------------------------------------- /hydra/core/override_parser/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /hydra/experimental/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from .compose import compose 3 | from .initialize import initialize, initialize_config_dir, initialize_config_module 4 | 5 | __all__ = [ 6 | "compose", 7 | "initialize", 8 | "initialize_config_module", 9 | "initialize_config_dir", 10 | ] 11 | -------------------------------------------------------------------------------- /hydra/grammar/.gitignore: -------------------------------------------------------------------------------- 1 | OverrideLexer.tokens 2 | -------------------------------------------------------------------------------- /hydra/grammar/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /hydra/grammar/gen/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | 4 | -------------------------------------------------------------------------------- /hydra/plugins/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /hydra/plugins/plugin.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from abc import ABC 3 | 4 | 5 | class Plugin(ABC): ... 6 | -------------------------------------------------------------------------------- /hydra/plugins/search_path_plugin.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from abc import abstractmethod 3 | 4 | from hydra.core.config_search_path import ConfigSearchPath 5 | 6 | from .plugin import Plugin 7 | 8 | 9 | class SearchPathPlugin(Plugin): 10 | @abstractmethod 11 | def manipulate_search_path(self, search_path: ConfigSearchPath) -> None: ... 12 | -------------------------------------------------------------------------------- /hydra/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/hydra/py.typed -------------------------------------------------------------------------------- /hydra/test_utils/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /hydra/test_utils/a_module.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main() 8 | def experiment(_: DictConfig) -> None: 9 | pass 10 | 11 | 12 | if __name__ == "__main__": 13 | experiment() 14 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/accessing_hydra_config.yaml: -------------------------------------------------------------------------------- 1 | cwd: ${hydra:runtime.cwd} 2 | job_name: ${hydra:job.name} 3 | config_name: ${hydra:job.config_name} 4 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/completion_test/additional_searchpath.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - _self_ 3 | - group: null 4 | 5 | hydra: 6 | searchpath: 7 | - pkg://hydra.test_utils.configs.completion_test_additional_package 8 | - file://hydra/test_utils/configs/completion_test_additional_file 9 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/completion_test/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - _self_ 3 | - group: null 4 | 5 | # a mapping item 6 | dict: 7 | key1: val1 8 | key2: val2 9 | key3: ??? 10 | 11 | # an item with a prefix identical to that of the dict 12 | dict_prefix: yup 13 | 14 | # a list item 15 | list: 16 | - aa 17 | - bb 18 | - ??? 19 | 20 | # an item with a prefix identical to a list 21 | list_prefix: yup 22 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/completion_test/group/dict.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | # top level dict 3 | group: 4 | dict: true 5 | toys: 6 | andy: davis 7 | slinky: dog 8 | list: 9 | - aa 10 | - bb 11 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/completion_test/group/list.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | - buzz lightyear 3 | - sheriff andy 4 | # dict in list 5 | - name: Toy Story 6 | length: 81 minutes 7 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/completion_test/hydra/launcher/fairtask.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | fairtask_launcher: true 3 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/completion_test/missing_default.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group: ??? 3 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/completion_test/test_hydra/launcher/fairtask.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | fairtask_launcher: true 3 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/completion_test_additional_file/additional_group/file_opt_additional.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/hydra/test_utils/configs/completion_test_additional_file/additional_group/file_opt_additional.yaml -------------------------------------------------------------------------------- /hydra/test_utils/configs/completion_test_additional_file/group/file_opt.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/hydra/test_utils/configs/completion_test_additional_file/group/file_opt.yaml -------------------------------------------------------------------------------- /hydra/test_utils/configs/completion_test_additional_package/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/completion_test_additional_package/additional_group/pkg_opt_additional.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/hydra/test_utils/configs/completion_test_additional_package/additional_group/pkg_opt_additional.yaml -------------------------------------------------------------------------------- /hydra/test_utils/configs/completion_test_additional_package/group/pkg_opt.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/hydra/test_utils/configs/completion_test_additional_package/group/pkg_opt.yaml -------------------------------------------------------------------------------- /hydra/test_utils/configs/compose.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | defaults: 3 | - group1: file1 4 | - group2: file1 5 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/conf.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/hydra/test_utils/configs/conf.zip -------------------------------------------------------------------------------- /hydra/test_utils/configs/config.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | normal_yaml_config: true 3 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/config.yml: -------------------------------------------------------------------------------- 1 | # intentionally .yml and not .yaml 2 | yml_file_here: true 3 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/custom_resolver.yaml: -------------------------------------------------------------------------------- 1 | x: ${my_custom_resolver:} 2 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/db/mysql.yaml: -------------------------------------------------------------------------------- 1 | driver: mysql 2 | user: omry 3 | password: secret 4 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/db/postgresql.yaml: -------------------------------------------------------------------------------- 1 | driver: postgresql 2 | user: postgres_user 3 | password: drowssap 4 | timeout: 10 5 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/db/validated_mysql.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - base_mysql 3 | 4 | driver: mysql 5 | user: omry 6 | password: secret 7 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/db/validated_postgresql.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - base_postgresql 3 | 4 | driver: postgresql 5 | user: postgres_user 6 | password: drowssap 7 | timeout: 10 8 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/db_conf.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - db: mysql 3 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/defaults_not_list.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | all: wrong 3 | should_be: list 4 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/group1/abc.cde.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | abc=cde 3 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/group1/file1.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | foo: 10 3 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/group1/file2.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | foo: 20 3 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/group2/file1.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | bar: 100 3 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/group2/file2.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | bar: 200 3 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/missing-default.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - foo: file1 3 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/missing-optional-default.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - optional foo: missing 3 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/missing_init_py/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore 2 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/missing_init_py/test.yaml: -------------------------------------------------------------------------------- 1 | a: 10 2 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/optional-default.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - optional group1: file1 3 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/overriding_output_dir.yaml: -------------------------------------------------------------------------------- 1 | hydra: 2 | run: 3 | dir: foo 4 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/overriding_run_dir.yaml: -------------------------------------------------------------------------------- 1 | hydra: 2 | run: 3 | dir: cde 4 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/package_tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/package_tests/group1/option1.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | group1_option1: true 3 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/package_tests/group1/option2.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | group1_option2: true 3 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/package_tests/group2/option1.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | group2_option1: true 3 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/package_tests/group2/option2.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | group2_option2: true 3 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/package_tests/pkg_override.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: option1 3 | - group2@pkg1: option1 4 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/package_tests/two_packages_one_group.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1@pkg1: option1 3 | - group1@pkg2: option1 4 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/schema_key_error.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - base_mysql 3 | - _self_ 4 | 5 | foo: not_in_schema 6 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/schema_validation_error.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - base_mysql 3 | - _self_ 4 | 5 | port: not_an_int 6 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/some_config.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | some_config: true 3 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/top_level_list/file1.yaml: -------------------------------------------------------------------------------- 1 | - a 2 | -------------------------------------------------------------------------------- /hydra/test_utils/configs/unspecified_mandatory_default.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: ??? 3 | -------------------------------------------------------------------------------- /hydra/test_utils/example_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path="configs", config_name="db_conf") 8 | def run_cli(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg)) 10 | 11 | 12 | if __name__ == "__main__": 13 | run_cli() 14 | -------------------------------------------------------------------------------- /lgtm.yml: -------------------------------------------------------------------------------- 1 | queries: 2 | - exclude: py/import-own-module 3 | -------------------------------------------------------------------------------- /news/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore -------------------------------------------------------------------------------- /news/1547.feature: -------------------------------------------------------------------------------- 1 | Add extend_list function to override syntax 2 | -------------------------------------------------------------------------------- /news/2570.bugfix: -------------------------------------------------------------------------------- 1 | Fix a command line parsing bug in multirun mode when `PYTHONOPTIMIZE=1` 2 | -------------------------------------------------------------------------------- /news/2699.maintenance: -------------------------------------------------------------------------------- 1 | Use OmegaConf's vendored version of `antlr4` runtime to prevent conflicts with other dependencies. See https://github.com/omry/omegaconf/pull/1114 for more details. 2 | -------------------------------------------------------------------------------- /news/2852.api_change: -------------------------------------------------------------------------------- 1 | Python 3.7 is not supported anymore: Hydra now requires Python 3.8+ 2 | -------------------------------------------------------------------------------- /news/2928.bugfix: -------------------------------------------------------------------------------- 1 | Fix StructuredConfigStore using old singleton copy when using lazy imports 2 | -------------------------------------------------------------------------------- /news/2929.feature: -------------------------------------------------------------------------------- 1 | Add json_str function to override syntax 2 | -------------------------------------------------------------------------------- /news/2934.feature: -------------------------------------------------------------------------------- 1 | Add to_hydra_override_value_str util function 2 | -------------------------------------------------------------------------------- /news/3001.bugfix: -------------------------------------------------------------------------------- 1 | Fix unexpected resolution side-effect that caused modifications to the input config parent in `hydra.utils.instantiate` 2 | -------------------------------------------------------------------------------- /plugins/.isort.cfg: -------------------------------------------------------------------------------- 1 | [settings] 2 | multi_line_output=3 3 | include_trailing_comma=true 4 | force_grid_wrap=0 5 | use_parentheses=true 6 | line_length=88 7 | ensure_newline_before_comments=true 8 | float_to_top=true 9 | sections= 10 | FUTURE 11 | STDLIB 12 | THIRDPARTY 13 | FIRSTPARTY 14 | LOCALFOLDER 15 | default_section=THIRDPARTY 16 | known_first_party=hydra_plugins 17 | 18 | -------------------------------------------------------------------------------- /plugins/hydra_ax_sweeper/MANIFEST.in: -------------------------------------------------------------------------------- 1 | global-exclude *.pyc 2 | global-exclude __pycache__ 3 | recursive-include hydra_plugins/* *.yaml py.typed 4 | -------------------------------------------------------------------------------- /plugins/hydra_ax_sweeper/README.md: -------------------------------------------------------------------------------- 1 | # Hydra Ax Sweeper 2 | Provides a [`Ax Sweeper`](https://ax.dev/) based Hydra Sweeper supporting parallel execution. 3 | 4 | See [website](https://hydra.cc/docs/plugins/ax_sweeper/) for more information 5 | -------------------------------------------------------------------------------- /plugins/hydra_ax_sweeper/hydra_plugins/hydra_ax_sweeper/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | 3 | __version__ = "1.4.0.dev0" 4 | -------------------------------------------------------------------------------- /plugins/hydra_ax_sweeper/hydra_plugins/hydra_ax_sweeper/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/plugins/hydra_ax_sweeper/hydra_plugins/hydra_ax_sweeper/py.typed -------------------------------------------------------------------------------- /plugins/hydra_ax_sweeper/news/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore -------------------------------------------------------------------------------- /plugins/hydra_ax_sweeper/news/2330.feature: -------------------------------------------------------------------------------- 1 | Support returning a dict (rather than just a scalar value) from the `@hydra.main`-decorated task function 2 | -------------------------------------------------------------------------------- /plugins/hydra_ax_sweeper/tests/apps/polynomial_with_coefficients.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - override hydra/sweeper: ax 3 | 4 | polynomial: 5 | coefficients: ??? 6 | 7 | hydra: 8 | sweeper: 9 | ax_config: 10 | max_trials: 10 11 | 12 | experiment: 13 | minimize: true 14 | 15 | early_stop: 16 | max_epochs_without_improvement: 2 17 | -------------------------------------------------------------------------------- /plugins/hydra_ax_sweeper/tests/apps/polynomial_with_dict_coefficients.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - override hydra/sweeper: ax 3 | 4 | polynomial: 5 | coefficients: ??? 6 | 7 | hydra: 8 | sweeper: 9 | ax_config: 10 | max_trials: 10 11 | 12 | experiment: 13 | minimize: true 14 | 15 | early_stop: 16 | max_epochs_without_improvement: 2 17 | -------------------------------------------------------------------------------- /plugins/hydra_ax_sweeper/tests/config/params/basic.yaml: -------------------------------------------------------------------------------- 1 | # @package hydra.sweeper.ax_config.params 2 | quadratic.x: 3 | type: range 4 | bounds: [-1, 1] 5 | 6 | quadratic.y: 7 | type: range 8 | bounds: [-1, 1] 9 | -------------------------------------------------------------------------------- /plugins/hydra_ax_sweeper/tests/config/params/logscale.yaml: -------------------------------------------------------------------------------- 1 | # @package hydra.sweeper.ax_config.params 2 | quadratic.x: 3 | type: range 4 | bounds: [1e-6, 1] 5 | log_scale: true 6 | 7 | quadratic.y: 8 | type: range 9 | bounds: [-1, 1] 10 | -------------------------------------------------------------------------------- /plugins/hydra_ax_sweeper/tests/config/quadratic/basic.yaml: -------------------------------------------------------------------------------- 1 | x: ??? 2 | y: ??? 3 | -------------------------------------------------------------------------------- /plugins/hydra_colorlog/MANIFEST.in: -------------------------------------------------------------------------------- 1 | global-exclude *.pyc 2 | global-exclude __pycache__ 3 | recursive-include hydra_plugins/hydra_colorlog/conf *.yaml py.typed 4 | -------------------------------------------------------------------------------- /plugins/hydra_colorlog/README.md: -------------------------------------------------------------------------------- 1 | # Hydra colorlog 2 | Adds colorlog colored logs for `hydra/job_logging` and `hydra/hydra_logging`. 3 | 4 | See [website](https://hydra.cc/docs/plugins/colorlog) for more information 5 | -------------------------------------------------------------------------------- /plugins/hydra_colorlog/example/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - override hydra/job_logging: colorlog 3 | - override hydra/hydra_logging: colorlog 4 | -------------------------------------------------------------------------------- /plugins/hydra_colorlog/hydra_plugins/hydra_colorlog/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | 3 | __version__ = "1.4.0.dev0" 4 | -------------------------------------------------------------------------------- /plugins/hydra_colorlog/hydra_plugins/hydra_colorlog/conf/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /plugins/hydra_colorlog/hydra_plugins/hydra_colorlog/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/plugins/hydra_colorlog/hydra_plugins/hydra_colorlog/py.typed -------------------------------------------------------------------------------- /plugins/hydra_colorlog/news/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore -------------------------------------------------------------------------------- /plugins/hydra_colorlog/news/2443.feature: -------------------------------------------------------------------------------- 1 | Support python3.11 2 | -------------------------------------------------------------------------------- /plugins/hydra_colorlog/news/2663.bugfix: -------------------------------------------------------------------------------- 1 | Fix log file path for colorlog to work correctly if Hydra does not change the current working directory 2 | -------------------------------------------------------------------------------- /plugins/hydra_colorlog/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /plugins/hydra_joblib_launcher/MANIFEST.in: -------------------------------------------------------------------------------- 1 | global-exclude *.pyc 2 | global-exclude __pycache__ 3 | recursive-include hydra_plugins/* *.yaml py.typed 4 | -------------------------------------------------------------------------------- /plugins/hydra_joblib_launcher/README.md: -------------------------------------------------------------------------------- 1 | # Hydra Joblib Launcher 2 | Provides a [`Joblib.Parallel`](https://joblib.readthedocs.io/en/latest/parallel.html) based Hydra Launcher supporting parallel execution. 3 | 4 | See [website](https://hydra.cc/docs/plugins/joblib_launcher) for more information 5 | -------------------------------------------------------------------------------- /plugins/hydra_joblib_launcher/example/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - override hydra/launcher: joblib 3 | 4 | task: 1 5 | 6 | hydra: 7 | launcher: 8 | # override the number of jobs for joblib 9 | n_jobs: 10 10 | -------------------------------------------------------------------------------- /plugins/hydra_joblib_launcher/hydra_plugins/hydra_joblib_launcher/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | 3 | __version__ = "1.4.0.dev0" 4 | -------------------------------------------------------------------------------- /plugins/hydra_joblib_launcher/hydra_plugins/hydra_joblib_launcher/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/plugins/hydra_joblib_launcher/hydra_plugins/hydra_joblib_launcher/py.typed -------------------------------------------------------------------------------- /plugins/hydra_joblib_launcher/news/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore -------------------------------------------------------------------------------- /plugins/hydra_joblib_launcher/news/2443.feature: -------------------------------------------------------------------------------- 1 | Support python3.11 2 | -------------------------------------------------------------------------------- /plugins/hydra_joblib_launcher/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /plugins/hydra_nevergrad_sweeper/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .mypy_cache 3 | *.swp 4 | __pycache__ 5 | -------------------------------------------------------------------------------- /plugins/hydra_nevergrad_sweeper/MANIFEST.in: -------------------------------------------------------------------------------- 1 | global-exclude *.pyc 2 | global-exclude __pycache__ 3 | recursive-include hydra_plugins/* *.yaml py.typed 4 | -------------------------------------------------------------------------------- /plugins/hydra_nevergrad_sweeper/README.md: -------------------------------------------------------------------------------- 1 | # Hydra Nevergrad Sweeper plugin 2 | 3 | Provides a mechanism for Hydra applications to use [Nevergrad](https://github.com/facebookresearch/nevergrad) algorithms for the optimization of the parameters of any experiment. 4 | 5 | See [website](https://hydra.cc/docs/plugins/nevergrad_sweeper) for more information -------------------------------------------------------------------------------- /plugins/hydra_nevergrad_sweeper/hydra_plugins/hydra_nevergrad_sweeper/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | 3 | __version__ = "1.4.0.dev0" 4 | -------------------------------------------------------------------------------- /plugins/hydra_nevergrad_sweeper/hydra_plugins/hydra_nevergrad_sweeper/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/plugins/hydra_nevergrad_sweeper/hydra_plugins/hydra_nevergrad_sweeper/py.typed -------------------------------------------------------------------------------- /plugins/hydra_nevergrad_sweeper/news/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore -------------------------------------------------------------------------------- /plugins/hydra_nevergrad_sweeper/news/2443.feature: -------------------------------------------------------------------------------- 1 | Support python3.11 2 | -------------------------------------------------------------------------------- /plugins/hydra_nevergrad_sweeper/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /plugins/hydra_optuna_sweeper/MANIFEST.in: -------------------------------------------------------------------------------- 1 | global-exclude *.pyc 2 | global-exclude __pycache__ 3 | recursive-include hydra_plugins/* *.yaml py.typed 4 | -------------------------------------------------------------------------------- /plugins/hydra_optuna_sweeper/README.md: -------------------------------------------------------------------------------- 1 | # Hydra Optuna Sweeper 2 | 3 | Provides an [Optuna](https://optuna.org) based Hydra Sweeper. 4 | 5 | See [website](https://hydra.cc/docs/plugins/optuna_sweeper/) for more information. 6 | -------------------------------------------------------------------------------- /plugins/hydra_optuna_sweeper/hydra_plugins/hydra_optuna_sweeper/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | 3 | __version__ = "1.4.0.dev0" 4 | -------------------------------------------------------------------------------- /plugins/hydra_optuna_sweeper/hydra_plugins/hydra_optuna_sweeper/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/plugins/hydra_optuna_sweeper/hydra_plugins/hydra_optuna_sweeper/py.typed -------------------------------------------------------------------------------- /plugins/hydra_optuna_sweeper/news/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore -------------------------------------------------------------------------------- /plugins/hydra_optuna_sweeper/news/1513.feature: -------------------------------------------------------------------------------- 1 | Add fault tolerance via `max_failure_rate` parameter 2 | -------------------------------------------------------------------------------- /plugins/hydra_optuna_sweeper/news/2443.feature: -------------------------------------------------------------------------------- 1 | Support python3.11 2 | -------------------------------------------------------------------------------- /plugins/hydra_optuna_sweeper/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /plugins/hydra_ray_launcher/MANIFEST.in: -------------------------------------------------------------------------------- 1 | global-exclude *.pyc 2 | global-exclude __pycache__ 3 | recursive-include hydra_plugins/* *.yaml py.typed 4 | -------------------------------------------------------------------------------- /plugins/hydra_ray_launcher/README.md: -------------------------------------------------------------------------------- 1 | # Hydra Ray Launcher 2 | Provides a [`Ray`](https://docs.ray.io/en/latest/) based Hydra Launcher supporting execution on AWS. 3 | 4 | See [website](https://hydra.cc/docs/plugins/ray_launcher) for more information 5 | -------------------------------------------------------------------------------- /plugins/hydra_ray_launcher/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /plugins/hydra_ray_launcher/examples/simple/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - override hydra/launcher: ray_aws 3 | 4 | task: 1 5 | -------------------------------------------------------------------------------- /plugins/hydra_ray_launcher/examples/upload_download/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - override hydra/launcher: custom_ray_aws 3 | 4 | random_seed: 0 5 | checkpoint_path: checkpoint 6 | -------------------------------------------------------------------------------- /plugins/hydra_ray_launcher/hydra_plugins/hydra_ray_launcher/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | 3 | __version__ = "1.4.0.dev0" 4 | -------------------------------------------------------------------------------- /plugins/hydra_ray_launcher/hydra_plugins/hydra_ray_launcher/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/plugins/hydra_ray_launcher/hydra_plugins/hydra_ray_launcher/py.typed -------------------------------------------------------------------------------- /plugins/hydra_ray_launcher/news/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore -------------------------------------------------------------------------------- /plugins/hydra_ray_launcher/pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | addopts = -p no:warnings 3 | log_cli = True 4 | log_cli_level = INFO 5 | -------------------------------------------------------------------------------- /plugins/hydra_ray_launcher/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /plugins/hydra_rq_launcher/MANIFEST.in: -------------------------------------------------------------------------------- 1 | global-exclude *.pyc 2 | global-exclude __pycache__ 3 | recursive-include hydra_plugins/* *.yaml py.typed 4 | -------------------------------------------------------------------------------- /plugins/hydra_rq_launcher/README.md: -------------------------------------------------------------------------------- 1 | # Hydra RQ Launcher 2 | Provides a [Redis Queue (RQ)](https://python-rq.org) launcher for Hydra supporting distributed execution and job queuing. 3 | 4 | See [website](https://hydra.cc/docs/plugins/rq_launcher) for more information 5 | -------------------------------------------------------------------------------- /plugins/hydra_rq_launcher/example/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - override hydra/launcher: rq 3 | 4 | task: 1 5 | 6 | hydra: 7 | launcher: 8 | enqueue: 9 | job_timeout: '1d' 10 | -------------------------------------------------------------------------------- /plugins/hydra_rq_launcher/hydra_plugins/hydra_rq_launcher/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | 3 | __version__ = "1.4.0.dev0" 4 | -------------------------------------------------------------------------------- /plugins/hydra_rq_launcher/hydra_plugins/hydra_rq_launcher/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/plugins/hydra_rq_launcher/hydra_plugins/hydra_rq_launcher/py.typed -------------------------------------------------------------------------------- /plugins/hydra_rq_launcher/news/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore -------------------------------------------------------------------------------- /plugins/hydra_rq_launcher/news/2443.feature: -------------------------------------------------------------------------------- 1 | Support python3.11 2 | -------------------------------------------------------------------------------- /plugins/hydra_rq_launcher/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /plugins/hydra_rq_launcher/tests/conftest.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from typing import Any 3 | 4 | from pytest import fixture 5 | 6 | 7 | @fixture(autouse=True) 8 | def env_setup(monkeypatch: Any) -> None: 9 | # Tests use fake redis server by setting REDIS_MOCK to True 10 | monkeypatch.setenv("REDIS_MOCK", "True") 11 | -------------------------------------------------------------------------------- /plugins/hydra_submitit_launcher/MANIFEST.in: -------------------------------------------------------------------------------- 1 | global-exclude *.pyc 2 | global-exclude __pycache__ 3 | recursive-include hydra_plugins/* *.yaml py.typed 4 | -------------------------------------------------------------------------------- /plugins/hydra_submitit_launcher/README.md: -------------------------------------------------------------------------------- 1 | # Hydra Submitit Launcher 2 | Provides a [`Submitit`](https://github.com/facebookincubator/submitit) based Hydra Launcher supporting [SLURM ](https://slurm.schedmd.com/documentation.html). 3 | 4 | See [website](https://hydra.cc/docs/plugins/submitit_launcher) for more information -------------------------------------------------------------------------------- /plugins/hydra_submitit_launcher/example/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - override hydra/launcher: submitit_slurm 3 | 4 | task: 1 5 | -------------------------------------------------------------------------------- /plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | 3 | __version__ = "1.4.0.dev0" 4 | -------------------------------------------------------------------------------- /plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/plugins/hydra_submitit_launcher/hydra_plugins/hydra_submitit_launcher/py.typed -------------------------------------------------------------------------------- /plugins/hydra_submitit_launcher/news/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore -------------------------------------------------------------------------------- /plugins/hydra_submitit_launcher/news/2429.feature: -------------------------------------------------------------------------------- 1 | Add support to Hydra's slurm launcher config for submitit's `srun_args` parameter. 2 | -------------------------------------------------------------------------------- /plugins/hydra_submitit_launcher/news/2443.feature: -------------------------------------------------------------------------------- 1 | Support python3.11 2 | -------------------------------------------------------------------------------- /plugins/hydra_submitit_launcher/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /requirements/dev.txt: -------------------------------------------------------------------------------- 1 | -r requirements.txt 2 | bandit 3 | black==24.3.0 4 | build 5 | coverage 6 | flake8==6.0.0 7 | flake8-copyright 8 | isort==5.13.2 9 | mypy==1.8.0 10 | nox 11 | packaging 12 | pre-commit 13 | pytest 14 | pytest-benchmark 15 | pytest-snail 16 | read-version 17 | setuptools 18 | towncrier 19 | twine 20 | types-setuptools 21 | yamllint 22 | -------------------------------------------------------------------------------- /requirements/requirements.txt: -------------------------------------------------------------------------------- 1 | omegaconf>=2.4.0.dev2 2 | importlib-resources;python_version<'3.9' 3 | packaging 4 | -------------------------------------------------------------------------------- /tests/data.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | def foo() -> None: ... 3 | 4 | 5 | def foo_main_module() -> None: ... 6 | 7 | 8 | foo_main_module.__module__ = "__main__" 9 | 10 | 11 | class Bar: ... 12 | 13 | 14 | bar_instance = Bar() 15 | 16 | bar_instance_main_module = Bar() 17 | bar_instance_main_module.__module__ = "__main__" 18 | -------------------------------------------------------------------------------- /tests/defaults_list/data/config_default.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - empty 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/config_default_pkg1.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - empty@pkg1 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/config_with_same_name_as_group.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - config_with_same_name_as_group: item 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/config_with_same_name_as_group/item.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/config_with_same_name_as_group/item.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/db/base_db.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/db/base_db.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/defaults_with_override_only.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - override /hydra/help: custom1 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/deprecated_headers/group.yaml: -------------------------------------------------------------------------------- 1 | # @package _group_ 2 | -------------------------------------------------------------------------------- /tests/defaults_list/data/deprecated_headers/group_foo.yaml: -------------------------------------------------------------------------------- 1 | # @package _group_.foo 2 | -------------------------------------------------------------------------------- /tests/defaults_list/data/deprecated_headers/group_name.yaml: -------------------------------------------------------------------------------- 1 | # @package _group_._name_ 2 | -------------------------------------------------------------------------------- /tests/defaults_list/data/deprecated_headers/name.yaml: -------------------------------------------------------------------------------- 1 | # @package _name_ 2 | -------------------------------------------------------------------------------- /tests/defaults_list/data/duplicate_self.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - _self_ 3 | - empty 4 | - _self_ 5 | -------------------------------------------------------------------------------- /tests/defaults_list/data/empty.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/empty.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/error_changing_group.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: file1 3 | - group1: file2 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/error_duplicate_group.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: file1 3 | - group1: file1 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/error_duplicate_group_nested.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: group_item1 3 | - group1/group2: file1 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/error_invalid_override.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - override group1: file 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/error_self_pkg1.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - _self_@pkg1 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/experiment/error_override_without_abs_and_header.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - override group1: file1 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/experiment/error_override_without_global.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - override /group1: file1 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/experiment/include_absolute_config.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | 3 | defaults: 4 | - /group1/group2: file1 5 | - _self_ 6 | -------------------------------------------------------------------------------- /tests/defaults_list/data/experiment/override_config_group.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | 3 | defaults: 4 | - override /group1: file2 5 | -------------------------------------------------------------------------------- /tests/defaults_list/data/experiment/override_hydra.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | 3 | defaults: 4 | - override /hydra/help: custom1 5 | -------------------------------------------------------------------------------- /tests/defaults_list/data/experiment/override_with_global_default.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | 3 | defaults: 4 | - override /group1: file2 5 | -------------------------------------------------------------------------------- /tests/defaults_list/data/experiment/override_with_global_default2.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - override /group1@_global_: file2 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/extend/base_db.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/extend/base_db.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/extend/external.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - /db/base_db@ 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/extend/here.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - base_db 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/extend/nested.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - nested/base_db@ 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/extend/nested/base_db.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/extend/nested/base_db.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/extend/nested_here_keyword.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - nested/base_db@_here_ 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/config_item.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2/file1 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/config_item_global_.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2/file1@_global_ 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/config_item_name_.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2/file1@_name_ 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/config_item_pkg2.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2/file1@pkg2 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/file1.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/group1/file1.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/file2.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/group1/file2.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/file3.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/group1/file3.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/file_with_global_header.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/file_with_group_header.yaml: -------------------------------------------------------------------------------- 1 | # @package _group_ 2 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/group2/file1.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/group1/group2/file1.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/group2/file1_pkg_header_foo.yaml: -------------------------------------------------------------------------------- 1 | # @package foo 2 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/group2/file2.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/group1/group2/file2.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/group2/file3.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/group1/group2/file3.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/group2/file_with_group_header.yaml: -------------------------------------------------------------------------------- 1 | # @package _group_ 2 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/group2/interpolation_ext.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/group1/group2/interpolation_ext.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/group_item1.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2: file1 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/group_item1_global_.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2@_global_: file1 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/group_item1_global_foo.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2@_global_.foo: file1 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/group_item1_name_.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2@_name_: file1 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/group_item1_pkg2.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2@pkg2: file1 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/group_item1_pkg_header_foo.yaml: -------------------------------------------------------------------------------- 1 | # @package foo 2 | defaults: 3 | - group2: file1 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/group_item1_with_pkg_header_foo.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2: file1_pkg_header_foo 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/group_item2.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2: file2 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/group_item2_pkg_header_bar.yaml: -------------------------------------------------------------------------------- 1 | # @package bar 2 | defaults: 3 | - group2: file2 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/group_item2_pkg_header_foo.yaml: -------------------------------------------------------------------------------- 1 | # @package foo 2 | defaults: 3 | - group2: file2 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/interpolation.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2: ${group1}_ext 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/override_invalid.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2: file1 3 | - override group2@foo: file1 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/override_invalid2.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2@foo: file1 3 | - override group2: file1 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/override_same_level.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2: file1 3 | - override group2: file2 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/placeholder.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2: null 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/resolver.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2: ${oc.decode:file1} 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/select_multi.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2: 3 | - file1 4 | - file2 5 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/select_multi_pkg.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2@bar: 3 | - file1 4 | - file2 5 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/with_missing.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2: ??? 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1/with_missing_at_foo.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2@foo: ??? 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1_group2/empty1.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/group1_group2/empty1.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/group1_group2/empty2.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/group1_group2/empty2.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/group1_group2/file1_file1.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/group1_group2/file1_file1.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/group1_group2/file1_file1_defaults_with_override.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - override foo: bar 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1_group2/file1_file1_with_defaults_list.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - empty1 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1_group2/file1_file2.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/group1_group2/file1_file2.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/group1_group2/file1_file2_with_defaults_list.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - empty2 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group1_group2/file2_file2.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/group1_group2/file2_file2.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/group1_group2/foo_file1.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/group1_group2/foo_file1.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/group1_group2/foo_file2.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/group1_group2/foo_file2.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/group2/file1.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/group2/file1.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/group2/file2.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/group2/file2.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/group_default.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: file1 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group_default_at_global.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1@_global_: file1 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group_default_global.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: file_with_global_header 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group_default_pkg1.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1@pkg1: file1 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/group_default_with_explicit_experiment.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: file1 3 | - experiment: override_config_group 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/hydra/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - help: default 3 | - output: default 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/hydra/help/custom1.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/hydra/help/custom1.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/hydra/help/custom2.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/hydra/help/custom2.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/hydra/help/default.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/hydra/help/default.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/hydra/output/default.yaml: -------------------------------------------------------------------------------- 1 | # @package hydra 2 | -------------------------------------------------------------------------------- /tests/defaults_list/data/hydra/output/disabled.yaml: -------------------------------------------------------------------------------- 1 | # @package hydra 2 | -------------------------------------------------------------------------------- /tests/defaults_list/data/hydra/run/custom1.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/hydra/run/custom1.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/include_group_with_same_name_as_config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - config_with_same_name_as_group: item 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/include_nested_config_item.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: config_item 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/include_nested_config_item_global.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: config_item_global_ 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/include_nested_config_item_name_.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: config_item_name_ 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/include_nested_config_item_pkg2.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: config_item_pkg2 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/include_nested_group.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: group_item1 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/include_nested_group_global_.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: group_item1_global_ 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/include_nested_group_global_foo.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: group_item1_global_foo 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/include_nested_group_name_.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: group_item1_name_ 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/include_nested_group_pkg2.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: group_item1_pkg2 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/include_nested_group_pkg_header_foo.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: group_item1_pkg_header_foo 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/include_nested_group_pkg_header_foo_override_pkg_bar.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1@bar: group_item1_pkg_header_foo 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/include_override_same_level.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: override_same_level 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/interpolation_bad_key.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: file1 3 | - ${not_found} 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/interpolation_config_default.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: file1 3 | - group1/group2/${group1} 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/interpolation_forward.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1_group2: ${group1}_${group2} 3 | - group1: file1 4 | - group2: file2 5 | -------------------------------------------------------------------------------- /tests/defaults_list/data/interpolation_in_nested.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: interpolation 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/interpolation_legacy_with_self.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - _self_ 3 | - group1: file1 4 | - group2: file2 5 | - group1_group2: ${defaults.1.group1}_${defaults.2.group2} 6 | -------------------------------------------------------------------------------- /tests/defaults_list/data/interpolation_legacy_without_self.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: file1 3 | - group2: file2 4 | - group1_group2: ${defaults.0.group1}_${defaults.1.group2} 5 | -------------------------------------------------------------------------------- /tests/defaults_list/data/interpolation_nested.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1/group2: file1 3 | - group1_group2: foo_${group1/group2} 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/interpolation_resolver_in_nested.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: resolver 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/interpolation_simple.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: file1 3 | - group2: file2 4 | - group1_group2: ${group1}_${group2} 5 | -------------------------------------------------------------------------------- /tests/defaults_list/data/interpolation_with_nested_defaults_list.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: file1 3 | - group2: file1 4 | - group1_group2: ${group1}_${group2}_with_defaults_list 5 | -------------------------------------------------------------------------------- /tests/defaults_list/data/interpolation_with_nested_defaults_list_with_override.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: file1 3 | - group2: file1 4 | - group1_group2: ${group1}_${group2}_defaults_with_override 5 | -------------------------------------------------------------------------------- /tests/defaults_list/data/interpolation_with_package_override.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1@package: file1 3 | - group2: file2 4 | - group1_group2: ${group1@package}_${group2} 5 | -------------------------------------------------------------------------------- /tests/defaults_list/data/invalid_override_in_defaults.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - override foo: bar 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/keyword_as_groups.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - optional: file1 3 | - override: file1 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/keyword_optional_optional.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - optional optional: file1 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/keyword_override_override.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - override: file1 3 | - override override: file2 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/legacy_override_hydra.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - hydra/help: custom1 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/legacy_override_hydra2.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - hydra/help: custom1 3 | - hydra/output: disabled 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/legacy_override_hydra_wrong_order.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - hydra/help: custom1 3 | - group1: file1 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/missing_optional_default.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - empty 3 | - optional foo: missing 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/nested_placeholder.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: placeholder 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/optional.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - optional group1: file1 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/optional/file1.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/optional/file1.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/optional/file2.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/optional/file2.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/optional_deprecated.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: file1 3 | optional: true 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/override/file1.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/override/file1.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/override/file2.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/tests/defaults_list/data/override/file2.yaml -------------------------------------------------------------------------------- /tests/defaults_list/data/override_hydra1.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: file1 3 | - override hydra/output: disabled 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/override_hydra2.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - override hydra/help: custom1 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/override_hydra3.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - override hydra/help: custom1 3 | - override hydra/output: disabled 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/override_hydra4.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: file1 3 | - hydra/run: custom1 4 | - override hydra/output: disabled 5 | -------------------------------------------------------------------------------- /tests/defaults_list/data/override_hydra_wrong_order.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - override hydra/help: custom1 3 | - group1: file1 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/override_nested_group_item.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: group_item1 3 | - override group1/group2: file2 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/override_nested_to_null.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: group_item1 3 | - override group1/group2: null 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/override_same_level.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: file1 3 | - override group1: file2 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/override_wrong_order.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | # Error: overrides must come at the end of the defaults list 3 | - override group1: file2 4 | - group1: file1 5 | -------------------------------------------------------------------------------- /tests/defaults_list/data/placeholder.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: null 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/primary_pkg_header_foo.yaml: -------------------------------------------------------------------------------- 1 | # @package foo 2 | 3 | defaults: 4 | - group1: file1 5 | - group1@pkg: file1 6 | -------------------------------------------------------------------------------- /tests/defaults_list/data/select_multi.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: 3 | - file1 4 | - file2 5 | -------------------------------------------------------------------------------- /tests/defaults_list/data/select_multi_interpolation.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group2: file2 3 | - group1: 4 | - file1 5 | - ${group2} 6 | -------------------------------------------------------------------------------- /tests/defaults_list/data/select_multi_optional.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - optional group1: 3 | - not_found 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/select_multi_override.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: 3 | - file1 4 | - file2 5 | - override group1: [file3, file1] 6 | -------------------------------------------------------------------------------- /tests/defaults_list/data/select_multi_pkg.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1@foo: 3 | - file1 4 | - file2 5 | -------------------------------------------------------------------------------- /tests/defaults_list/data/self_leading.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - _self_ 3 | - group1: file1 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/self_trailing.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: file1 3 | - _self_ 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/test_extend_from_config_with_same_name_as_group.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - config_with_same_name_as_group 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/test_extend_from_external_group.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - extend: external 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/test_extend_from_group_with_same_name_as_config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - config_with_same_name_as_group/item 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/test_extend_from_nested_group.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - extend: nested 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/test_extend_same_group.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - extend: here 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/two_config_items.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1/file1 3 | - group1/file2 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/two_group_defaults_different_pkgs.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1@pkg1: file1 3 | - group1@pkg2: file1 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/two_group_defaults_different_pkgs_global.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - group1: file1 3 | - group1@_global_: file2 4 | -------------------------------------------------------------------------------- /tests/defaults_list/data/with_missing.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - db: ??? 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/with_missing_at_foo.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - db@foo: ??? 3 | -------------------------------------------------------------------------------- /tests/defaults_list/data/with_missing_at_global.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - db@_global_: ??? 3 | -------------------------------------------------------------------------------- /tests/instantiate/import_error.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | assert False 3 | -------------------------------------------------------------------------------- /tests/instantiate/module_shadowed_by_function.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | def a_function() -> None: 3 | pass 4 | -------------------------------------------------------------------------------- /tests/standalone_apps/discovery_test_plugin/hydra_plugins/discovery_test/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/standalone_apps/discovery_test_plugin/hydra_plugins/discovery_test/__not_hidden_plugin.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from hydra.plugins.plugin import Plugin 3 | 4 | 5 | class NotHiddenTestPlugin(Plugin): ... 6 | -------------------------------------------------------------------------------- /tests/standalone_apps/discovery_test_plugin/hydra_plugins/discovery_test/_hidden_plugin.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from hydra.plugins.plugin import Plugin 3 | 4 | 5 | class HiddenTestPlugin(Plugin): ... 6 | -------------------------------------------------------------------------------- /tests/standalone_apps/discovery_test_plugin/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/standalone_apps/initialization_test_app/MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include initialization_test_app *.py 2 | recursive-include initialization_test_app *.yaml 3 | global-exclude *.pyc 4 | global-exclude __pycache__ 5 | -------------------------------------------------------------------------------- /tests/standalone_apps/initialization_test_app/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/standalone_apps/initialization_test_app/initialization_test_app/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/standalone_apps/initialization_test_app/initialization_test_app/conf/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/standalone_apps/initialization_test_app/initialization_test_app/conf/config.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | hello: world 3 | -------------------------------------------------------------------------------- /tests/standalone_apps/initialization_test_app/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/namespace_test/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/config_with_defaults_list.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - dataset: imagenet 3 | 4 | key: value 5 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/config_with_unicode.yaml: -------------------------------------------------------------------------------- 1 | group: 数据库 2 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/config_without_group.yaml: -------------------------------------------------------------------------------- 1 | group: false 2 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/configs_with_defaults_list/global_package.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | defaults: 3 | - foo: bar 4 | 5 | x: 10 6 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/configs_with_defaults_list/group_package.yaml: -------------------------------------------------------------------------------- 1 | # @package _group_ 2 | defaults: 3 | - foo: bar 4 | 5 | x: 10 6 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/configs_with_defaults_list/no_package.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - foo: bar 3 | 4 | x: 10 5 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/dataset.yaml: -------------------------------------------------------------------------------- 1 | dataset_yaml: true 2 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/dataset/cifar10.yaml: -------------------------------------------------------------------------------- 1 | name: cifar10 2 | path: /datasets/cifar10 3 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/dataset/imagenet.yaml: -------------------------------------------------------------------------------- 1 | name: imagenet 2 | path: /datasets/imagenet 3 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/level1/level2/nested1.yaml: -------------------------------------------------------------------------------- 1 | l1_l2_n1: true 2 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/level1/level2/nested2.yaml: -------------------------------------------------------------------------------- 1 | l1_l2_n2: true 2 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/optimizer/adam.yaml: -------------------------------------------------------------------------------- 1 | type: adam 2 | lr: 0.1 3 | beta: 0.01 4 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/optimizer/nesterov.yaml: -------------------------------------------------------------------------------- 1 | type: nesterov 2 | lr: 0.001 3 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/package_test/explicit.yaml: -------------------------------------------------------------------------------- 1 | # @package a.b 2 | foo: bar 3 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/package_test/global.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | foo: bar 3 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/package_test/group.yaml: -------------------------------------------------------------------------------- 1 | # @package _group_ 2 | foo: bar 3 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/package_test/group_name.yaml: -------------------------------------------------------------------------------- 1 | # @package foo._group_._name_ 2 | foo: bar 3 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/package_test/name.yaml: -------------------------------------------------------------------------------- 1 | # @package _name_ 2 | foo: bar 3 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/package_test/none.yaml: -------------------------------------------------------------------------------- 1 | foo: bar 2 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/primary_config.yaml: -------------------------------------------------------------------------------- 1 | primary: true 2 | -------------------------------------------------------------------------------- /tests/standalone_apps/namespace_pkg_config_source_test/some_namespace/namespace_test/dir/primary_config_with_non_global_package.yaml: -------------------------------------------------------------------------------- 1 | # @package foo 2 | primary: true 3 | -------------------------------------------------------------------------------- /tests/test_apps/app_can_fail/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_can_fail/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None) 8 | def my_app(cfg: DictConfig) -> None: 9 | val = 1 / cfg.divisor 10 | print(f"val={val}") 11 | 12 | 13 | if __name__ == "__main__": 14 | my_app() 15 | -------------------------------------------------------------------------------- /tests/test_apps/app_exception/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_exception/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None) 8 | def my_app(_: DictConfig) -> None: 9 | 1 / 0 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/app_print_hydra_mode/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_print_hydra_mode/conf/config.yaml: -------------------------------------------------------------------------------- 1 | x: 1 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_print_hydra_mode/conf/hydra/sweeper/test.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - basic 3 | max_batch_size: 1 4 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_callbacks/app_with_log_compose_callback/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_callbacks/app_with_log_compose_callback/config.yaml: -------------------------------------------------------------------------------- 1 | age: 7 2 | name: James Bond 3 | 4 | hydra: 5 | job: 6 | name: test 7 | callbacks: 8 | log_compose: 9 | _target_: hydra.experimental.callbacks.LogComposeCallback 10 | 11 | defaults: 12 | - config_schema 13 | - _self_ 14 | - group: a 15 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_callbacks/app_with_log_compose_callback/group/a.yaml: -------------------------------------------------------------------------------- 1 | name: a 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_callbacks/custom_callback/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_callbacks/custom_callback/config.yaml: -------------------------------------------------------------------------------- 1 | foo: bar 2 | 3 | hydra: 4 | callbacks: 5 | custom_callback: 6 | _target_: my_app.CustomCallback 7 | callback_name: custom_callback 8 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_callbacks/custom_callback/config_with_two_callbacks.yaml: -------------------------------------------------------------------------------- 1 | hydra: 2 | callbacks: 3 | callback_1: 4 | _target_: my_app.CustomCallback 5 | callback_name: callback_1 6 | callback_2: 7 | _target_: my_app.CustomCallback 8 | callback_name: callback_2 9 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_callbacks/on_job_start_accepts_task_function/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_callbacks/on_job_start_accepts_task_function/config.yaml: -------------------------------------------------------------------------------- 1 | hydra: 2 | callbacks: 3 | custom_callback: 4 | _target_: my_app.OnJobStartCallback 5 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_cfg/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_cfg/config.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | dataset: 3 | name: imagenet 4 | path: /datasets/imagenet 5 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_cfg/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path=".", config_name="config") 8 | def my_app(_: DictConfig) -> None: 9 | pass 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_cfg_decorated/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_cfg_decorated/config.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | dataset: 3 | name: imagenet 4 | path: /datasets/imagenet 5 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_cfg_decorated/decorators/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_cfg_groups/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_cfg_groups/conf/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_cfg_groups/conf/config.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | defaults: 3 | - optimizer: nesterov 4 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_cfg_groups/conf/config_with_runtime_option.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - optimizer: nesterov 3 | - _self_ 4 | 5 | optimizer_option: ${hydra:runtime.choices.optimizer} 6 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_cfg_groups/conf/dataset/imagenet.yaml: -------------------------------------------------------------------------------- 1 | name: imagenet 2 | path: /datasets/imagenet 3 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_cfg_groups/conf/missing_default.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | defaults: 3 | - optimizer: ??? 4 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_cfg_groups/conf/optimizer/adam.yaml: -------------------------------------------------------------------------------- 1 | type: adam 2 | lr: 0.1 3 | beta: 0.01 4 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_cfg_groups/conf/optimizer/nesterov.yaml: -------------------------------------------------------------------------------- 1 | type: nesterov 2 | lr: 0.001 3 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_cfg_groups/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from typing import Any 3 | 4 | from omegaconf import DictConfig 5 | 6 | import hydra 7 | 8 | 9 | @hydra.main(version_base=None, config_path="conf", config_name="config") 10 | def my_app(cfg: DictConfig) -> Any: 11 | return cfg 12 | 13 | 14 | if __name__ == "__main__": 15 | my_app() 16 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_cfg_groups_no_header/conf/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_cfg_groups_no_header/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - optimizer: nesterov 3 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_cfg_groups_no_header/conf/optimizer/nesterov.yaml: -------------------------------------------------------------------------------- 1 | optimizer: 2 | type: nesterov 3 | lr: 0.001 4 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_cfg_groups_no_header/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path="conf", config_name="config") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg)) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_config_with_free_group/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_config_with_free_group/conf/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_config_with_free_group/conf/config.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | defaults: 3 | - group: opt1 4 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_config_with_free_group/conf/free_group/opt1.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | free_group_opt1: true 3 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_config_with_free_group/conf/free_group/opt2.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | free_group_opt2: true 3 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_config_with_free_group/conf/group/opt1.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | group_opt1: true 3 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_config_with_free_group/conf/group/opt2.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | group_opt2: true 3 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_config_with_free_group/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path="conf", config_name="config") 8 | def my_app(_: DictConfig) -> None: 9 | pass 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_custom_launcher/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_custom_launcher/config.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | defaults: 3 | - override hydra/launcher: custom_launcher 4 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_custom_launcher/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_name="config") 8 | def my_app(_: DictConfig) -> None: 9 | pass 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_log_jobreturn_callback/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_log_jobreturn_callback/config.yaml: -------------------------------------------------------------------------------- 1 | foo: bar 2 | 3 | hydra: 4 | callbacks: 5 | log_job_return: 6 | _target_: hydra.experimental.callbacks.LogJobReturnCallback 7 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_multiple_config_dirs/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_multiple_config_dirs/dir1/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_multiple_config_dirs/dir1/cfg1.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | dir1_cfg1: true 3 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_multiple_config_dirs/dir1/cfg2.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | dir1_cfg2: true 3 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_multiple_config_dirs/dir2/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_multiple_config_dirs/dir2/cfg1.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | dir2_cfg1: true 3 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_multiple_config_dirs/dir2/cfg2.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | dir2_cfg2: true 3 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_multiple_config_dirs/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path=".") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg)) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_no_chdir_override/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base="1.1", config_path=".") 8 | def my_app(_: DictConfig) -> None: 9 | pass 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_pickle_job_info_callback/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_pickle_job_info_callback/config.yaml: -------------------------------------------------------------------------------- 1 | foo: bar 2 | 3 | hydra: 4 | callbacks: 5 | save_job_info: 6 | _target_: hydra.experimental.callbacks.PickleJobInfoCallback 7 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_runtime_config_error/config.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | dataset: 3 | name: imagenet 4 | path: /datasets/imagenet 5 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_split_cfg/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_split_cfg/config.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | defaults: 3 | - imagenet 4 | - nesterov 5 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_split_cfg/imagenet.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | dataset: 3 | name: imagenet 4 | path: /datasets/imagenet 5 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_split_cfg/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_name="config") 8 | def my_app(_: DictConfig) -> None: 9 | pass 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_split_cfg/nesterov.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | optimizer: 3 | type: nesterov 4 | lr: 0.001 5 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_unicode_in_config/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_with_unicode_in_config/config.yaml: -------------------------------------------------------------------------------- 1 | config: 数据库 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_without_config/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/app_without_config/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None) 8 | def my_app(_: DictConfig) -> None: 9 | pass 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/config_with_defaults_list.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - dataset: imagenet 3 | 4 | key: value 5 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/config_with_unicode.yaml: -------------------------------------------------------------------------------- 1 | group: 数据库 2 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/config_without_group.yaml: -------------------------------------------------------------------------------- 1 | group: false 2 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/configs_with_defaults_list/global_package.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | defaults: 3 | - foo: bar 4 | 5 | x: 10 6 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/configs_with_defaults_list/group_package.yaml: -------------------------------------------------------------------------------- 1 | # @package _group_ 2 | defaults: 3 | - foo: bar 4 | 5 | x: 10 6 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/configs_with_defaults_list/no_package.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - foo: bar 3 | 4 | x: 10 5 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/dataset.yaml: -------------------------------------------------------------------------------- 1 | dataset_yaml: true 2 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/dataset/cifar10.yaml: -------------------------------------------------------------------------------- 1 | name: cifar10 2 | path: /datasets/cifar10 3 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/dataset/imagenet.yaml: -------------------------------------------------------------------------------- 1 | name: imagenet 2 | path: /datasets/imagenet 3 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/level1/level2/nested1.yaml: -------------------------------------------------------------------------------- 1 | l1_l2_n1: true 2 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/level1/level2/nested2.yaml: -------------------------------------------------------------------------------- 1 | l1_l2_n2: true 2 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/optimizer/adam.yaml: -------------------------------------------------------------------------------- 1 | type: adam 2 | lr: 0.1 3 | beta: 0.01 4 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/optimizer/nesterov.yaml: -------------------------------------------------------------------------------- 1 | type: nesterov 2 | lr: 0.001 3 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/package_test/explicit.yaml: -------------------------------------------------------------------------------- 1 | # @package a.b 2 | foo: bar 3 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/package_test/global.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | foo: bar 3 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/package_test/group.yaml: -------------------------------------------------------------------------------- 1 | # @package _group_ 2 | foo: bar 3 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/package_test/group_name.yaml: -------------------------------------------------------------------------------- 1 | # @package foo._group_._name_ 2 | foo: bar 3 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/package_test/name.yaml: -------------------------------------------------------------------------------- 1 | # @package _name_ 2 | foo: bar 3 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/package_test/none.yaml: -------------------------------------------------------------------------------- 1 | foo: bar 2 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/primary_config.yaml: -------------------------------------------------------------------------------- 1 | primary: true 2 | -------------------------------------------------------------------------------- /tests/test_apps/config_source_test/dir/primary_config_with_non_global_package.yaml: -------------------------------------------------------------------------------- 1 | # @package foo 2 | primary: true 3 | -------------------------------------------------------------------------------- /tests/test_apps/custom_env_defaults/hydra_plugins/env_defaults/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/custom_env_defaults/hydra_plugins/env_defaults/conf/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/custom_env_defaults/hydra_plugins/env_defaults/conf/hydra/env/default.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | 3 | hydra: 4 | job: 5 | env_set: 6 | FOO: bar 7 | -------------------------------------------------------------------------------- /tests/test_apps/defaults_in_schema_missing/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - db: mysql 3 | -------------------------------------------------------------------------------- /tests/test_apps/defaults_in_schema_missing/conf/db/mysql.yaml: -------------------------------------------------------------------------------- 1 | # @package _group_ 2 | user: omry 3 | password: secret 4 | -------------------------------------------------------------------------------- /tests/test_apps/defaults_pkg_with_dot/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/defaults_pkg_with_dot/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - dataset@dataset.test: imagenet 3 | -------------------------------------------------------------------------------- /tests/test_apps/defaults_pkg_with_dot/dataset/imagenet.yaml: -------------------------------------------------------------------------------- 1 | name: imagenet 2 | path: /datasets/imagenet 3 | -------------------------------------------------------------------------------- /tests/test_apps/defaults_pkg_with_dot/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path=".", config_name="config") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(cfg) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/hydra_main_rerun/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/hydra_main_rerun/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None) 8 | def my_app(_: DictConfig) -> None: 9 | pass 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | my_app() 15 | -------------------------------------------------------------------------------- /tests/test_apps/hydra_main_without_config_path/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main() # NOTE: version_base parameter intentionally omitted 8 | def my_app(_: DictConfig) -> None: 9 | pass 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/hydra_to_cfg_interpolation/config.yaml: -------------------------------------------------------------------------------- 1 | a: 10 2 | b: 20 3 | c: override_${hydra:job.override_dirname} 4 | -------------------------------------------------------------------------------- /tests/test_apps/hydra_to_cfg_interpolation/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path=".", config_name="config") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(cfg.c) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/hydra_verbose/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/hydra_verbose/config.yaml: -------------------------------------------------------------------------------- 1 | hydra: 2 | verbose: 3 | true 4 | -------------------------------------------------------------------------------- /tests/test_apps/hydra_verbose/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path=".", config_name="config") 8 | def my_app(_: DictConfig) -> None: 9 | pass 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/init_in_app_without_module/config.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | hello: world 3 | -------------------------------------------------------------------------------- /tests/test_apps/interpolating_dir_hydra_to_app/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/interpolating_dir_hydra_to_app/config.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | experiment: 3 | base_dir: ??? 4 | second_dir: ${experiment.base_dir} 5 | hydra: 6 | output_subdir: ${experiment.base_dir}/.hydra 7 | -------------------------------------------------------------------------------- /tests/test_apps/interpolating_dir_hydra_to_app/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_name="config") 8 | def my_app(_: DictConfig) -> None: 9 | pass 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/multirun_structured_conflict/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - test: default 3 | - override hydra/hydra_logging: disabled 4 | -------------------------------------------------------------------------------- /tests/test_apps/passes_callable_class_to_hydra_main/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/run_as_module_1/config.yaml: -------------------------------------------------------------------------------- 1 | x: 10 2 | -------------------------------------------------------------------------------- /tests/test_apps/run_as_module_1/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path=".", config_name="config") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg)) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/run_as_module_2/conf/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/run_as_module_2/conf/config.yaml: -------------------------------------------------------------------------------- 1 | x: 10 2 | -------------------------------------------------------------------------------- /tests/test_apps/run_as_module_2/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path="conf", config_name="config") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg)) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/run_as_module_3/module/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/run_as_module_3/module/conf/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/run_as_module_3/module/config.yaml: -------------------------------------------------------------------------------- 1 | x: 10 2 | -------------------------------------------------------------------------------- /tests/test_apps/run_as_module_3/module/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_name="config") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg)) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/run_as_module_4/module/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/run_as_module_4/module/conf/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/run_as_module_4/module/conf/config.yaml: -------------------------------------------------------------------------------- 1 | x: 10 2 | -------------------------------------------------------------------------------- /tests/test_apps/run_as_module_4/module/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path="conf", config_name="config") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg)) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/run_dir_test/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/schema_overrides_hydra/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/schema_overrides_hydra/config.yaml: -------------------------------------------------------------------------------- 1 | age: 7 2 | name: James Bond 3 | 4 | hydra: 5 | job: 6 | name: test 7 | 8 | defaults: 9 | - config_schema 10 | - _self_ 11 | - group: a 12 | -------------------------------------------------------------------------------- /tests/test_apps/schema_overrides_hydra/group/a.yaml: -------------------------------------------------------------------------------- 1 | name: a 2 | -------------------------------------------------------------------------------- /tests/test_apps/setting_env/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/setting_env/config.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | dataset: 3 | name: imagenet 4 | path: /datasets/imagenet 5 | 6 | hydra: 7 | job: 8 | env: 9 | foo: bar 10 | bar: ${hydra.job.num} 11 | -------------------------------------------------------------------------------- /tests/test_apps/simple_app/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/simple_app/interp_to_hydra.yaml: -------------------------------------------------------------------------------- 1 | a: ${hydra:job.name} 2 | -------------------------------------------------------------------------------- /tests/test_apps/simple_app/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None) 8 | def my_app(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg, resolve=True)) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/simple_interpolation/config.yaml: -------------------------------------------------------------------------------- 1 | a: ${b} 2 | b: 10 3 | -------------------------------------------------------------------------------- /tests/test_apps/simple_interpolation/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path=".", config_name="config") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(cfg.c) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/sweep_complex_defaults/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/sweep_complex_defaults/conf/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/sweep_complex_defaults/conf/config.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | defaults: 3 | - optimizer: adam 4 | - dataset: imagenet 5 | - optional optimizer_dataset: ${optimizer}_${dataset} 6 | -------------------------------------------------------------------------------- /tests/test_apps/sweep_complex_defaults/conf/dataset/imagenet.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | dataset: 3 | name: imagenet 4 | path: /datasets/imagenet 5 | -------------------------------------------------------------------------------- /tests/test_apps/sweep_complex_defaults/conf/optimizer/adam.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | optimizer: 3 | type: adam 4 | lr: 0.1 5 | beta: 0.01 6 | -------------------------------------------------------------------------------- /tests/test_apps/sweep_complex_defaults/conf/optimizer/nesterov.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | optimizer: 3 | type: nesterov 4 | lr: 0.001 5 | -------------------------------------------------------------------------------- /tests/test_apps/sweep_complex_defaults/conf/optimizer_dataset/adam_imagenet.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | adam_imagenet: true 3 | -------------------------------------------------------------------------------- /tests/test_apps/sweep_complex_defaults/conf/optimizer_dataset/nesterov_imagenet.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | nesterov_imagenet: true 3 | -------------------------------------------------------------------------------- /tests/test_apps/sweep_complex_defaults/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path="conf", config_name="config") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg)) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/sys_exit/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tests/test_apps/sys_exit/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | import sys 3 | 4 | from omegaconf import DictConfig 5 | 6 | import hydra 7 | 8 | 9 | @hydra.main(version_base=None) 10 | def my_app(_: DictConfig) -> None: 11 | sys.exit(42) 12 | 13 | 14 | if __name__ == "__main__": 15 | my_app() 16 | -------------------------------------------------------------------------------- /tests/test_apps/user-config-dir/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - dataset: ??? 3 | -------------------------------------------------------------------------------- /tests/test_apps/user-config-dir/conf/dataset/imagenet.yaml: -------------------------------------------------------------------------------- 1 | name: imagenet 2 | -------------------------------------------------------------------------------- /tests/test_apps/user-config-dir/my_app.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from omegaconf import DictConfig, OmegaConf 3 | 4 | import hydra 5 | 6 | 7 | @hydra.main(version_base=None, config_path="conf", config_name="config") 8 | def my_app(cfg: DictConfig) -> None: 9 | print(OmegaConf.to_yaml(cfg)) 10 | 11 | 12 | if __name__ == "__main__": 13 | my_app() 14 | -------------------------------------------------------------------------------- /tests/test_apps/user-config-dir/user-dir/dataset/cifar10.yaml: -------------------------------------------------------------------------------- 1 | name: cifar10 2 | -------------------------------------------------------------------------------- /tests/test_examples/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tools/.isort.cfg: -------------------------------------------------------------------------------- 1 | [settings] 2 | multi_line_output=3 3 | include_trailing_comma=true 4 | force_grid_wrap=0 5 | use_parentheses=true 6 | line_length=88 7 | ensure_newline_before_comments=true 8 | float_to_top=true 9 | sections= 10 | FUTURE 11 | STDLIB 12 | THIRDPARTY 13 | FIRSTPARTY 14 | LOCALFOLDER 15 | default_section=THIRDPARTY 16 | known_first_party=tools 17 | 18 | -------------------------------------------------------------------------------- /tools/README.md: -------------------------------------------------------------------------------- 1 | Standalone Hydra related tools -------------------------------------------------------------------------------- /tools/configen/.gitignore: -------------------------------------------------------------------------------- 1 | outputs 2 | -------------------------------------------------------------------------------- /tools/configen/MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include configen *.py 2 | recursive-include configen *.yaml 3 | recursive-include configen *.j2 4 | global-exclude *.pyc 5 | global-exclude __pycache__ -------------------------------------------------------------------------------- /tools/configen/configen/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tools/configen/configen/samples/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tools/configen/example/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tools/configen/example/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - config_schema 3 | - _self_ 4 | 5 | user: 6 | age: 7 7 | name: Bond 8 | 9 | admin: 10 | age: 10 11 | name: Lex Luthor 12 | private_key: deadbeef 13 | -------------------------------------------------------------------------------- /tools/configen/example/config/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tools/configen/example/config/configen/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tools/configen/example/config/configen/samples/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tools/configen/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | -------------------------------------------------------------------------------- /tools/release/conf/config.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - config_schema 3 | - set: all 4 | - _self_ 5 | 6 | hydra: 7 | job: 8 | chdir: true 9 | -------------------------------------------------------------------------------- /tools/release/conf/packages/configen.yaml: -------------------------------------------------------------------------------- 1 | configen: 2 | path: tools/${.name} 3 | -------------------------------------------------------------------------------- /tools/release/conf/packages/hydra.yaml: -------------------------------------------------------------------------------- 1 | hydra: 2 | path: . 3 | -------------------------------------------------------------------------------- /tools/release/conf/packages/hydra_ax_sweeper.yaml: -------------------------------------------------------------------------------- 1 | hydra_ax_sweeper: 2 | path: plugins/${.name} 3 | version_file: hydra_plugins/${.name}/__init__.py 4 | -------------------------------------------------------------------------------- /tools/release/conf/packages/hydra_colorlog.yaml: -------------------------------------------------------------------------------- 1 | hydra_colorlog: 2 | path: plugins/${.name} 3 | version_file: hydra_plugins/${.name}/__init__.py 4 | -------------------------------------------------------------------------------- /tools/release/conf/packages/hydra_joblib_launcher.yaml: -------------------------------------------------------------------------------- 1 | hydra_joblib_launcher: 2 | path: plugins/${.name} 3 | version_file: hydra_plugins/${.name}/__init__.py 4 | -------------------------------------------------------------------------------- /tools/release/conf/packages/hydra_nevergrad_sweeper.yaml: -------------------------------------------------------------------------------- 1 | hydra_nevergrad_sweeper: 2 | path: plugins/${.name} 3 | version_file: hydra_plugins/${.name}/__init__.py 4 | -------------------------------------------------------------------------------- /tools/release/conf/packages/hydra_optuna_sweeper.yaml: -------------------------------------------------------------------------------- 1 | hydra_optuna_sweeper: 2 | path: plugins/${.name} 3 | version_file: hydra_plugins/${.name}/__init__.py 4 | -------------------------------------------------------------------------------- /tools/release/conf/packages/hydra_ray_launcher.yaml: -------------------------------------------------------------------------------- 1 | hydra_ray_launcher: 2 | path: plugins/${.name} 3 | version_file: hydra_plugins/${.name}/__init__.py 4 | -------------------------------------------------------------------------------- /tools/release/conf/packages/hydra_rq_launcher.yaml: -------------------------------------------------------------------------------- 1 | hydra_rq_launcher: 2 | path: plugins/${.name} 3 | version_file: hydra_plugins/${.name}/__init__.py 4 | -------------------------------------------------------------------------------- /tools/release/conf/packages/hydra_submitit_launcher.yaml: -------------------------------------------------------------------------------- 1 | hydra_submitit_launcher: 2 | path: plugins/${.name} 3 | version_file: hydra_plugins/${.name}/__init__.py 4 | -------------------------------------------------------------------------------- /tools/release/conf/set/all.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | defaults: 3 | - /packages: 4 | - hydra 5 | - configen 6 | - hydra_ax_sweeper 7 | - hydra_colorlog 8 | - hydra_joblib_launcher 9 | - hydra_nevergrad_sweeper 10 | - hydra_optuna_sweeper 11 | - hydra_ray_launcher 12 | - hydra_rq_launcher 13 | - hydra_submitit_launcher 14 | -------------------------------------------------------------------------------- /tools/release/conf/set/plugins.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | defaults: 3 | - /packages: 4 | - hydra_ax_sweeper 5 | - hydra_colorlog 6 | - hydra_joblib_launcher 7 | - hydra_nevergrad_sweeper 8 | - hydra_optuna_sweeper 9 | - hydra_ray_launcher 10 | - hydra_rq_launcher 11 | - hydra_submitit_launcher 12 | -------------------------------------------------------------------------------- /website/.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | /node_modules 3 | 4 | # production 5 | /build 6 | 7 | # generated files 8 | .docusaurus 9 | .cache-loader 10 | 11 | # misc 12 | .DS_Store 13 | .env.local 14 | .env.development.local 15 | .env.test.local 16 | .env.production.local 17 | 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | -------------------------------------------------------------------------------- /website/docs/tutorials/intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | id: intro 3 | title: Tutorials intro 4 | --- 5 | 6 | ### Basic Tutorial 7 | The [Basic Tutorial](/tutorials/basic/your_first_app/1_simple_cli.md) covers basic Hydra concepts. 8 | 9 | ### Structured configs 10 | The [Structured Configs Tutorial](/tutorials/structured_config/0_intro.md) shows how to create strongly typed configurations. 11 | 12 | -------------------------------------------------------------------------------- /website/static/.circleci/config.yml: -------------------------------------------------------------------------------- 1 | # This config file will prevent tests from being run on the gh-pages branch. 2 | version: 2 3 | jobs: 4 | build: 5 | machine: true 6 | branches: 7 | ignore: gh-pages 8 | steps: 9 | -run: echo "Skipping tests on gh-pages branch" 10 | -------------------------------------------------------------------------------- /website/static/CNAME: -------------------------------------------------------------------------------- 1 | hydra.cc -------------------------------------------------------------------------------- /website/static/plugins/colorlog/colorlog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/website/static/plugins/colorlog/colorlog.png -------------------------------------------------------------------------------- /website/static/plugins/optuna_sweeper/multi_objective_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/hydra/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/website/static/plugins/optuna_sweeper/multi_objective_result.png -------------------------------------------------------------------------------- /website/versioned_docs/version-0.11/fb/intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | id: intro 3 | title: Introduction 4 | sidebar_label: Introduction 5 | --- 6 | Facebook specific docs are only available in version 1.0 and newer. Please switch version from the version link at the top bar. 7 | -------------------------------------------------------------------------------- /website/versioned_docs/version-1.0/tutorials/intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | id: intro 3 | title: Tutorials intro 4 | --- 5 | 6 | ### Basic Tutorial 7 | The [Basic Tutorial](/tutorials/basic/your_first_app/1_simple_cli.md) covers basic Hydra concepts. 8 | 9 | ### Structured configs 10 | The [Structured Configs Tutorial](/tutorials/structured_config/0_intro.md) shows how to create strongly typed configurations. 11 | 12 | -------------------------------------------------------------------------------- /website/versioned_docs/version-1.1/tutorials/intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | id: intro 3 | title: Tutorials intro 4 | --- 5 | 6 | ### Basic Tutorial 7 | The [Basic Tutorial](/tutorials/basic/your_first_app/1_simple_cli.md) covers basic Hydra concepts. 8 | 9 | ### Structured configs 10 | The [Structured Configs Tutorial](/tutorials/structured_config/0_intro.md) shows how to create strongly typed configurations. 11 | 12 | -------------------------------------------------------------------------------- /website/versioned_docs/version-1.2/tutorials/intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | id: intro 3 | title: Tutorials intro 4 | --- 5 | 6 | ### Basic Tutorial 7 | The [Basic Tutorial](/tutorials/basic/your_first_app/1_simple_cli.md) covers basic Hydra concepts. 8 | 9 | ### Structured configs 10 | The [Structured Configs Tutorial](/tutorials/structured_config/0_intro.md) shows how to create strongly typed configurations. 11 | 12 | -------------------------------------------------------------------------------- /website/versioned_docs/version-1.3/tutorials/intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | id: intro 3 | title: Tutorials intro 4 | --- 5 | 6 | ### Basic Tutorial 7 | The [Basic Tutorial](/tutorials/basic/your_first_app/1_simple_cli.md) covers basic Hydra concepts. 8 | 9 | ### Structured configs 10 | The [Structured Configs Tutorial](/tutorials/structured_config/0_intro.md) shows how to create strongly typed configurations. 11 | 12 | -------------------------------------------------------------------------------- /website/versions.json: -------------------------------------------------------------------------------- 1 | [ 2 | "1.3", 3 | "1.2", 4 | "1.1", 5 | "1.0", 6 | "0.11" 7 | ] 8 | --------------------------------------------------------------------------------