Skip to content

Commit b438b2d

Browse files
saitcakmakfacebook-github-bot
authored andcommitted
Remove **kwargs & deprecated indices argument of Round transform
Summary: Deprecated since #1516 Reviewed By: Balandat Differential Revision: D56799439 fbshipit-source-id: cfe43e55b45bbf77d6da33d8aa10b8fde91d2e44
1 parent fa222dc commit b438b2d

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

botorch/models/transforms/input.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,6 @@ def __init__(
781781
transform_on_fantasize: bool = True,
782782
approximate: bool = False,
783783
tau: float = 1e-3,
784-
**kwargs,
785784
) -> None:
786785
r"""Initialize transform.
787786
@@ -800,13 +799,6 @@ def __init__(
800799
rounding should be used. Default: False.
801800
tau: The temperature parameter for approximate rounding.
802801
"""
803-
indices = kwargs.get("indices")
804-
if indices is not None:
805-
warn(
806-
"`indices` is marked for deprecation in favor of `integer_indices`.",
807-
DeprecationWarning,
808-
)
809-
integer_indices = indices
810802
if approximate and categorical_features is not None:
811803
raise NotImplementedError
812804
super().__init__()

test/models/transforms/test_input.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55
# LICENSE file in the root directory of this source tree.
66

77
import itertools
8-
import warnings
98
from copy import deepcopy
109
from random import randint
1110

1211
import torch
13-
from botorch import settings
1412
from botorch.exceptions.errors import BotorchTensorDimensionError
1513
from botorch.exceptions.warnings import UserInputWarning
1614
from botorch.models.transforms.input import (
@@ -620,10 +618,6 @@ def test_round_transform_init(self) -> None:
620618
# basic init
621619
int_idcs = [0, 4]
622620
categorical_feats = {2: 2, 5: 3}
623-
# test deprecation warning
624-
with warnings.catch_warnings(record=True) as ws, settings.debug(True):
625-
Round(indices=int_idcs)
626-
self.assertTrue(any(issubclass(w.category, DeprecationWarning) for w in ws))
627621
round_tf = Round(
628622
integer_indices=int_idcs, categorical_features=categorical_feats
629623
)

0 commit comments

Comments
 (0)