diff --git a/ax/modelbridge/generation_strategy.py b/ax/modelbridge/generation_strategy.py index d8a70e4a5fc..ba70b64035d 100644 --- a/ax/modelbridge/generation_strategy.py +++ b/ax/modelbridge/generation_strategy.py @@ -386,7 +386,7 @@ def _validate_and_set_step_sequence(self, steps: List[GenerationStep]) -> None: # Set transition_to field for all but the last step, which remains # null. - if idx != len(self._steps): + if idx != len(self._steps) - 1: for transition_criteria in step.transition_criteria: if ( transition_criteria.criterion_class