diff --git a/hydra_plugins/hydra_orion_sweeper/config.py b/hydra_plugins/hydra_orion_sweeper/config.py index 4cde90d..5171523 100644 --- a/hydra_plugins/hydra_orion_sweeper/config.py +++ b/hydra_plugins/hydra_orion_sweeper/config.py @@ -85,16 +85,10 @@ class OrionSweeperConf: storage: StorageConf = StorageConf() - # deprecated, use params instead - parametrization: Optional[Dict[str, Any]] = None - # Search space (Optuna & default) # See `Search Space `_ params: Optional[Dict[str, Any]] = None - # Note: Ax space is configured as hydra.sweeper.ax.ax_config.params - # which is a bit too convoluted for us to support - ConfigStore.instance().store( group="hydra/sweeper", diff --git a/hydra_plugins/hydra_orion_sweeper/orion_sweeper.py b/hydra_plugins/hydra_orion_sweeper/orion_sweeper.py index 8fdd1d7..847e5b5 100644 --- a/hydra_plugins/hydra_orion_sweeper/orion_sweeper.py +++ b/hydra_plugins/hydra_orion_sweeper/orion_sweeper.py @@ -3,7 +3,6 @@ Implements a sweeper plugin for Orion """ from typing import List, Optional -from warnings import warn from hydra import TaskFunction from hydra.plugins.sweeper import Sweeper @@ -22,28 +21,10 @@ def __init__( worker: WorkerConf, algorithm: AlgorithmConf, storage: StorageConf, - parametrization: Optional[DictConfig], params: Optional[DictConfig], ): from .implementation import OrionSweeperImpl - # >>> Remove with Issue #8 - if parametrization is not None and params is None: - warn( - "`hydra.sweeper.orion.parametrization` is deprecated;" - "use `hydra.sweeper.params` instead", - DeprecationWarning, - ) - params = parametrization - - elif parametrization is not None and params is not None: - warn( - "Both `hydra.sweeper.orion.parametrization` and `hydra.sweeper.params` are defined;" - "using `hydra.sweeper.params`", - DeprecationWarning, - ) - # <<< - if params is None: params = dict() diff --git a/tests/test_warnings.py b/tests/test_warnings.py deleted file mode 100644 index df7407a..0000000 --- a/tests/test_warnings.py +++ /dev/null @@ -1,64 +0,0 @@ -import pytest - -from hydra_plugins.hydra_orion_sweeper.orion_sweeper import ( - AlgorithmConf, - OrionClientConf, - OrionSweeper, - StorageConf, - WorkerConf, -) - - -# >>> Remove with Issue #8 -def test_parametrization_is_deprecated(): - with pytest.warns(DeprecationWarning) as warnings: - OrionSweeper( - OrionClientConf(), - WorkerConf(), - AlgorithmConf(), - StorageConf(), - dict(), - None, - ) - - assert len(warnings) == 1 - assert ( - warnings[0] - .message.args[0] - .startswith("`hydra.sweeper.orion.parametrization` is deprecated;") - ) - - -def test_parametrization_and_params(): - with pytest.warns(DeprecationWarning) as warnings: - OrionSweeper( - OrionClientConf(), - WorkerConf(), - AlgorithmConf(), - StorageConf(), - dict(), - dict(), - ) - - assert len(warnings) == 1 - assert ( - warnings[0] - .message.args[0] - .startswith("Both `hydra.sweeper.orion.parametrization` and") - ) - - -def test_no_warnings_with_params(recwarn): - OrionSweeper( - OrionClientConf(), - WorkerConf(), - AlgorithmConf(), - StorageConf(), - None, - dict(), - ) - - assert len(recwarn) == 0 - - -# <<< Remove with Issue #8