8000 Publish Benchmark v1 snapshot df0d30b: every correctness gate passing (#66) by rafatahmed · Pull Request #67 · rafatahmed/Flahax · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- Publish Benchmark v1 snapshot 2026-10-20-linux-df0d30b (hosted run 39515183621 on `main`, after #62, #65 and #69), the first with every correctness gate passing: 7/7 controlled NNLS cases, 21/21 stored chemistry comparisons, 17/17 timing workloads; complete recipes 34/52 (was 29/52). The results page no longer calls a fully passing scorecard 'not fully passing' (#66).
- Fix `recommend()` slowness and start-dependent recipes under incidental-ion ceilings (#68). Two root causes, both measured against SciPy on every fit: the NNLS optimality test used one tolerance scaled by the whole matrix (max |A| times |b|), so a heavily weighted row hid real descent directions in the other columns and NNLS stopped early (doses off by up to 4.2e-3 g/L); it now bounds each column's dual weight by the rounding error of its own terms. And a binding ceiling was enforced by a 1024-weight penalty, which left the problem so flat in double precision that doses were fixed only to ~2e-3 g/L and depended on the solver's starting point. A binding ceiling is now a constraint: a weight-8 row whose aim is shifted by the Lagrange multiplier, found by a bracketed secant search, with one Gram cache per search. Every ceiling fit now matches SciPy to 1.4e-10 g/L, warm and cold starts agree to 7e-9 g/L, and binding ions land on their aim. Over the 52 benchmark recipes `recommend()` is 34% faster with the default ammonium limit (4.20 -> 2.78 s) and unchanged with a 3 mmol/L Cl ceiling (3.77 -> 3.87 s); the Benchmark v1 formulation workload falls from about 30 to 16 ms. Pass counts are unchanged by default (34/52 recipes, 571/636 targets) and rise with the Cl ceiling (41 -> 42 recipes, 598 -> 599 targets), with no limit violations; the 10 recipes that change have equal or better target fit.
- Fix Benchmark v1 measuring no timings after #63 (#64). ASV imports every module under `benchmarks/` with only that package importable, and the competitor harness there imported `tools`, so discovery aborted. The harness moves to `tools/competitors/`, and a test now discovers the suite the way ASV does.
- Speed up equilibrium solves 3-5x and their pH and dose searches 10-25x in pure Python (#61), found by the #40 comparison with PHREEQC. Each solve averaged its ionic-strength update and needed about 35 outer passes to reach |dI| < 1e-12; ionic strength now takes a safeguarded secant step (the average remains the fallback) and water activity plain substitution. `solve(..., start=result)` warm-starts from a nearby state (free-ion activities, ionic strength, water, precipitated phases) and falls back to the unchanged cold start if it fails; the nitric-target, calculated-pH, acid-selection and measured-water searches warm-start from their previous solve. Converged states are unchanged within solver tolerance (species within 7e-10 relative on every PHREEQC fixture; calculated pH within its 1e-7 bisection width). The mixed-product nitric target drops from about 1080 to 73 ms (PHREEQC: 4.5 ms), calculated-pH irrigation EC from 0.9-2.6 s to 74-244 ms per recipe, the test suite from 133 to 40 s. The shipped phosphate conductivity coefficients are unchanged; refitting them now reproduces them to 7.4e-9 relative instead of bit-exactly, so the reproduction test bounds coefficients at 1e-7 relative and percentages at 1e-5 points (owner decision).
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
43386a611b64cf906158205e15973b9e15f1f56fcb466fa3933d1522f30b58ec README.txt
fe284697559029719b4cbc2648846d3aa00ed4ae6be66d46ca89bf7057fbe92d asv/benchmarks.json
c9c5e11598c55f20b20f56784c544bb9a8ea2f9646f09e6c99f3c4ad7ecad67a asv/runnervm8k3b6/df0d30bf-existing-py_opt_hostedtoolcache_Python_3.13.16_x64_bin_python.json
bb2a63d15f7918c841ed21d1b1db9560e23fe378e99a6ca7e2d34e429eb6fcf5 asv/runnervm8k3b6/machine.json
396f852ac7a29a491bf30a4552dddf920b39737298aa7d778c0fbeaa1057a701 baseline.json
1816a8f386f0b2133e904b6b24d61d1774d70590da3d8e21f317ad6088c93922 capture/after.json
ab12c24c26d14c96d94019d6174715faabd6bf0a08957aac8b5e78290457fb95 capture/asv.log
8550f605b22d5e9d37f83a1ee2402bfecc29a78f6ef8fca26cc80b88cf1be0c7 capture/before.json
dd83f0b5a6e6295c08f12db18db963e181c0ea6eb8e1770c3855aa0e7d7d5f9d capture/environment.txt
7332c95279c2a7f2c7747494ff76d0acb3976a8de0f87cfa62dffb921a6732b9 capture/hosted-ci.json
2e9d861cb311eb01ad46150eb9ed8f2f83cc7391c333dbf0881ed1798050fa94 capture/hosted-workflow.log
4424b13896c59c10e1c58d58f988b73ab5174abec78e7fd44b6f6cd02c6c4c3f capture/manual-workflow.json
3378f10a3d5e988626ff4477f3179a52e0d16ae8e729e3a7dd798284e24faf03 capture/publication-notes.txt
f3df362be48c0166a1ebe5e66622d2184c944ea9e536be55db7576aba028b8b8 configuration/.github/workflows/benchmark.yml
091019434d1e0e1f5e789595503f74a856a9eb634fd8260e744fd471e648798f configuration/asv.conf.json
f61b1f8a9635d7ce95943d3644805a5460cc38defcaea2f260a6b0df094d098d configuration/benchmarks/requirements.txt
599b49ced01dcc40da4467550695c4fb75f057bd0c3add97c3b8d2c2bbaac91d formulation.csv
ee30ef4ddc756dabb771875b0adb14de57417ac14549bc7d1ef1c93ee6fc55a7 formulation.png
992b04b14a66ba53cf65dea2f67c388e91c33cae79d85d1fa9fa0ca0c8565af8 formulation.svg
271c90ec8a75725a2bd3ab875776e727a342f147c2ce1538d3b74595b197d6a5 publish_benchmark_report.py
5c654743b44dd7a261cf18e004a7fae5df8c2a65a35ac720f5d8a439fd34b82f renderer-environment.json
3098cfcf748422ba3c6f4333d893ff67bcf4401dd106b46b6b704e4f4dd25819 requirements-benchmark-report.txt
96effec1753c6b2bbc6475adfca4ca95fd88f3665d9c086e5ff252c0bbd9dd8c timings.csv
3668b3757290caae3e0b133781d44837f9b9db7d2aa38cd82766ddd147072684 timings.png
f381d631ebbee997fa85587bbe37b355d1bdcb9b4d7f4732db48b228c350f0d7 timings.svg
Loading
Loading
0