From 9c93cad9ea0df4ea67f8be2804b0ece1047b4427 Mon Sep 17 00:00:00 2001 From: Brian Kroth Date: Fri, 10 Jan 2025 17:00:12 -0600 Subject: [PATCH 1/5] Update flaml. Closes #839 --- mlos_core/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlos_core/setup.py b/mlos_core/setup.py index 81fe47c292..e63e7d80b0 100644 --- a/mlos_core/setup.py +++ b/mlos_core/setup.py @@ -68,7 +68,7 @@ def _get_long_desc_from_readme(base_url: str) -> dict: extra_requires: dict[str, list[str]] = { # pylint: disable=consider-using-namedtuple-or-dataclass "flaml": [ - "flaml<2.2.0", # FIXME: temporarily avoid changes in new FLAML package (#839). + "flaml", "flaml[blendsearch]", ], # NOTE: Major refactoring on SMAC and ConfigSpace v1.0 starting from v2.2 From a1274be95b8119e0efd343fd05be2b625ebdfd67 Mon Sep 17 00:00:00 2001 From: Brian Kroth Date: Fri, 10 Jan 2025 17:19:54 -0600 Subject: [PATCH 2/5] flaml version fixups --- .../mlos_bench/tests/optimizers/toy_optimization_loop_test.py | 2 +- mlos_core/setup.py | 2 +- setup.cfg | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mlos_bench/mlos_bench/tests/optimizers/toy_optimization_loop_test.py b/mlos_bench/mlos_bench/tests/optimizers/toy_optimization_loop_test.py index f33a4f0983..9fef8cfa80 100644 --- a/mlos_bench/mlos_bench/tests/optimizers/toy_optimization_loop_test.py +++ b/mlos_bench/mlos_bench/tests/optimizers/toy_optimization_loop_test.py @@ -98,7 +98,7 @@ def test_mock_optimization_loop_no_defaults( def test_flaml_optimization_loop(mock_env_no_noise: MockEnv, flaml_opt: MlosCoreOptimizer) -> None: """Toy optimization loop with mock environment and FLAML optimizer.""" (score, tunables) = _optimize(mock_env_no_noise, flaml_opt) - assert score == pytest.approx(60.15, 0.01) + assert score == pytest.approx(63.77, 0.01) assert tunables.get_param_values() == { "vmSize": "Standard_B2s", "idle": "halt", diff --git a/mlos_core/setup.py b/mlos_core/setup.py index e63e7d80b0..a48fa2ca8f 100644 --- a/mlos_core/setup.py +++ b/mlos_core/setup.py @@ -68,7 +68,7 @@ def _get_long_desc_from_readme(base_url: str) -> dict: extra_requires: dict[str, list[str]] = { # pylint: disable=consider-using-namedtuple-or-dataclass "flaml": [ - "flaml", + "flaml>=2.4.0", "flaml[blendsearch]", ], # NOTE: Major refactoring on SMAC and ConfigSpace v1.0 starting from v2.2 diff --git a/setup.cfg b/setup.cfg index 1c1cfe1416..f56e1754fc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -52,6 +52,7 @@ filterwarnings = ignore:.*(get_hyperparam|get_dictionary|parents_of|to_vector|(list\(.*values\(\)\))).*:DeprecationWarning:smac:0 ignore:.*(Please leave at default or explicitly set .size=None).*:DeprecationWarning:smac:0 ignore:.*(declarative_base.*function is now available as sqlalchemy.orm.declarative_base):DeprecationWarning:optuna:0 + ignore:.*(IntUniformDistribution.* is deprecated and internally converted to IntDistribution):FutureWarning:optuna:0 ignore:.*(Trying to register a configuration that was not previously suggested).*:UserWarning:.*llamatune.*:0 ignore:.*(DISPLAY environment variable is set).*:UserWarning:.*conftest.*:0 ignore:.*(coroutine 'sleep' was never awaited).*:RuntimeWarning:.*event_loop_context_test.*:0 From 02e0441455b29aafd0bd0f778a13a5380f9eabde Mon Sep 17 00:00:00 2001 From: Brian Kroth Date: Fri, 10 Jan 2025 17:23:15 -0600 Subject: [PATCH 3/5] fixup --- mlos_core/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlos_core/setup.py b/mlos_core/setup.py index a48fa2ca8f..04a91e1fca 100644 --- a/mlos_core/setup.py +++ b/mlos_core/setup.py @@ -68,7 +68,7 @@ def _get_long_desc_from_readme(base_url: str) -> dict: extra_requires: dict[str, list[str]] = { # pylint: disable=consider-using-namedtuple-or-dataclass "flaml": [ - "flaml>=2.4.0", + "flaml>=2.3.3", "flaml[blendsearch]", ], # NOTE: Major refactoring on SMAC and ConfigSpace v1.0 starting from v2.2 From a93c606474559bc96fc3d20c4129b2061a22016e Mon Sep 17 00:00:00 2001 From: Brian Kroth Date: Mon, 13 Jan 2025 11:03:01 -0600 Subject: [PATCH 4/5] tweaks --- .../mlos_bench/tests/optimizers/toy_optimization_loop_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlos_bench/mlos_bench/tests/optimizers/toy_optimization_loop_test.py b/mlos_bench/mlos_bench/tests/optimizers/toy_optimization_loop_test.py index 9fef8cfa80..c549133aa0 100644 --- a/mlos_bench/mlos_bench/tests/optimizers/toy_optimization_loop_test.py +++ b/mlos_bench/mlos_bench/tests/optimizers/toy_optimization_loop_test.py @@ -98,7 +98,7 @@ def test_mock_optimization_loop_no_defaults( def test_flaml_optimization_loop(mock_env_no_noise: MockEnv, flaml_opt: MlosCoreOptimizer) -> None: """Toy optimization loop with mock environment and FLAML optimizer.""" (score, tunables) = _optimize(mock_env_no_noise, flaml_opt) - assert score == pytest.approx(63.77, 0.01) + assert score == pytest.approx(60.00, 0.01) assert tunables.get_param_values() == { "vmSize": "Standard_B2s", "idle": "halt", From b582f3dece27a46f79e1289b4bdd7c6ac01b68a6 Mon Sep 17 00:00:00 2001 From: Brian Kroth Date: Mon, 13 Jan 2025 17:14:38 +0000 Subject: [PATCH 5/5] ignore some more warnings --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index f56e1754fc..2adc9d7660 100644 --- a/setup.cfg +++ b/setup.cfg @@ -53,6 +53,7 @@ filterwarnings = ignore:.*(Please leave at default or explicitly set .size=None).*:DeprecationWarning:smac:0 ignore:.*(declarative_base.*function is now available as sqlalchemy.orm.declarative_base):DeprecationWarning:optuna:0 ignore:.*(IntUniformDistribution.* is deprecated and internally converted to IntDistribution):FutureWarning:optuna:0 + ignore:.*(flaml.automl is not available. Please install flaml\[automl\] to enable AutoML functionalities.):UserWarning:flaml:0 ignore:.*(Trying to register a configuration that was not previously suggested).*:UserWarning:.*llamatune.*:0 ignore:.*(DISPLAY environment variable is set).*:UserWarning:.*conftest.*:0 ignore:.*(coroutine 'sleep' was never awaited).*:RuntimeWarning:.*event_loop_context_test.*:0