Speed up regression tests#2515
Open
jucor wants to merge 1 commit into
Open
Conversation
This was referenced Mar 30, 2026
591e196 to
510205d
Compare
4ad6046 to
603f0ac
Compare
b1ebec4 to
8637399
Compare
603f0ac to
b9dcc89
Compare
ballPointPenguin
approved these changes
Apr 26, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR speeds up Delphi’s golden-snapshot regression tests by reducing unnecessary computation during comparisons, while preserving the more granular stage-by-stage test for debugging.
Changes:
- Switch
ConversationComparer.compare_with_golden()to defaultbenchmark=Falseso correctness checks don’t run the pipeline multiple times for timing stats. - Add
skip_intermediate_stagestocompute_all_stages()/compare_with_golden()to optionally skip stages 1–4 and only compute the full recompute + export. - Update
test_conversation_regressionto useskip_intermediate_stages=Truesince it only assertsoverall_match.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
delphi/tests/test_regression.py |
Makes the main regression test skip intermediate stages to reduce runtime. |
delphi/polismath/regression/utils.py |
Adds skip_intermediate_stages support in stage computation and benchmarks. |
delphi/polismath/regression/comparer.py |
Changes default benchmarking behavior and plumbs through stage-skipping option. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
## Summary - Default `benchmark=False` in `compare_with_golden()` — benchmark mode ran the pipeline 3x for timing statistics, unnecessary for correctness checks. The `regression_comparer.py` script already had `--benchmark` as opt-in, so this aligns the default. - Add `skip_intermediate_stages` parameter to `compute_all_stages()` — `test_conversation_regression` now skips stages 1-4 (empty, load-only, PCA-only, PCA+clustering) since it only checks `overall_match`. `test_conversation_stages_individually` still runs all stages for granular failure detection. ### Measured speedup on one of the large private test conversations | Test | Before | After | Speedup | |------|--------|-------|---------| | `test_conversation_regression` | 317s | 23s | **13.9x** | | `test_conversation_stages_individually` | 60s | 32s | **1.9x** | The regression test's ~14x speedup comes from two combined effects: no longer running the pipeline 3x (benchmark), and skipping 4 redundant intermediate stages. ## Test plan - [x] All 9 public regression tests pass (vw + biodiversity) - [x] Private dataset tests pass (`--include-local`) - [x] Timing verified on large private dataset 🤖 Generated with [Claude Code](https://claude.com/claude-code) ## Squashed commits - Address Copilot review: fix stale terminology, hardcoded blob_type, and synthetic test tid range - Speed up regression tests: disable benchmark, skip intermediate stages commit-id:f39f3218
Delphi Coverage Report
|
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.
Summary
benchmark=Falseincompare_with_golden()— benchmark mode ran the pipeline 3x for timing statistics, unnecessary for correctness checks. Theregression_comparer.pyscript already had--benchmarkas opt-in, so this aligns the default.skip_intermediate_stagesparameter tocompute_all_stages()—test_conversation_regressionnow skips stages 1-4 (empty, load-only, PCA-only, PCA+clustering) since it only checksoverall_match.test_conversation_stages_individuallystill runs all stages for granular failure detection.Measured speedup on one of the large private test conversations
test_conversation_regressiontest_conversation_stages_individuallyThe regression test's ~14x speedup comes from two combined effects: no longer running the pipeline 3x (benchmark), and skipping 4 redundant intermediate stages.
Test plan
--include-local)🤖 Generated with Claude Code
Squashed commits
commit-id:f39f3218
Stack: