Repository navigation
CI: cover four untested suites and collapse the torch matrix (10 jobs to 2) - #178
Merged
Merged
Conversation
Four test folders were in no CI job at all: crossclade_domain_search, curation, aga1_class and input_tests. The first two were being run by hand after each merge, which is coverage that depends on somebody remembering. Both need nothing but the standard library and run in 0.14 s between them (30 and 61 tests), so they go in the existing no-torch job rather than the torch matrix. The job's full command now passes 1,365 tests in 10.5 s. Two things found and deliberately NOT changed here, because they are judgement calls rather than omissions: aga1_class needs pandas, which the no-torch job does not install. input_tests collects zero tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Measured on a real run of main: the analysis-tests matrix cost 881 of the run's 916 runner-seconds, while the tests themselves take about 37 s in total. The rest was ten copies of the same `pip install torch`. Only step1_compare imports torch, esm or sklearn. It keeps its own job. The other nine share one light job on pytest/pyyaml/numpy plus scipy and biopython (secretome_discovery uses Bio.Phylo). Verified locally: all nine pass in that environment, 739 tests in 9 s. Checked before splitting, because a speedup that silently stops running tests is worse than no speedup: the tests these suites skip are skipped for missing BINARIES (hmmer, mafft) and absent data files, never for a missing Python package. Dropping torch turns no running test into a skipped one. The suites still get one pytest process each, since each conftest.py puts its own analysis/ directory on sys.path and module names such as figures_ext exist in more than one. The loop runs all nine even when one fails, groups each in the log, and fails the step if any failed. Expected cost per run: about 916 -> 350 runner-seconds. Wall-clock is unchanged, because step1_compare (259 s) already ran in parallel and still dominates. Both analysis jobs keep continue-on-error, so this changes cost, not what can block a merge. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two changes to
.github/workflows/build_and_test.yml, both driven by measurement rather than guesswork.1. Four test folders were in no CI job at all
crossclade_domain_searchcurationaga1_classpandasinput_testsThe first two were being run by hand after each merge — coverage that depends on somebody remembering. They now run in the existing no-torch job, which takes 1,365 tests in 10.5 s.
2. The torch matrix cost 881 of 916 runner-seconds; its tests take ~37 s
Measured on a real run of
main:step1_compareOnly
step1_compareimports torch, esm or sklearn.secretome_discoveryneeds scipy and biopython (Bio.Phylo); the other eight need nothing beyond pytest/pyyaml/numpy. (fungi_scangreps for scipy but passes without it.)So:
step1_comparekeeps its own job, and the other nine share one light job. Verified locally — all nine pass in that environment, 739 tests in 9 s.Expected: ~916 → ~350 runner-seconds per run, about 60% off.
The check that mattered before splitting
A speedup that silently converts running tests into skipped ones is worse than no speedup. Every skip in these suites is for a missing binary (hmmer, mafft) or an absent data file — never a missing Python package. Dropping torch turns no running test into a skipped one.
What this does not do
step1_compare(259 s) already ran in parallel and still dominates. This buys cost, not latency. The next lever there is caching the torch wheel.continue-on-error: true, so this changes cost, not what can block a merge. Worth noting those jobs consume runners but cannot fail the build — whether that is right is a separate decision.conftest.pyputs its ownanalysis/directory onsys.pathand names likefigures_extexist in more than one. The loop runs all nine even when one fails, groups each in the log, and fails the step if any did.Found, deliberately not fixed here
aga1_classneedspandas, which the no-torch job does not install.input_testscollects zero tests — dead weight, or something that silently stopped collecting.🤖 Generated with Claude Code