Skip to content

Fix pipeline state, evaluation consistency, and geometry exports - #64

Merged
andremun merged 30 commits into
masterfrom
codex/fix-sifted-cache-reset
Sep 30, 2026
Merged

andremun merged 30 commits into
masterfrom
codex/fix-sifted-cache-reset

Conversation

@andremun

@andremun andremun commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Repeated builds and evaluation could reuse stale state, inconsistent preprocessing, or test-derived selection weights. This change corrects those paths and adds regression coverage for the reviewed scientific and export contracts.

Changes

  • Reset SIFTED caches, rebuild portfolio-dependent preprocessing after pruning, preserve pre-selection inputs, and validate staged option provenance.
  • Apply fitted PLS centring and constant-column scales consistently; keep recommendations independent of test labels and distinguish CV from test summaries.
  • Preserve original relative-performance ratios, allow zero with the documented substitution, and reject negative raw performance. Seed each preprocessing pass explicitly.
  • Reuse trained TRACE geometry for small evaluation batches, expose footprint acceptance, correct recall and cost-sensitive weights, and validate failed CV results.
  • Correct camera views, seed bounds, JSON groups and subsetting; replace stale exports and include 3D surface geometry.
  • Reduce unnecessary distance and neighbourhood allocations, bound corner enumeration memory, and respect parallel-pool ownership.
  • Update and regenerate reference documentation.

Validation

  • MATLAB R2026a Update 5: complete suite passed 198/198 in four disjoint clean sessions.
  • After the final performance-domain correction: 80/80 affected-test executions passed, including repeated numeric checks.
  • Documented example completed; a fresh reference build completed during final evaluation regressions.
  • Documentation generation check passed; 31 pages checked with zero link problems; git diff --check passed.
  • R2025a CI has not yet been verified for this branch.

See the resolution report and per-test evidence for finding-to-commit mappings, exact validation scope, and limitations. Historical reproduction failures are retained as review evidence.

Compatibility

Rebuild affected experiments to obtain corrected preprocessing and summaries. Incomplete training data and negative raw performance now raise errors. Relative zero handling remains a unit-sensitive numerical convention. Training CV remains conditional on the fitted pipeline rather than an unbiased outer-CV assessment. Saved pre-SIFTED data increases model size.

Copilot follow-up

Commit f238f16 addresses all four findings: serial SIFTED no longer dispatches worker cache resets, legacy PLS migration translates saved CLOISTER vertices once, and CLOISTER/PYTHIA help now documents the centring argument and score semantics. All 12 targeted tests passed, including serial/parallel cache isolation and 2D/3D migration with unchanged topology. Documentation generation and all 31 page link checks passed. See the follow-up report and test results.

Issue #63 investigation

This PR should not be considered a fix for #63. A controlled comparison of master and the PR ran 12 PILOT solves in six MATLAB R2026a Update 5 sessions on identical saved inputs, with default (12) and single computation threads. All runs selected restart 10. Coefficients and projected coordinates were exactly equal; switching thread count changed only restart correlation scores by at most 6.55e-15. The reported larger CI drift was not reproduced. The numerical objective, optimization loop, and raw restart-selection rule remain unchanged, so #63 remains open. See the investigation and reproduction instructions.

A Balanced Copilot re-review was requested after fixing the four original findings, but Copilot could not run it because the requesting account reached its quota limit.

Copilot AI balanced review requested due to automatic review settings September 30, 2026 03:11

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.

Copilot review overview

🟡 Changes recommended

Legacy PLS migration leaves saved CLOISTER geometry misaligned, and serial SIFTED still dispatches work to existing parallel pools.

Review effort: Balanced
Findings: 2 Medium severity · 2 Low severity

Open (4)
What changed in this PR

This PR corrects pipeline state, evaluation consistency, scientific metrics, geometry exports, and performance bottlenecks, with regression coverage and regenerated documentation.

Changes:

  • Fixes preprocessing, staged rebuilds, PLS projection, selection metrics, TRACE evaluation, and migration.
  • Improves geometry exports, plotting, parallel-pool handling, and memory usage.
  • Adds extensive regression tests, verification evidence, and reference documentation.
File Description
utils/​ISAvalidateOpts.m Canonicalizes options and validates seeds/subsetting.
utils/​ISAmigrateModel.m Migrates PLS and PYTHIA state.
utils/​ISAdefaults.m Adds SIFTED diagnostics default.
tests/​ValidationTest.m Updates option-validation expectations.
tests/​StateReviewTest.m Tests state, rebuild, path, and pool behavior.
tests/​StageUnitTest.m Tests cache isolation and camera angles.
tests/​ReviewFixTest.m Covers reviewed pipeline defects.
tests/​ProjectionReviewTest.m Tests projection fallback and allocation behavior.
tests/​PortfolioPruningTest.m Verifies preprocessing after portfolio pruning.
tests/​PerformanceReviewTest.m Tests bounded hull and filtering behavior.
tests/​OptionsReviewTest.m Tests JSON groups and camera direction.
tests/​NumericReviewTest.m Tests performance-domain and seed boundaries.
tests/​InstanceSpaceTest.m Checks stale plot removal.
tests/​ExportReviewTest.m Verifies 2D/3D geometry exports.
review/​2026-09-30/​smoke.log Records smoke-test output.
review/​2026-09-30/​run_review_verification.m Runs partitioned verification suites.
review/​2026-09-30/​reproductions.log Records original defect reproductions.
review/​2026-09-30/​REPORT.md Documents initial review findings.
review/​2026-09-30/​isa_review_smoke.m Defines the review smoke test.
review/​2026-09-30/​isa_review_extra.m Defines additional reproductions.
review/​2026-09-30/​isa_review_checks.m Defines primary defect reproductions.
review/​2026-09-30/​FINAL_REPORT.md Summarizes resolutions and validation.
review/​2026-09-30/​check_svm_calibration_labels.m Checks SVM calibration effects.
README.md Updates missing-data and TRACE contracts.
output/​scriptpng.m Removes stale plots and adjusts performance scaling.
output/​scriptfcn.m Corrects 3D camera conventions.
output/​scriptcsv.m Exports 3D faces and geometry manifests.
output/​ISArecallView.m Restores equal-axis camera views.
InstanceSpace.m Fixes state provenance, pruning, pools, and PLS evaluation.
doc/​src/​TRACE.md Documents evaluation geometry and acceptance status.
doc/​src/​SIFTED.md Documents optional diagnostics.
doc/​src/​scriptpng.md Documents stale plot replacement.
doc/​src/​scriptcsv.md Documents geometry export schema.
doc/​src/​PYTHIA.md Documents metrics, scores, and selection changes.
doc/​src/​PRELIM.md Documents performance-domain behavior.
doc/​src/​PILOTviewpoint.md Documents camera conventions.
doc/​src/​PILOT.md Documents PLS centering and optimizations.
doc/​src/​OptionsReference.md Updates option contracts.
doc/​src/​MetadataFormat.md Clarifies missing-value handling.
doc/​src/​InstanceSpace.md Documents stage provenance and rebuilding.
doc/​src/​GettingStarted.md States performance-domain requirements.
doc/​src/​FILTER.md Documents bounded-neighborhood processing.
doc/​src/​CLOISTER.md Documents centering and batched corners.
doc/​html/​TRACE.html Regenerates TRACE reference output.
doc/​html/​SIFTED.html Regenerates SIFTED reference output.
doc/​html/​scriptpng.html Regenerates plot-export documentation.
doc/​html/​scriptcsv.html Regenerates CSV-export documentation.
doc/​html/​PYTHIA.html Regenerates PYTHIA documentation.
doc/​html/​PRELIM.html Regenerates PRELIM documentation.
doc/​html/​PILOTviewpoint.html Regenerates viewpoint documentation.
doc/​html/​PILOT.html Regenerates PILOT documentation.
doc/​html/​OptionsReference.html Regenerates options documentation.
doc/​html/​MetadataFormat.html Regenerates metadata documentation.
doc/​html/​InstanceSpace.html Regenerates class documentation.
doc/​html/​GettingStarted.html Regenerates getting-started documentation.
doc/​html/​FILTER.html Regenerates FILTER documentation.
doc/​html/​CLOISTER.html Regenerates CLOISTER documentation.
core/​TRACE.m Reuses trained geometry and exposes acceptance state.
core/​SIFTED.m Resets caches and controls diagnostics/parallelism.
core/​PRELIM.m Fixes performance-domain and normalization behavior.
core/​PILOTviewpoint.m Respects serial execution settings.
core/​PILOT.m Applies PLS centering and avoids unnecessary distances.
core/​INIT.m Replays feature exclusions and rejects incomplete training data.
core/​FILTER.m Bounds neighborhood allocation.
core/​CLOISTER.m Centers PLS bounds and batches corner enumeration.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread core/SIFTED.m Outdated
Comment thread utils/ISAmigrateModel.m
Comment thread core/CLOISTER.m
Comment thread doc/src/PYTHIA.md
@andremun
andremun requested a balanced review from Copilot September 30, 2026 03:30

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.89313% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.88%. Comparing base (08044f5) to head (3aa086b).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
core/PYTHIA.m 88.46% 12 Missing ⚠️
InstanceSpace.m 93.24% 5 Missing ⚠️
utils/ISAmigrateModel.m 82.35% 3 Missing ⚠️
core/PILOT.m 80.00% 2 Missing ⚠️
core/CLOISTER.m 97.14% 1 Missing ⚠️
output/scriptcsv.m 97.43% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #64      +/-   ##
==========================================
+ Coverage   94.18%   94.88%   +0.69%     
==========================================
  Files          23       23              
  Lines        3045     3282     +237     
==========================================
+ Hits         2868     3114     +246     
+ Misses        177      168       -9     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@andremun
andremun merged commit aac7d7d into master Sep 30, 2026
5 of 6 checks passed
@andremun
andremun deleted the codex/fix-sifted-cache-reset branch September 30, 2026 04:32
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