OMARS generator: n_runs means the returned run count, and selection criteria search the design class (#496-#499) - #524
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
… criteria exact where enumerable n_runs now counts the centre runs (issue #496): the design returned for generate_omars(n_runs=n, center_runs=c) has exactly n rows, and n_runs - center_runs must be a positive even number. The a_optimal, d_efficiency, and min_second_order_correlation criteria (and the D axis of the default dominance rule) previously post-hoc ranked whatever the binary randomized-objective ILP multistart surfaced, which cannot even represent designs that repeat a half-run; the exhaustive optima in issues #497, #498 and #499 need such repetition. The search now enumerates every feasible half-design multiset (counts per sign class) up to four factors at moderate sizes, scores the count vectors in vectorised batches without materialising designs, and picks the winner exactly; larger problems keep the multistart, reported honestly as search_mode="multistart". Regression tests pin all tractable cells of the three issue tables to their exhaustive optima. A design with a constant second-order column now scores inf on the selection correlation metric instead of having the column skipped, so min_second_order_correlation no longer favours degenerate designs. Fixes #496. Fixes #497. Fixes #498. Fixes #499. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019C3XXbJkuSYH9fMryLqNcU
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019C3XXbJkuSYH9fMryLqNcU
8 tasks
The typecheck gate is red on main itself: the unpinned mcp extra now resolves to mcp 2.x, where FastMCP was renamed MCPServer, so mypy fails on mcp_server.py on every branch. This ports the migrated server and the mcp>=2.0 floor verbatim from #528; the diff no-ops once #528 merges. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019C3XXbJkuSYH9fMryLqNcU
Owner
Author
|
The Generated by Claude Code |
63 tasks
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
The OMARS generator cluster from the 2026-08-14 audit batch. Version bumped to 1.72.0 (MINOR: the
n_runssemantics change plus the exact-search behaviour).n_runsis now the total run count of the returned design, centre runs included:generate_omars(n_runs=17, center_runs=3)returns 17 rows, 3 of them centre runs.n_runs - center_runsmust be a positive even number, and all reported metrics are computed on the full returned design._ENUM_MAX_HALF = {3: 18, 4: 12}), scores count vectors in vectorised batches (eigvalsh on the count-weighted Gram, no design materialisation), and selects exactly. Beyond the caps the multistart remains, and both the docstring andmetadata["search_mode"]say which regime produced the design.infon the selection correlation metric instead of having the column skipped. The descriptive statistic inomars_propertiesis unchanged.Every cell of all three issue tables was verified to reproduce the exhaustive optimum exactly (A: 13 cells, D: 14 cells, max|r|: 14 cells), including the former worst cases (A gap 39.7% at k=3 N=21; max|r| gap 51.2% at k=4 N=25). Wall-clock for the largest cell (k=4, N=25, h=12: 2.42M feasible designs) is about 90 s; the k=3 cells and k=4 up to N=17 are sub-5 s.
Test plan
tests/test_omars_ilp_optima.pypins the tractable issue-table cells to their exhaustive optima (k=4 N=19/21 markedslow); the N=23/25 cells were verified in-session and left out of CI for runtimen_runsfor several(n_runs, center_runs)combinations, including an even totaluv run pytest tests/test_omars_ilp.py tests/test_omars_ilp_optima.py --no-cov: 63 passeduv run pytest tests/test_omars*.py tests/test_experiments_omars.py tests/test_design_generation.py tests/test_audit_regressions_experiments.py --no-cov: 361 passed, 1 skipped (pre-existing skip)ruff check .,ruff format --check .clean;mypy src/process_improveshows only the pre-existingmcp_server.pyFastMCP attr error unrelated to this diffChecklist
pyproject.toml(PATCH for fixes/docs/config, MINOR for new features)ruff check .passesCHANGELOG.mdupdated