From 9e9cd7793ab94807c50097377ad6f0c68249dec2 Mon Sep 17 00:00:00 2001 From: Elizabeth Santorella Date: Tue, 21 Apr 2026 09:44:33 -0700 Subject: [PATCH] Remove deprecated argument `use_update` to `GenerationStep` (#5187) Summary: Pull Request resolved: https://github.com/facebook/Ax/pull/5187 **Context**: * This was deprecated in 2023. * It was actually hard-deprecated because we had `raise DeprecationWarning` (an exception). * It does not do anything, so it is safe to remove. **This PR**: * Removes places where the argument is passed * Does not remove it from a storage backward-compatibility test Differential Revision: D101822874 --- ax/generation_strategy/generation_node.py | 5 ----- ax/utils/testing/modeling_stubs.py | 1 - 2 files changed, 6 deletions(-) diff --git a/ax/generation_strategy/generation_node.py b/ax/generation_strategy/generation_node.py index f1c34c37f05..936f07ef1c2 100644 --- a/ax/generation_strategy/generation_node.py +++ b/ax/generation_strategy/generation_node.py @@ -983,7 +983,6 @@ class GenerationStep: to `generation_strategy.gen` will fail with a `MaxParallelismReached Exception`, indicating that more trials need to be completed before generating and running next trials. - use_update: DEPRECATED. enforce_num_trials: Whether to enforce that only `num_trials` are generated from the given step. If False and `num_trials` have been generated, but `min_trials_observed` have not been completed, `generation_strategy.gen` @@ -1037,7 +1036,6 @@ def __new__( should_deduplicate: bool = False, generator_name: str | None = None, use_all_trials_in_exp: bool = False, - use_update: bool = False, # DEPRECATED. index: int = -1, # Index of this step, set internally. suggested_experiment_status: ExperimentStatus | None = None, # Deprecated arguments for backwards compatibility. @@ -1051,9 +1049,6 @@ def __new__( Returns: A ``GenerationNode`` instance configured with the provided step parameters. """ - if use_update: - raise DeprecationWarning("`GenerationStep.use_update` is deprecated.") - if num_trials < 1 and num_trials != -1: raise UserInputError( "`num_trials` must be positive or -1 (indicating unlimited) " diff --git a/ax/utils/testing/modeling_stubs.py b/ax/utils/testing/modeling_stubs.py index ceb8bed545d..adba7c17472 100644 --- a/ax/utils/testing/modeling_stubs.py +++ b/ax/utils/testing/modeling_stubs.py @@ -431,7 +431,6 @@ def get_legacy_list_surrogate_generation_step_as_dict() -> dict[str, Any]: "min_trials_observed": 0, "completion_criteria": [], "max_parallelism": 1, - "use_update": False, "enforce_num_trials": True, "model_kwargs": { "surrogate": {