Repository navigation
Plot the estimate of every solver on the benchmark pages - #17
Merged
Merged
Conversation
The objectives return the solver estimate from save_final_results, so that BenchOpt stores it in the parquet output. collect_results.py saves each estimate as estimates/<bench>/<key>.npz (single precision), records the file name in a new `estimate` column of the result table and prunes the files no longer referenced. Each dataset gets an optional plot_estimate(x_true, x, meta) method (true model, estimate and error), drawn at docs build time for every leaderboard row with an estimate and linked from a new Figure column. In CI the benchmarks write parquet files, and the estimates are kept on the orphan `estimates` branch, force-pushed as a single parentless commit so that binaries never pile up in the history. The docs build extracts that branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Each leaderboard row on a benchmark page now links a figure of that solver's estimate: true model | estimate | error, titled with the solver, its parameters and its PSNR.
benchmarks/*/objective.pygetssave_final_results(self, x). BenchOpt then stores each solver's estimate inline in the.parquetoutput.pylops_bench/results.py,scripts/collect_results.py): raw results are read withbenchopt.results.read_results, which handles both.csvand.parquet.estimates/<bench>/<key>.npz, in float32 or complex64. The key is a hash of the configuration that stays the same when other solvers add parameter columns, and after a CSV round trip.estimatecolumn holds the file name..npzfiles no longer referenced by the table are deleted.--estimates-dir.plot_estimate(x_true, x, meta)method. It uses the same colour scales asplot. Seismic prestack gets a 3x3 grid, one row per parameter.docs/generate_benchmarks.py): each dataset is loaded once per configuration. Estimates are plotted at build time, so changing the plot style needs no re-run. A Figure column links each PNG. Pages with no estimates don't get the column. A plot that fails is logged and skipped, so it can't break-Wbuilds.run_benchmarks.ymlwrites.parquetand publishes the estimates to an orphanestimatesbranch. It is force-pushed as a single parentless commit, so the binaries never pile up in git history. Each run first pulls that benchmark's existing estimates so stale files get pruned.docs.ymlextracts theestimatesbranch before building.pr_smoke.ymlwrites.parquettoo.Rollout
The committed CSVs have no
estimatecolumn yet, so no links appear until the benchmarks are re-run. Merging this PR touches everyobjective.py, which triggersrun_benchmarks.ymlfor all benchmarks. The first run creates theestimatesbranch; the fetch steps cope with it being missing.Test plan
uv run pytest: 56 passed. New tests cover saving, keying, overwriting and pruning estimates, dry runs and CSV input, plus aplot_estimatetest per benchmark.compressive_sensingandimage_deblurringto.parquet, collected them into scratch folders and built the docs with-W. The Figure column renders as download links, and the figures were checked visually.estimatesbranch (write-tree/commit-tree/ force-push), on the first run after merge.estimatesbranch.🤖 Generated with Claude Code