Skip to content

Commit

Permalink
Remove **kwargs & deprecated indices argument of Round transform
Browse files Browse the repository at this point in the history
Summary: Deprecated since #1516

Reviewed By: Balandat

Differential Revision: D56799439

fbshipit-source-id: cfe43e55b45bbf77d6da33d8aa10b8fde91d2e44
  • Loading branch information
saitcakmak authored and facebook-github-bot committed May 1, 2024
1 parent fa222dc commit b438b2d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
8 changes: 0 additions & 8 deletions botorch/models/transforms/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,6 @@ def __init__(
transform_on_fantasize: bool = True,
approximate: bool = False,
tau: float = 1e-3,
**kwargs,
) -> None:
r"""Initialize transform.
Expand All @@ -800,13 +799,6 @@ def __init__(
rounding should be used. Default: False.
tau: The temperature parameter for approximate rounding.
"""
indices = kwargs.get("indices")
if indices is not None:
warn(
"`indices` is marked for deprecation in favor of `integer_indices`.",
DeprecationWarning,
)
integer_indices = indices
if approximate and categorical_features is not None:
raise NotImplementedError
super().__init__()
Expand Down
6 changes: 0 additions & 6 deletions test/models/transforms/test_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
# LICENSE file in the root directory of this source tree.

import itertools
import warnings
from copy import deepcopy
from random import randint

import torch
from botorch import settings
from botorch.exceptions.errors import BotorchTensorDimensionError
from botorch.exceptions.warnings import UserInputWarning
from botorch.models.transforms.input import (
Expand Down Expand Up @@ -620,10 +618,6 @@ def test_round_transform_init(self) -> None:
# basic init
int_idcs = [0, 4]
categorical_feats = {2: 2, 5: 3}
# test deprecation warning
with warnings.catch_warnings(record=True) as ws, settings.debug(True):
Round(indices=int_idcs)
self.assertTrue(any(issubclass(w.category, DeprecationWarning) for w in ws))
round_tf = Round(
integer_indices=int_idcs, categorical_features=categorical_feats
)
Expand Down

0 comments on commit b438b2d

Please sign in to comment.