diff --git a/ax/benchmark/problems/surrogate/lcbench/early_stopping.py b/ax/benchmark/problems/surrogate/lcbench/early_stopping.py index 59b1dce3161..c2896989299 100644 --- a/ax/benchmark/problems/surrogate/lcbench/early_stopping.py +++ b/ax/benchmark/problems/surrogate/lcbench/early_stopping.py @@ -3,8 +3,6 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -# pyre-strict - from collections.abc import Callable, Iterable, Mapping, Sequence from dataclasses import dataclass, field, InitVar from functools import partial @@ -233,7 +231,9 @@ def __post_init__( parameter_names = get_lcbench_parameter_names() log_scale_parameter_names = get_lcbench_log_scale_parameter_names() - numeric_columns = set(parameter_names) - set(log_scale_parameter_names) + numeric_columns = [ + name for name in parameter_names if name not in log_scale_parameter_names + ] self.metric_surrogate = _create_surrogate_regressor( base_regressor=metric_base_surrogate, diff --git a/ax/benchmark/tests/problems/surrogate/lcbench/test_early_stopping.py b/ax/benchmark/tests/problems/surrogate/lcbench/test_early_stopping.py index 552fc7f4dec..14963be2853 100644 --- a/ax/benchmark/tests/problems/surrogate/lcbench/test_early_stopping.py +++ b/ax/benchmark/tests/problems/surrogate/lcbench/test_early_stopping.py @@ -3,8 +3,6 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -# pyre-strict - from unittest.mock import patch import numpy as np @@ -62,6 +60,15 @@ def test_get_lcbench_early_stopping_problem(self) -> None: mock_create_surrogate_regressor.call_args_list ) self.assertEqual(len(create_surrogate_regressor_call_args), 2) + for call in create_surrogate_regressor_call_args: + self.assertEqual( + call.kwargs["numeric_columns"], + ["max_dropout", "num_layers", "weight_decay"], + ) + self.assertEqual( + call.kwargs["log_numeric_columns"], + ["batch_size", "max_units", "learning_rate", "momentum"], + ) self.assertEqual( problem.optimization_config.objective.metric_names[0], DEFAULT_METRIC_NAME )