Skip to content

Commit 17b5b8b

Browse files
authored
Merge a39a392 into cbb17c3
2 parents cbb17c3 + a39a392 commit 17b5b8b

File tree

2 files changed

+1
-67
lines changed

2 files changed

+1
-67
lines changed

ax/modelbridge/modelbridge_utils.py

+1-31
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
get_pending_observation_features, # noqa F401
6161
get_pending_observation_features_based_on_trial_status, # noqa F401
6262
)
63-
from ax.exceptions.core import DataRequiredError, UnsupportedError, UserInputError
63+
from ax.exceptions.core import DataRequiredError, UserInputError
6464
from ax.modelbridge.transforms.base import Transform
6565
from ax.modelbridge.transforms.utils import (
6666
derelativize_optimization_config_with_raw_status_quo,
@@ -690,7 +690,6 @@ def get_pareto_frontier_and_configs(
690690
optimization_config: Optional[MultiObjectiveOptimizationConfig] = None,
691691
arm_names: Optional[List[Optional[str]]] = None,
692692
use_model_predictions: bool = True,
693-
transform_outcomes_and_configs: Optional[bool] = None,
694693
) -> Tuple[List[Observation], Tensor, Tensor, Optional[Tensor]]:
695694
"""Helper that applies transforms and calls ``frontier_evaluator``.
696695
@@ -712,11 +711,6 @@ def get_pareto_frontier_and_configs(
712711
``observation_features`` to compute Pareto front. If ``False``,
713712
will use ``observation_data`` directly to compute Pareto front, ignoring
714713
``observation_features``.
715-
transform_outcomes_and_configs: Deprecated and must be ``False`` if provided.
716-
Previously, if ``True``, would transform the optimization
717-
config, observation features and observation data, before calling
718-
``frontier_evaluator``, then will untransform all of the above before
719-
returning the observations.
720714
721715
Returns: Four-item tuple of:
722716
- frontier_observations: Observations of points on the pareto frontier,
@@ -726,30 +720,6 @@ def get_pareto_frontier_and_configs(
726720
- obj_t: m tensor of objective thresholds corresponding to Y, or None if no
727721
objective thresholds used.
728722
"""
729-
if transform_outcomes_and_configs is None:
730-
warnings.warn(
731-
"FYI: The default behavior of `get_pareto_frontier_and_configs` when "
732-
"`transform_outcomes_and_configs` is not specified has changed. Previously,"
733-
" the default was `transform_outcomes_and_configs=True`; now this argument "
734-
"is deprecated and behavior is as if "
735-
"`transform_outcomes_and_configs=False`. You did not specify "
736-
"`transform_outcomes_and_configs`, so this warning requires no action.",
737-
stacklevel=2,
738-
)
739-
elif transform_outcomes_and_configs:
740-
raise UnsupportedError(
741-
"`transform_outcomes_and_configs=True` is no longer supported, and the "
742-
"`transform_outcomes_and_configs` argument is deprecated. Please do not "
743-
"specify this argument."
744-
)
745-
else:
746-
warnings.warn(
747-
"You passed `transform_outcomes_and_configs=False`. Specifying "
748-
"`transform_outcomes_and_configs` at all is deprecated because `False` is "
749-
"now the only allowed behavior. In the future, this will become an error.",
750-
DeprecationWarning,
751-
stacklevel=2,
752-
)
753723
# Input validation
754724
if use_model_predictions:
755725
if observation_data is not None:

ax/modelbridge/tests/test_torch_moo_modelbridge.py

-36
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
OutcomeConstraint,
2222
)
2323
from ax.core.parameter_constraint import ParameterConstraint
24-
from ax.exceptions.core import UnsupportedError
2524
from ax.modelbridge.factory import get_sobol
2625
from ax.modelbridge.modelbridge_utils import (
2726
get_pareto_frontier_and_configs,
@@ -289,41 +288,6 @@ def test_get_pareto_frontier_and_configs_input_validation(self) -> None:
289288
ObservationFeatures(parameters={"x1": 1.0, "x2": 0.0}),
290289
]
291290

292-
with self.assertWarns(
293-
Warning,
294-
msg="FYI: The default behavior of `get_pareto_frontier_and_configs` when "
295-
"`transform_outcomes_and_configs` is not specified has changed. Previously,"
296-
" the default was `transform_outcomes_and_configs=True`; now this argument "
297-
"is deprecated and behavior is as if "
298-
"`transform_outcomes_and_configs=False`. You did not specify "
299-
"`transform_outcomes_and_configs`, so this warning requires no action.",
300-
):
301-
res = get_pareto_frontier_and_configs(
302-
modelbridge=modelbridge,
303-
observation_features=observation_features,
304-
)
305-
self.assertEqual(len(res), 4)
306-
307-
with self.assertRaises(UnsupportedError):
308-
get_pareto_frontier_and_configs(
309-
modelbridge=modelbridge,
310-
observation_features=observation_features,
311-
transform_outcomes_and_configs=True,
312-
)
313-
314-
with self.assertWarns(
315-
DeprecationWarning,
316-
msg="You passed `transform_outcomes_and_configs=False`. Specifying "
317-
"`transform_outcomes_and_configs` at all is deprecated because `False` is "
318-
"now the only allowed behavior. In the future, this will become an error.",
319-
):
320-
res = get_pareto_frontier_and_configs(
321-
modelbridge=modelbridge,
322-
observation_features=observation_features,
323-
transform_outcomes_and_configs=False,
324-
)
325-
self.assertEqual(len(res), 4)
326-
327291
with self.assertWarns(
328292
Warning,
329293
msg="You provided `observation_data` when `use_model_predictions` is True; "

0 commit comments

Comments
 (0)