From 3aaca44cb8dd847a4e2a79805dc559668adf39d4 Mon Sep 17 00:00:00 2001 From: Sait Cakmak Date: Wed, 30 Oct 2024 14:35:16 -0700 Subject: [PATCH] Remove CenteredUnitX transform (#2994) Summary: Pull Request resolved: https://github.com/facebook/Ax/pull/2994 Cleaning up some of the unused transforms will help improve maintainability of the stack. Reviewed By: dme65, Balandat Differential Revision: D65216803 fbshipit-source-id: 772ae69782d0ce8e09c27f199ac96966778ee706 --- ax/modelbridge/transforms/centered_unit_x.py | 20 ------------------- .../tests/test_centered_unit_x_transform.py | 17 ---------------- sphinx/source/modelbridge.rst | 8 -------- 3 files changed, 45 deletions(-) delete mode 100644 ax/modelbridge/transforms/centered_unit_x.py delete mode 100644 ax/modelbridge/transforms/tests/test_centered_unit_x_transform.py diff --git a/ax/modelbridge/transforms/centered_unit_x.py b/ax/modelbridge/transforms/centered_unit_x.py deleted file mode 100644 index d4fbbe6afd7..00000000000 --- a/ax/modelbridge/transforms/centered_unit_x.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -# pyre-strict - - -from ax.modelbridge.transforms.unit_x import UnitX - - -class CenteredUnitX(UnitX): - """Map X to [-1, 1]^d for RangeParameter of type float and not log scale. - - Transform is done in-place. - """ - - target_lb: float = -1.0 - target_range: float = 2.0 diff --git a/ax/modelbridge/transforms/tests/test_centered_unit_x_transform.py b/ax/modelbridge/transforms/tests/test_centered_unit_x_transform.py deleted file mode 100644 index 681188459d2..00000000000 --- a/ax/modelbridge/transforms/tests/test_centered_unit_x_transform.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -# pyre-strict - -from ax.modelbridge.transforms.centered_unit_x import CenteredUnitX -from ax.modelbridge.transforms.tests.test_unit_x_transform import UnitXTransformTest - - -class CenteredUnitXTransformTest(UnitXTransformTest): - transform_class = CenteredUnitX - # pyre-fixme[4]: Attribute must be annotated. - expected_c_dicts = [{"x": -0.5, "y": 0.5}, {"x": -0.5, "a": 1.0}] - expected_c_bounds = [0.0, 1.5] diff --git a/sphinx/source/modelbridge.rst b/sphinx/source/modelbridge.rst index 5cb3ce8d0b0..65bd024aeb0 100644 --- a/sphinx/source/modelbridge.rst +++ b/sphinx/source/modelbridge.rst @@ -182,14 +182,6 @@ Transforms :undoc-members: :show-inheritance: -`ax.modelbridge.transforms.centered_unit_x` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. automodule:: ax.modelbridge.transforms.centered_unit_x - :members: - :undoc-members: - :show-inheritance: - `ax.modelbridge.transforms.choice\_encode` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~