Sandwich planning: machine-dependent template plans (time-limited exploration), cost of exact vertex solves

Open
#473 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
performance

Research direction

Start by reading prodigy/analysis/lowerbounds/parameters.py and the Exploration.run implementation it calls with time_limit=6.0; run the sandwich example tests to capture current timings and whether template shapes vary under load. For the second point, locate _exact_vertex and its fmpq_mat.solve retry loop, then try reusing one factorisation or restricting to active constraints. Done means deterministic exploration budgets with the time limit only as a safeguard, plus measured test-time reduction and unchanged certificates.

Written by the indexing model from the issue text.

Description

area: analysis enhancement priority: medium topic: loop strategies

Found in #471; both points exist on main.

  • Template plans depend on the machine. plan_parameters (prodigy/analysis/lowerbounds/parameters.py) runs Exploration.run(..., time_limit=6.0) twice. On a slow or loaded machine the exploration stops earlier. The estimated decay rates, and with them the template shapes, can then differ. Soundness is not affected, because every certificate is checked exactly. But whether a bound is found, and how tight it is, depends on the load, so results and tests are not reproducible across machines. Replace the time limit with a deterministic budget, such as a number of states or steps, and keep the time limit only as an outer safeguard.
  • The sandwich examples remain one of the most expensive test groups (3–23 s each locally; the CI is 2–4× slower). The next largest cost after #471 is _exact_vertex: rational fmpq_mat.solve of systems up to ~600×600, taking 0.1–0.2 s each, with up to 6 retries at different tolerances. Options are to reuse a factorisation across the retries, or to solve a smaller system restricted to the active constraints.
Dominant language
Python
Stars
6
Forks
2
Avg merge
1h 52m
Merged PRs (30d)
187

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from LKlinke/Prodigy

All issues in LKlinke/Prodigy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.