diff --git a/ax/generation_strategy/tests/test_generation_strategy.py b/ax/generation_strategy/tests/test_generation_strategy.py index 4a6c22f8a9c..9238ecfaf97 100644 --- a/ax/generation_strategy/tests/test_generation_strategy.py +++ b/ax/generation_strategy/tests/test_generation_strategy.py @@ -1873,6 +1873,7 @@ def test_node_gs_with_auto_transitions_three_phase(self) -> None: self.assertEqual(trial.generator_runs[2]._generation_node_name, "sobol_3") # after running the next trial should be made from sobol 4 + # pyrefly: ignore [unbound-name] trial.run() trial = exp.new_batch_trial(generator_runs=gs_2.gen(exp)[0]) self.assertEqual(trial.generator_runs[0]._generation_node_name, "sobol_4") diff --git a/ax/generators/torch/botorch_modular/acquisition.py b/ax/generators/torch/botorch_modular/acquisition.py index fd8e7421c7f..4dfda6c11ff 100644 --- a/ax/generators/torch/botorch_modular/acquisition.py +++ b/ax/generators/torch/botorch_modular/acquisition.py @@ -542,6 +542,7 @@ def select_from_candidate_set( # Otherwise, use direct selection mode. num_samples_attr = getattr(sampling_strategy, "num_samples", None) num_samples: int | None = ( + # pyrefly: ignore [bad-argument-type] int(num_samples_attr) if num_samples_attr is not None else None ) diff --git a/ax/utils/measurement/synthetic_functions.py b/ax/utils/measurement/synthetic_functions.py index c499d78e28f..d40a2e46561 100644 --- a/ax/utils/measurement/synthetic_functions.py +++ b/ax/utils/measurement/synthetic_functions.py @@ -259,7 +259,7 @@ class Branin(SyntheticFunction): _required_dimensionality = 2 _domain: list[tuple[float, float]] = [(-5.0, 10.0), (0.0, 15.0)] - # pyrefly: ignore [bad-override-mutable-attribute] + # pyrefly: ignore [bad-override, bad-override-mutable-attribute] _minimums: list[tuple[float, float]] = [ (-np.pi, 12.275), (np.pi, 2.275), @@ -285,7 +285,7 @@ class Aug_Branin(SyntheticFunction): _required_dimensionality = 3 _domain: list[tuple[float, float]] = [(-5.0, 10.0), (0.0, 15.0), (0.0, 1.0)] - # pyrefly: ignore [bad-override-mutable-attribute] + # pyrefly: ignore [bad-override, bad-override-mutable-attribute] _minimums: list[tuple[float, float, float]] = [ (-np.pi, 12.275, 1.0), (np.pi, 2.275, 1.0),