From 6c55c0fe344e28fdaed80097be570266b6e2e484 Mon Sep 17 00:00:00 2001 From: Max Balandat Date: Fri, 26 Apr 2024 12:53:58 -0700 Subject: [PATCH] Do not transform search space in-place in Modelbridge._get_transformed_gen_args (#2386) Summary: Pull Request resolved: https://github.com/facebook/Ax/pull/2386 The current setup leads to issues when calling `evaluate_acquisition_function()` in between generation steps, see discussion on https://github.com/facebook/Ax/issues/2083 Reviewed By: saitcakmak Differential Revision: D56400492 fbshipit-source-id: 28a71e287ea46b6c17806561c2362aa034108aba --- ax/modelbridge/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ax/modelbridge/base.py b/ax/modelbridge/base.py index 8dc0232a304..05a7e4ef40e 100644 --- a/ax/modelbridge/base.py +++ b/ax/modelbridge/base.py @@ -690,6 +690,7 @@ def _get_transformed_gen_args( # TODO(T34225037): replace deepcopy with native clone() in Ax pending_observations = deepcopy(pending_observations) fixed_features = deepcopy(fixed_features) + search_space = search_space.clone() # Transform for t in self.transforms.values():