Skip to content

Add strong regression unit tests - #80

Merged
GernotMaier merged 9 commits into
mainfrom
regression-unit-tests
Aug 4, 2026
Merged

Add strong regression unit tests#80
GernotMaier merged 9 commits into
mainfrom
regression-unit-tests

Conversation

@GernotMaier

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR strengthens the stereo-regression safety net by adding regression-focused contract tests (including CLI wiring) meant to catch unintended behavior changes when shared infrastructure evolves, alongside small supporting fixes in utilities and preprocessing.

Changes:

  • Add extensive regression contract/guard test coverage for stereo training, loading, inference, and streaming behavior.
  • Harden utility behavior (e.g., ignore directories when discovering *.joblib* artifacts) and adjust regression residual preprocessing to avoid invalid log operations.
  • Update development tooling configuration (Ruff + pre-commit hook revisions).

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_utils.py Adds regression-oriented unit tests for utility helpers (joblib discovery, image selection parsing, model parameter loading, memory profiling, joblib loading).
tests/test_regression_shared_contracts.py Adds shared-infrastructure contract tests to ensure classification-side refactors don’t break regression behavior.
tests/test_regression_production_guard.py Adds comprehensive “production guard” tests covering regression train/apply/load/streaming internals and invariants.
tests/test_regression_contracts.py Adds regression boundary/contract tests for persisted feature order, residual inversion, and ROOT output behavior.
tests/scripts/test_stereo_entrypoints.py Adds console-script wiring tests for stereo train/apply entrypoints.
src/eventdisplay_ml/utils.py Filters discovered *.joblib* entries to files only; provides memory profiling and joblib-load warning suppression used by new tests.
src/eventdisplay_ml/data_processing.py Makes MC log-energy computation explicit and avoids logging invalid energies during residual construction.
pyproject.toml Updates Ruff configuration (notably adds force-exclude and excludes tests/).
.pre-commit-config.yaml Bumps pre-commit hook revisions (Ruff/isort/codespell).

Comment thread pyproject.toml Outdated
Comment thread tests/test_regression_production_guard.py Outdated
GernotMaier and others added 4 commits August 4, 2026 20:57
@GernotMaier
GernotMaier marked this pull request as ready for review August 4, 2026 19:03
@GernotMaier
GernotMaier merged commit c00322c into main Aug 4, 2026
3 checks passed
@GernotMaier
GernotMaier deleted the regression-unit-tests branch August 4, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants