Skip to content

Commit

Permalink
Set deprecation for sooner (warning has been around for a year) (#2351)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #2351

Context for this stack: we've been meaning to deprecate ALEBO and REMBO for a long time. Tests on them break periodically and slow down development of GenerationStrategy, which these classes hack around, so there's substantial maintenance burden to keeping them.

Context for this diff, RfC: 0.5.0 is a long-ways away. Let's deprecate these in the version after next one we cut.

Reviewed By: saitcakmak

Differential Revision: D56038505

fbshipit-source-id: 77f40da515d6295fec28a2642bf0a078a4881b5e
  • Loading branch information
Lena Kashtelyan authored and facebook-github-bot committed Apr 15, 2024
1 parent 25c4d0d commit bedc207
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions ax/models/torch/alebo.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def __init__(self, B: Tensor, batch_shape: torch.Size) -> None:
has_lengthscale=False, ard_num_dims=None, eps=0.0, batch_shape=batch_shape
)
warn(
"ALEBOKernel is deprecated and should be removed in Ax 0.5.0.",
"ALEBOKernel is deprecated and should be removed in Ax 0.3.9.",
DeprecationWarning,
)
# pyre-fixme[4]: Attribute must be annotated.
Expand Down Expand Up @@ -337,7 +337,7 @@ def __init__(
self, B: Tensor, train_X: Tensor, train_Y: Tensor, train_Yvar: Tensor
) -> None:
warn(
"ALEBOGP is deprecated and should be removed in Ax 0.5.0. SAASBO "
"ALEBOGP is deprecated and should be removed in Ax 0.3.9. SAASBO "
"(Models.SAASBO from ax.modelbridge.registry) likely provides better "
"performance.",
DeprecationWarning,
Expand Down Expand Up @@ -433,7 +433,7 @@ def get_fitted_model(
"""
warn(
"`get_fitted_model` from ax.models.torch.alebo.py is deprecated and "
"should be removed in Ax 0.5.0.",
"should be removed in Ax 0.3.9.",
DeprecationWarning,
)
# Get MAP estimate.
Expand Down Expand Up @@ -484,7 +484,7 @@ def get_map_model(
"""
warn(
"`get_map_model` from ax.models.torch.alebo.py is deprecated and should "
"be removed in Ax 0.5.0.",
"be removed in Ax 0.3.9.",
DeprecationWarning,
)
f_best = 1e8
Expand Down Expand Up @@ -530,7 +530,7 @@ def laplace_sample_U(
and output scale.
"""
warn(
"laplace_sample_U is deprecated and should be removed in Ax 0.5.0.",
"laplace_sample_U is deprecated and should be removed in Ax 0.3.9.",
DeprecationWarning,
)
# Estimate diagonal of the Hessian
Expand Down Expand Up @@ -600,7 +600,7 @@ def get_batch_model(
"""
warn(
"`get_batch_model` from ax.models.torch.alebo.py is deprecated and "
"should be removed in Ax 0.5.0.",
"should be removed in Ax 0.3.9.",
DeprecationWarning,
)
b = Uvec_batch.size(0)
Expand Down Expand Up @@ -641,7 +641,7 @@ def extract_map_statedict(
"""
warn(
"`extract_map_statedict` from ax.models.torch.alebo.py is deprecated and "
"should be removed in Ax 0.5.0.",
"should be removed in Ax 0.3.9.",
DeprecationWarning,
)
is_modellist = num_outputs > 1
Expand Down Expand Up @@ -741,7 +741,7 @@ def alebo_acqf_optimizer(
lie within that polytope.
"""
warn(
"`alebo_acqf_optimizer` is deprecated and should be removed in Ax 0.5.0.",
"`alebo_acqf_optimizer` is deprecated and should be removed in Ax 0.3.9.",
DeprecationWarning,
)
candidate_list, acq_value_list = [], []
Expand Down Expand Up @@ -819,7 +819,7 @@ def __init__(
self, B: Tensor, laplace_nsamp: int = 25, fit_restarts: int = 10
) -> None:
warn(
"ALEBO is deprecated and should be removed in Ax 0.5.0.",
"ALEBO is deprecated and should be removed in Ax 0.3.9.",
DeprecationWarning,
)
self.B = B
Expand Down
2 changes: 1 addition & 1 deletion ax/models/torch/rembo.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(
) -> None:
warn(
"REMBO is deprecated and does not guarantee correctness. "
"It will be removed in Ax 0.5.0.",
"It will be removed in Ax 0.3.9.",
DeprecationWarning,
)
self.A = A
Expand Down

0 comments on commit bedc207

Please sign in to comment.