Skip to content

fix: reset uv.lock before the base benchmark run#111

Merged
FBumann merged 2 commits into
mainfrom
fix/bench-base-lock
Jul 23, 2026
Merged

fix: reset uv.lock before the base benchmark run#111
FBumann merged 2 commits into
mainfrom
fix/bench-base-lock

Conversation

@FBumann

@FBumann FBumann commented Jul 23, 2026

Copy link
Copy Markdown
Owner

The head benchmark run leaves an untracked uv.lock behind, and uv keeps a satisfying lockfile as-is — so a head that changes dependencies leaked its resolution into the base run and both sides benchmarked the head's dependencies (discovered on #110, where the v4-vs-v3 comparison silently became v4-vs-v4). Remove the lock before the base run so base re-resolves from its own pyproject.toml, and log each side's resolved tsam version so this is visible in the job log.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Improved benchmark reporting by displaying the package version used for both head and base runs.
    • Ensured base benchmark runs use clean dependency resolution for more reliable comparisons.

The head run leaves an untracked uv.lock behind, and uv keeps a
satisfying lockfile as-is — so a head that changes dependencies leaked
its resolution into the base run (both sides benchmarked the head's
deps). Remove it before the base run and log each side's resolved tsam
version for transparency.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@FBumann, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 48 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8bc851d3-e9e3-4e05-ae93-52ba339ccb79

📥 Commits

Reviewing files that changed from the base of the PR and between b0f88a8 and 50fa348.

📒 Files selected for processing (1)
  • .github/workflows/benchmarks.yaml
📝 Walkthrough

Walkthrough

The benchmark workflow now prints the tsam version for head and base runs. Before benchmarking the base revision, it removes uv.lock after overlaying the head benchmark suite.

Changes

Benchmark workflow

Layer / File(s) Summary
Head benchmark reporting
.github/workflows/benchmarks.yaml
The head benchmark writes its JSON output and prints the installed tsam version.
Base benchmark isolation and reporting
.github/workflows/benchmarks.yaml
The base run removes uv.lock, executes the overlaid benchmarks, writes base JSON output, and prints the installed tsam version.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main change: deleting uv.lock before the base benchmark run to avoid dependency leakage.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/bench-base-lock

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

Benchmarks

Δ% vs base, one table sorted by biggest change first
(min walltime and memray peak). Peak memory is
deterministic — any delta there is real; walltime on GitHub
runners is noisy, so only large time deltas are meaningful.
The interactive plot is attached as the benchmark-plot artifact.

Full table

benchmarks/test_bench_aggregate.py

name metric base head
test_user_apply time 0.359s +2.0%
peak 104 MiB 0.0%
test_e2e_multidim time 0.1753s +1.8%
peak 26.7 MiB 0.0%
test_wrapper_concat_results time 0.01639s +1.4%
peak 8.72 MiB 0.0%
test_config_representation[mean] time 0.03881s +1.1%
peak 1.78 MiB 0.0%
test_config_representation[dist_cluster] time 0.0399s +1.1%
peak 1.78 MiB 0.0%
test_config_extremes[replace] time 0.04143s +0.8%
peak 1.9 MiB 0.0%
test_wrapper_to_dataframe time 0.0007112s +0.4%
peak 8.55 MiB 0.0%
test_user_disaggregate time 0.01194s +0.4%
peak 26.7 MiB 0.0%
test_config_representation[medoid] time 0.04085s 0.0%
peak 1.9 MiB 0.0%
test_config_extremes[append] time 0.04195s -0.1%
peak 1.9 MiB 0.0%
test_e2e_wide[medoid] time 0.454s -0.1%
peak 113 MiB 0.0%
test_config_representation[dist_global_minmax] time 0.1044s -0.4%
peak 1.78 MiB 0.0%
test_config_representation[dist_global] time 0.1022s -0.4%
peak 1.78 MiB 0.0%
test_e2e_default time 0.05481s -0.5%
peak 7.11 MiB 0.0%
test_e2e_slices time 0.9937s -0.6%
peak 14.3 MiB 0.0%
test_e2e_full time 0.1219s -1.3%
peak 6.6 MiB 0.0%
test_e2e_wide[dist_global] time 1.533s -1.3%
peak 104 MiB 0.0%
test_wrapper_result_conversion time 0.03246s -3.7%
peak 60.3 MiB 0.0%

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/benchmarks.yaml:
- Line 61: Update the base benchmark’s uv invocation before the benchmarks
pytest command to perform an exact environment sync by adding the supported
exact-sync option to uv run. Keep the existing BENCHMEM, benchmark path, and
BENCH_ARGS behavior unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1794ea81-3a7c-478e-8a31-aa0b34ebd072

📥 Commits

Reviewing files that changed from the base of the PR and between 3fccdfc and b0f88a8.

📒 Files selected for processing (1)
  • .github/workflows/benchmarks.yaml

Comment thread .github/workflows/benchmarks.yaml Outdated
uv run syncs inexactly by default and leaves extraneous packages from
the head resolution installed; --exact removes them so the base runs on
exactly its own dependency set.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@FBumann
FBumann merged commit 3d7d8b7 into main Jul 23, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant