Repository navigation
Migrate the brier, quantile, interval and error spread scores to the array API - #156
Merged
Merged
Conversation
…amespace keeps numpy scalars
frazane
force-pushed
the
array-api/p2-small-families
branch
from
November 7, 2026 14:44
3358dde to
7308d55
Compare
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.
Part of the array API phase 2 stack (#132). Moves the four smallest families to the inferred
xpnamespace, following the CRPS template. Values are unchanged.What changed
core/quantile.py.alphaorw_median) take the dtype and device of the array inputs, so float32 inputs stay float32 and torch float64 inputs keep full precision.Notes
A few shapes and dtypes now follow the gufunc. Error spread, the weighted interval score and
interval_scorewith a scalar alpha return shape(1,)for a single observation instead of().rps_score,rls_scoreandquantile_scorereturn floats for integer inputs, andlog_scorewith scalar inputs returns a numpy scalar like CRPS. Withbackend="numba"and jax or torch inputs, the weighted interval and error spread scores raise as CRPS does, while the scores without a gufunc use the input's framework. The weighted interval score parity test still skips the median term, pending #141.This change was developed in tandem with AI coding agents.