From 8095c8b820303ef8591d49b24f9e8684708dd44f Mon Sep 17 00:00:00 2001 From: "Pyre Bot Jr." Date: Sat, 31 Oct 2026 22:53:00 -0700 Subject: [PATCH] Upgrade packages to Pyrefly R1543.1 (landing group 82) Summary: This Phabricator Diff was generated from Pyrefly type-checker output by the per-target upgrade tool. It was not generated by an AI coding system. It adds `# pyrefly: ignore[...]` comments for type errors reported by Pyrefly R1543.1 and moves the packages it suppresses errors in to that release in `tools/build_defs/fbcode_macros/build_defs/rollouts/pyrefly_checker_rollout.bzl`, so they switch type checkers in the commit that adds their suppressions. Other packages move when the upgrade changes the default checker. It does not change Python runtime behavior or application logic. Landing group: `eb8a09149d55a1b688b811c2db532b62cf45d95bfcdba2ae3afef019a7fa9c65` (attempt 1, 19 batches, 128 files) Merged patch SHA-256: `ba296a30e4c8ca5ee1b1b17999a7b1455d54c5520c9bf8bfa40fa0edbdd0632a` Packages moved to R1543.1: 74 #pyreupgrade Differential Revision: D128893778 --- ax/adapter/tests/test_torch_adapter.py | 1 + ax/early_stopping/strategies/base.py | 1 + ax/generation_strategy/tests/test_generation_strategy.py | 1 + 3 files changed, 3 insertions(+) diff --git a/ax/adapter/tests/test_torch_adapter.py b/ax/adapter/tests/test_torch_adapter.py index adfc19ddc1a..dbc01252113 100644 --- a/ax/adapter/tests/test_torch_adapter.py +++ b/ax/adapter/tests/test_torch_adapter.py @@ -1227,6 +1227,7 @@ def test_pairwise_preference_generator(self) -> None: parameter_names = list(experiment.parameters.keys()) outcomes = [assert_is_instance(Keys.PAIRWISE_PREFERENCE_QUERY.value, str)] + # pyrefly: ignore [unbound-name] datasets, _, candidate_metadata = pmb._convert_experiment_data( experiment_data=pmb._training_data, outcomes=outcomes, diff --git a/ax/early_stopping/strategies/base.py b/ax/early_stopping/strategies/base.py index 57a99e993ab..afdcd22e66e 100644 --- a/ax/early_stopping/strategies/base.py +++ b/ax/early_stopping/strategies/base.py @@ -323,6 +323,7 @@ def _log_and_return_interval_boundary( next_boundary = curr_boundary + interval reason = ( + # pyrefly: ignore [invalid-argument] f"Trial has not crossed an interval boundary. " f"Progressed from {prev_progression:.2f} to {curr_progression:.2f}; " f"both are in the same interval [{curr_boundary:.2f}, " 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")