Repository navigation
Fix the last-release benchmark workflow failing on StringAccessor.time_center('O') - #11871
Open
glaziermag wants to merge 1 commit into
Open
glaziermag wants to merge 1 commit into
glaziermag wants to merge 1 commit into
Conversation
The last-release benchmark workflow has failed on every push to main since pydata#11746 added `StringAccessor`: its baseline v2026.09.0 predates pydata#11722, so `str.center` raises AttributeError for object arrays there. Raise NotImplementedError from a setup attached to `time_center` instead, as for the missing rolling methods in pydata#11699, so asv skips that case on the baseline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
headtr1ck
approved these changes
Nov 15, 2026
Contributor
🧘 No significant changes. Perfectly balanced, as all things should be.Comparing |
This branch has not been deployed
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.
Description
The "Benchmark compare last release" workflow has failed on every push to
mainsince #11746 was merged on 10-22 (latest run, first failing run). In the runs I checked, the only failure isaccessors.StringAccessor.time_centerwith the'O'parameter, and only on the baseline. v2026.09.0 predates #11722, so itsstr.centerraisesAttributeError: type object 'numpy.object_' has no attribute 'center'for object arrays. Onmainthe benchmark runs.This attaches a setup to
time_centerthat raisesNotImplementedErrorwhenstr.centerfails for the dtype, as #11699 did for the missing rolling methods. asv then skips the'O'case on v2026.09.0 and still measures it onmain. The next release would also clear this, but until then every run fails, so a real slowdown would not stand out.To reproduce, run this from
asv_benchin an environment with xarray 2026.9.0, asv and the benchmark dependencies:Without this change it reports
time_center 1/3 failedwith the traceback above. With it, it reportsok, withn/aforOandasv: skipped: NotImplementedError("str.center doesn't support 'O'").Checked locally
asv 0.6.6, Python 3.12, numpy 2.3.5:
'O'fails without this change and is skipped with it. The workflow'sgrep "Traceback \|failed\|PERFORMANCE DECREASED"check matches without the change and finds nothing with it.main(9577645): all three dtypes run with and without the change.In the six failing runs I checked between 10-22 and 11-09, this benchmark was the only line that check matched. ruff 0.17.3 passes on the changed file.
AI Disclosure
Tools: Claude Code (Claude Opus 5.5). It found the failing workflow runs, wrote the change and this description, and ran the checks above.
[This is Claude Code on behalf of glaziermag]
🤖 Generated with Claude Code