Scope 'performance' labeler to benchmarked modules#3357
Conversation
The labeler matched xrspatial/**/*.py, so nearly every code PR got the 'performance' label. That label triggers the ASV benchmark job in benchmarks.yml, so the benchmarks ran on almost every PR. Limit the label to the eight modules the PR-time benchmark filter actually measures (Slope, Proximity, Zonal, CostDistance, Focal, Rescale/Standardize, Diffusion, Dasymetric).
brendancol
left a comment
There was a problem hiding this comment.
PR Review: Scope 'performance' labeler to benchmarked modules
Config-only change, so the numerical/backend/NaN/dask/cupy sections of the review don't apply. I checked the parts that do: the glob list, the YAML structure, and whether the scoping lines up with what the benchmark job measures.
Blockers
None.
Suggestions
- The eight modules match the asv
continuousfilter one-to-one, but the benchmarks also run through shared helpers that aren't in the glob.Focalpulls inconvolution.py,Slopepulls ingeodesic.py, and most of them touchutils.py. A PR that changes only one of those shifts the benchmark numbers but won't get auto-labeled, so a regression could land without the PR-time benchmark running. Two ways to handle it: add the main shared helpers (convolution.py,geodesic.py) to the glob, or leave the comment as-is and rely on maintainers applying the label by hand for helper-only changes. I'd lean toward the comment route since pulling inutils.pywould re-broaden the rule back toward the original problem, but it's worth a deliberate call rather than leaving the gap silent.
Nits
None.
What looks good
- Keeping the label instead of deleting it preserves the on-demand benchmark trigger, which is the better of the two options the issue raised.
- The comment ties the glob to the asv filter in
benchmarks.yml, so the next person editing benchmarks knows to keep the two in sync. - YAML parses and the structure matches the
actions/labeler@v5schema; all eight paths exist in the tree.
Checklist
- YAML valid and matches actions/labeler@v5 schema
- Globbed paths all exist
- Scoping matches the benchmark filter
- Shared-helper coverage gap (see Suggestions) — intentional tradeoff, flagged for a deliberate decision
- n/a Algorithm / backends / NaN / dask / docstrings / README — no code or API change
…trib#3356) Address review: the Focal and Slope benchmarks run through these shared kernels, so a regression in them should trigger the benchmark job. utils.py stays out to avoid re-broadening the label.
brendancol
left a comment
There was a problem hiding this comment.
Follow-up review
Re-reviewed after the follow-up commit (5c3dd7e).
The shared-helper coverage gap from the first pass is addressed: convolution.py (drives the Focal benchmarks) and geodesic.py (drives the Slope benchmarks) are now in the glob, so a regression in those kernels triggers the benchmark job. utils.py was deliberately left out and the reasoning is now in the file comment, which is the right call — it's touched by almost every PR and would undo the scoping.
No new findings. YAML still parses, the structure matches the actions/labeler@v5 schema, and all ten paths exist in the tree. No remaining blockers, suggestions, or nits.
|
Root-cause note while verifying on this PR: the labeler tagged this PR The labeler workflow has no checkout step, so The new config uses only explicit positive globs and no negation, so a PR is labeled only when it changes one of the listed modules. I removed the stray |
Closes #3356
.github/labeler.ymlmatchedxrspatial/*.pyandxrspatial/**/*.py, so nearly every code PR picked up theperformancelabel. That label is a trigger:benchmarks.ymlruns the ASV suite whenever a PR carries it, so the benchmark job ran on almost every PR.performancerule to the eight modules the PR-time benchmark filter actually measures:slope.py,proximity.py,zonal.py,cost_distance.py,focal.py,normalize.py(Rescale/Standardize),diffusion.py,dasymetric.py.continuousfilter inbenchmarks.ymlso the list stays in sync as benchmarks are added.Keeping the label (rather than removing it) preserves the on-demand benchmark trigger for the PRs that can move the numbers.
Not a code change, so no backend work (numpy / cupy / dask) applies.
Test plan:
yaml.safe_loadparses the file and the structure matches theactions/labeler@v5schema