Skip to content

Commit a3a0764

Browse files
thinkallCopilot
andauthored
Fix test_no_optuna reinstalling optuna at wrong version (#1522)
test_no_optuna() uninstalls optuna to test graceful handling, then reinstalls it. It was hardcoded to reinstall optuna==2.8.0 instead of the version range used elsewhere (>=2.8.0,<=3.6.1), leaving the test environment with a downgraded optuna for the rest of the CI run. This caused the saved dependency snapshot to incorrectly report optuna==2.8.0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 18ed6d6 commit a3a0764

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/tune/test_searcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def test_no_optuna():
323323
subprocess.check_call([sys.executable, "-m", "pip", "uninstall", "-y", "optuna"])
324324
import flaml.tune.searcher.suggestion
325325

326-
subprocess.check_call([sys.executable, "-m", "pip", "install", "optuna==2.8.0"])
326+
subprocess.check_call([sys.executable, "-m", "pip", "install", "optuna>=2.8.0,<=3.6.1"])
327327

328328

329329
def test_unresolved_search_space(caplog):

0 commit comments

Comments
 (0)