optuna/optuna-examples

Fix a CI failure of optuna-hydra-sweeper v1.2.0

c-bata opened this issue · 0 comments

Expected behavior

Fix an error of python hydra/simple.py --multirun.
See https://github.com/optuna/optuna-examples/runs/6509897643?check_suite_focus=true for details.

Environment

  • Optuna version: 2.10.0
  • Python version: 3.6-3.10
  • OS:
  • (Optional) Other libraries and their versions:

Error messages, stack traces, or logs

Run python hydra/simple.py --multirun > /dev/null
hydra/simple.py:19: UserWarning: 
The version_base parameter is not specified.
Please specify a compatability version level, or None.
Will assume defaults for version 1.1
  @hydra.main(config_path="conf", config_name="config")
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/hydra/_internal/utils.py", line 213, in run_and_report
    return func()
  File "/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/hydra/_internal/utils.py", line 464, in <lambda>
    overrides=overrides,
  File "/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/hydra/_internal/hydra.py", line 162, in multirun
    ret = sweeper.sweep(arguments=task_overrides)
  File "/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/hydra_plugins/hydra_optuna_sweeper/optuna_sweeper.py", line 52, in sweep
    return self.sweeper.sweep(arguments)
  File "/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/hydra_plugins/hydra_optuna_sweeper/_impl.py", line 2[8](https://github.com/optuna/optuna-examples/runs/6509897643?check_suite_focus=true#step:5:9)[9](https://github.com/optuna/optuna-examples/runs/6509897643?check_suite_focus=true#step:5:10), in sweep
    assert self.search_space is None
AssertionError

Steps to reproduce

  1. pip install optuna-hydra-sweeper==1.2.0
  2. python hydra/simple.py --multirun

Additional context (optional)

I made a hotfix at #114.