Repository navigation
Conversation
…ew sources can change A parameter whose own source and whose dims' indices an update leaves alone keeps the frame the door checked at the last build. Dimensions, relations and the assumptions are still read and checked on every update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018B3nA4oeSor7jjZ4vwux1G
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018B3nA4oeSor7jjZ4vwux1G
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Documentation build overview
109 files changed ·
|
Merging this PR will regress 2 benchmarks1 warning
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
Note
The following content was generated by AI.
Model.updatere-read and re-checked every source through the door. It now keeps each parameter whose own source and dims' indices the update leaves alone. On top of #2065, an update of one parameter takes 0.80–0.88× the time, from the storage model at 1k columns to network at 1M.What changed
tidy_sourcestakeskept: parameters it returned before, taken as they are, neither read nor checked again. Without it, nothing changes.kept_parameters(program, tidied, changed)decides which. A parameter's checks read its own source and the index of each of its dims (a positional source reads its dim's index for its labels), so it is kept only where neither is among the names the update replaced.Model.updatepasses the names it replaced to_fill, which askskept_parametersof the last build's tidied frames. The first build passes nothing.What an update costs, measured before the change on
storageat 1k columns:tidy_sources9.6 ms,attach1.3 ms and the build 24.3 ms of 36.9 ms. This change takes most of the first; the build is #2022's.Probes and mutation table
tests/test_update.py:test_an_update_checks_again_only_the_parameters_it_can_change, three cases onexamples/dispatch.yaml: an update ofloadre-checksloadalone; one of thesnapshotindex re-checksload, which is over it; one of thegeneratorindex re-checksp_maxandcost.test_an_update_that_drops_a_label_refuses_the_unchanged_parameter_still_over_it:snapshotloses label 3, andload, not in the update, is refused for still naming it.The one condition in
kept_parameters, by hand (sedon the line,__pycache__dropped on both sides,git checkout --to restore, tree clean after each), full suite:if False)name not in changeddropped)A/B of the update, this container (4 cores, not the publishing machine)
Base #2065's head
792d441, headfe51b12. One fresh process per measurement, base and head alternated ABBA for three rounds. Each process builds the model once, then times 12 calls ofmodel.update({'load': …}), each with new numbers on the same coordinates, and reports the median; the table gives the median over the three processes. Only the update is timed: no solve, no hand-off. Load average 0.90 before, 2.16 after.loadloadloadloadPer-process medians, ms: storage 2xs base 38.2 / 34.4 / 41.8, head 42.9 / 33.7 / 31.1; storage xs base 40.6 / 38.7 / 40.4, head 34.6 / 33.5 / 33.3; network s base 93.7 / 106.3 / 96.2, head 77.4 / 77.0 / 79.3; network m base 395.2 / 385.1 / 359.8, head 303.5 / 319.5 / 319.9.
Gates at this head, on mathspec 0.4.0
No pixi in this container, so each gate ran in a uv environment synced from #2065's
uv.lock(--group dev --group docs --all-extras, Python 3.12, polars 2.0.0):ruff check .,ruff format --check .(0.16.9): clean.pyrefly checkon the package and onexamples/ports/references/linopy(1.3.1): 0 errors.pytest -q -n 4: 5887 passed, 458 skipped, 4 xfailed.pytest tests/test_docs_math.py tests/test_docstring_links.py(docs-test): 116 passed.Not run:
docs-build, the floors environment,test-via-pyarrow.Not done. An update that changes only numbers still runs the whole build, about two thirds of its time. Skipping that needs a path that recomputes only the bounds, right-hand sides and costs a parameter feeds; that is a design decision, not part of this PR. Stacked on #2065.
Generated by Claude Code