From eda75e59d56114e21210a4b4bab5191d5807fc11 Mon Sep 17 00:00:00 2001 From: Dima Molodenskiy Date: Wed, 14 Oct 2026 13:09:30 +0200 Subject: [PATCH] test: skip AlphaPulldown's own subfolders when the GPU checks look for folds With the alphapulldown/ and debug/ subfolders (#664), a fold written straight into the output directory (run_structure_prediction.py, as the AF2 long-name check does) has subfolders that are not folds. The AF2 and AlphaLink checks took every subfolder for a fold, so TestRunModes::test__long_name found no ranked models in alphapulldown/ and failed on main 228c5eed. The AF3 checks already pick fold folders by their ranking_scores.csv. Co-Authored-By: Claude Opus 5.5 --- test/cluster/check_alphafold2_predictions.py | 9 ++++++++- test/cluster/check_alphalink_predictions.py | 12 ++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/test/cluster/check_alphafold2_predictions.py b/test/cluster/check_alphafold2_predictions.py index 57d19d62..14750f54 100755 --- a/test/cluster/check_alphafold2_predictions.py +++ b/test/cluster/check_alphafold2_predictions.py @@ -187,6 +187,10 @@ def _af2_subprocess_env() -> dict[str, str]: # --------------------------------------------------------------------------- # # common helper mix-in / assertions # # --------------------------------------------------------------------------- # +# AlphaPulldown's own subfolders of a fold directory (records, feature metadata, debug +# output); the folds are the other subfolders. +_ALPHAPULLDOWN_SUBDIRS = {"alphapulldown", "debug"} + class _TestBase(parameterized.TestCase): use_temp_dir = True @@ -262,7 +266,10 @@ def _runCommonTests(self, res: subprocess.CompletedProcess, multimer: bool, dirn if dirname is not None: folders = [self.output_dir / dirname] else: - folders = [d for d in self.output_dir.iterdir() if d.is_dir()] + folders = [ + d for d in self.output_dir.iterdir() + if d.is_dir() and d.name not in _ALPHAPULLDOWN_SUBDIRS + ] for folder in folders: files = list(folder.iterdir()) diff --git a/test/cluster/check_alphalink_predictions.py b/test/cluster/check_alphalink_predictions.py index d83cbab1..1ff70643 100644 --- a/test/cluster/check_alphalink_predictions.py +++ b/test/cluster/check_alphalink_predictions.py @@ -54,6 +54,10 @@ # --------------------------------------------------------------------------- # # common helper mix-in / assertions # # --------------------------------------------------------------------------- # +# AlphaPulldown's own subfolders of a fold directory (records, feature metadata, debug +# output); the folds are the other subfolders. +_ALPHAPULLDOWN_SUBDIRS = {"alphapulldown", "debug"} + class _TestBase(parameterized.TestCase): use_temp_dir = True # Class variable to control directory behavior - default to True @@ -308,7 +312,10 @@ def _check_chain_counts_and_sequences(self, protein_list: str): print(f"\nExpected sequences: {expected_sequences}") # Find the predicted PDB files (should be in the output directory) - subdirs = [d for d in self.output_dir.iterdir() if d.is_dir()] + subdirs = [ + d for d in self.output_dir.iterdir() + if d.is_dir() and d.name not in _ALPHAPULLDOWN_SUBDIRS + ] for d in subdirs: pdb_files = list(d.glob("ranked_*.pdb")) if not pdb_files: @@ -469,7 +476,8 @@ def _runCommonTests(self, res: subprocess.CompletedProcess, multimer: bool, dirn ) dirs = [dirname] if dirname else [ - d for d in self.output_dir.iterdir() if d.is_dir() + d for d in self.output_dir.iterdir() + if d.is_dir() and d.name not in _ALPHAPULLDOWN_SUBDIRS ] for d in dirs: