Repository navigation
fix: shorten the slowest validation tests; one SV11 prediction per report - #75
Conversation
…port Two tests built the whole validation report for one or two rows: test_changed_wire_bending_fails_reported_comparison (sigma_B) and test_bending_work_report_compares_identical_measured_paths_and_units (BM1-loop, BM1-ID). The first was the longest test of the suite, 28-50 minutes on a CI runner and 74 minutes on a slow one, which left the Windows 3.11 job three minutes inside its 120-minute limit on dev. - run_validation: the sigma_B block and the BM1-loop/BM1-ID block move unchanged into _sigma_b_row and _bm1_rows; _rows calls them where the blocks were, so the report and its row order do not change. - The two tests call these builders. The check that the retired rows BM1-loop-uniform and CH-GJ stay out of the report reads the recorded report, which CI keeps equal to _rows(). - check_saevik2011: gate_values and split_values were lru_cache'd on their arguments, so gate_values() (the report's SV11 rows) and gate_values(MU_DECLARED) (audit_values) were two entries and every report computed the SV11 predictions twice. The caches are now keyed on the value of mu (_gate_values, _split_values); a new test pins it. Locally, single thread: sigma_B test 0.02 s, BM1 test 27 s, SV11 rows 286 s (gate_values 276 s plus audit_values 288 s before). Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
The new cache test in tests/test_saevik2011_benchmark.py carries the module's full_scale marker, so the taxonomy count of the report goes from 62 to 63. The CI check found no other change beyond round-off. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
The dev run after the 0.2.2 sync (#73) finished its Windows 3.11 job in 117 of its 120 minutes. One test took 74 minutes on that runner.
This PR removes the reason. The validation report and every row value are unchanged.
Cause
test_changed_wire_bending_fails_reported_comparisontest_bending_work_report_compares_identical_measured_paths_and_unitstest_registered_targets_and_results_are_pinned(fixture)The double computation was a cache bug in
check_saevik2011:gate_valueswaslru_cache'd on its arguments, sogate_values()andgate_values(MU_DECLARED)were two cache entries;audit_valuescalls the second.So every report build, the "report is current" job included, ran the 14 SV11 load cases twice.
Changes
run_validation.py: the σ_B block and the BM1-loop / BM1-ID block move unchanged into_sigma_b_row(menard)and_bm1_rows(menard)._rows()calls them where the blocks were, so the row order and values are the same.test_validation_report.py:_rows();BM1-loop-uniformandCH-GJstay out of the report reads the recordedvalidation_report.md, which the CI job "Validation report is current" keeps equal to_rows().check_saevik2011.py:gate_valuesandsplit_valuesnow passfloat(mu)to cached_gate_values/_split_values, so the cache is keyed on the value of μ._clear_resultsclears the new caches.test_saevik2011_benchmark.py:gate_values(),gate_values(MU_DECLARED)andgate_values(mu=0.2)reach one cached result.Local results
Single process, one thread, while other jobs used the machine.
gate_values+lukassen_values+audit_values)gate_valuescached)tests/test_validation_report.pyandtests/test_saevik2011_benchmark.py: 25 passed. Ruff check and format are clean.Not changed
full_scale: 62 passedto63 passed, because the new cache test carries the module'sfull_scalemarker; the CI "report is current" check found no other change beyond round-off.src/cablexsec), so coverage is unaffected.