Skip to content

Commit

Permalink
Check for feasibility in gen_candidates_scipy and error out for infea…
Browse files Browse the repository at this point in the history
…sible candidates (#3335)

Summary:
Pull Request resolved: #3335

X-link: pytorch/botorch#2737

As titled. Previously, it was possible to return infeasible candidates to the user, with or without warnings alerting the user to the issue. This diff makes it so that the optimizer will error out when infeasible candidates are generated, so that the user can adjust the setup as needed.

Resolves pytorch/botorch#2708

Also includes a couple lint fixes in optimizer tests.

Reviewed By: esantorella

Differential Revision: D69314159

fbshipit-source-id: ccbc759274b2ae0fc2b38fa19d0e95abf35a2928
  • Loading branch information
saitcakmak authored and facebook-github-bot committed Feb 8, 2025
1 parent 8ba807b commit 782dde3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ax/modelbridge/tests/test_torch_moo_modelbridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
get_non_monolithic_branin_moo_data,
TEST_SOBOL_SEED,
)
from ax.utils.testing.mock import mock_botorch_optimize
from ax.utils.testing.mock import mock_botorch_optimize, skip_fit_gpytorch_mll
from ax.utils.testing.modeling_stubs import transform_1, transform_2
from botorch.utils.multi_objective.pareto import is_non_dominated
from pyre_extensions import assert_is_instance, none_throws
Expand All @@ -65,7 +65,7 @@ class MultiObjectiveTorchAdapterTest(TestCase):
f"{STUBS_PATH}.BraninMetric.is_available_while_running",
return_value=False,
)
@mock_botorch_optimize
@skip_fit_gpytorch_mll
def helper_test_pareto_frontier(
self, _, outcome_constraints: list[OutcomeConstraint] | None
) -> None:
Expand Down

0 comments on commit 782dde3

Please sign in to comment.