Skip to content

Commit

Permalink
Remove deprecated parametrization
Browse files Browse the repository at this point in the history
  • Loading branch information
Delaunay committed Jul 27, 2022
1 parent 7d2f01c commit cc7d4ca
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 90 deletions.
6 changes: 0 additions & 6 deletions hydra_plugins/hydra_orion_sweeper/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://orion.readthedocs.io/en/stable/user/searchspace.html>`_
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",
Expand Down
19 changes: 0 additions & 19 deletions hydra_plugins/hydra_orion_sweeper/orion_sweeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()

Expand Down
1 change: 0 additions & 1 deletion tests/test_orion.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def orion_configuration():
worker=OmegaConf.structured(WorkerConf()),
algorithm=OmegaConf.structured(AlgorithmConf()),
storage=OmegaConf.structured(StorageConf()),
parametrization=None,
params=dict(a="uniform(0, 1)"),
)

Expand Down
64 changes: 0 additions & 64 deletions tests/test_warnings.py

This file was deleted.

0 comments on commit cc7d4ca

Please sign in to comment.