Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ax/benchmark/problems/surrogate/lcbench/early_stopping.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
)
Expand Down
Loading