Skip to content

Fix benchmark workflow - #1349

Merged
jeromekelleher merged 4 commits into
sgkit-dev:mainfrom
Billyzhang1229:ci-actions-node24
Sep 4, 2026
Merged

jeromekelleher merged 4 commits into
sgkit-dev:mainfrom
Billyzhang1229:ci-actions-node24

Conversation

@Billyzhang1229

Copy link
Copy Markdown
Contributor

The benchmarks workflow has been red. Two independent problems:

  1. benchmarks/asv.conf.json leaves build_command commented out, so asv uses
    its default, which runs pip wheel without --no-deps and drops a wheel for
    every dependency into the build cache. asv 0.6.6 turned more than one wheel
    there into a hard error:

    ·· Last error: Found multiple wheels in .../asv-build-cache/... Cannot decide correct one
    

    First commit sets build_command explicitly, which also stops the job
    depending on asv's defaults. A later commit pins asv, since its version is
    not recorded in the results.

  2. count_call_alleles and count_cohort_alleles return lazy dask arrays and
    the benchmarks never computed them, so they were timing the construction of
    the task graph rather than the counting — which is why they have reported an
    almost unchanging 0.12s for years. Both now compute the result, with a numba
    warmup in setup so jit compilation is not measured.

The second change moves them from ~0.12s to ~1.1s and resets their history, as
the old values were measuring something else.

Verified by a full successful run of the workflow on a fork.

asv's default build command runs `pip wheel` without `--no-deps`, which
drops a wheel for every dependency into the build cache directory. asv
then aborts with "Found multiple wheels in ... Cannot decide correct one",
so build the project wheel on its own.
xarray will change `Dataset.dims` to return a set of dimension names, so
indexing it by name only works today via a FutureWarning.
asv changes its default build command between releases, which is how the
benchmark job broke without anything changing in this repo. Its version is
also absent from the recorded results, so an upstream change to the timing
machinery would silently shift the baseline rather than fail.
The counting functions return lazy dask arrays, so compute the result to
measure the counting itself rather than the building of the task graph.
Graph construction accounted for the 0.12s these have reported since 2021,
while the counting it stood in for takes roughly three times as long.

Warm up the numba kernels on a tiny dataset in setup, so that jit
compilation is not measured by the first timed run.
@Billyzhang1229 Billyzhang1229 changed the title Fix benchmarks workflow Fix benchmark workflow Sep 4, 2026
@mergify

mergify Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@Billyzhang1229

Copy link
Copy Markdown
Contributor Author
image Just hate seeing a red cross here XD

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (ee93132) to head (d098e6d).
⚠️ Report is 5 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1349   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           46        46           
  Lines         2994      2994           
=========================================
  Hits          2994      2994           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jeromekelleher
jeromekelleher merged commit 9549f74 into sgkit-dev:main Sep 4, 2026
16 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.

3 participants