Pin asv version = "1" on every benchmark class#366
Merged
Conversation
asv hashes each benchmark method's source into a per-result `version` field and only plots data points whose `version` matches the discovered current version. The change in #360 (removing a no-op kwarg from every `time_execution` / `peakmem_execution` / `track_compilation_time` body) shifted the auto-hash and collapsed every affected series' history on the dashboard. Setting a stable `version` on the class overrides the auto-hash, so future cosmetic edits to the same measurement don't break continuity again. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Benchmark comparison (main → HEAD)Comparing
|
A new helper `_pad_sparse_graphs` walks `.asv/html/graphs/summary/` and every per-environment leaf, and for each benchmark JSON that misses revisions covered by sibling benchmarks, appends `[rev, null]` markers. flot's auto-fit then expands the chart x-axis to the project-wide commit range while still drawing the line only where data exists — so a recently-added benchmark like `AcaBaselineDebugLog.*` shows two real points at the right edge instead of a line that visually spans the full chart. Called from `publish()` between `asv publish` and the site copy, so every benchmark-main run keeps the charts honest. Co-Authored-By: Claude Opus 4.7 <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
MahlerYum,PrecautionarySavingsSolve/Simulate/SimulateWithSolve/SimulateWithSolveIrreg,AcaBaseline, plus theGpuPeakMembase class) now declaresversion = "1".AcaBaselineDebugLog, every*GpuPeakMemvariant) inherit the pinned version via MRO.Why
asv computes a
versionper benchmark by hashing the method's source code and only plots data points whoseversionmatches the discovered current value. PR #360 removedcheck_initial_conditions=False(a no-op oncelog_leveldrives validation) from everytime_execution/peakmem_execution/track_compilation_timebody. That changed the hash of every affected method and collapsed each series on the dashboard at https://open-econ.org/pylcm-benchmarks/ to two data points.A stable explicit
versionoverrides the auto-hash so cosmetic edits to the same measurement keep the series intact going forward. Restoring the existing pre-#360 history is a separate one-time JSON rewrite inOpenSourceEconomics.github.io.Test plan
pixi run -e benchmarks-cuda12 python -m asv check --config asv.conf.json --environment existing:python→ "No problems found."versionattribute resolves to"1"(verified via direct attribute access on the 11 classes / subclasses).benchmark-mainrun regenerates the dashboard againstversion = "1".🤖 Generated with Claude Code