[2502][evaluation] score bug fixes#2503
Open
moritzhauschulz wants to merge 2 commits into
Open
Conversation
3 tasks
Use the robust ens-detection variant in _plot_score_maps_per_stream so the block is identical (apart from the branch-specific tag string) to mh/full-pipeline-diffusion-adjusted-scores, minimising future merge conflicts: - restore ens labels via assign_coords(ens=preds.ens.values) (positional) instead of plot_metrics["ens"] = preds.ens (index-aligned) - gate has-ens detection on the ens *dimension* (all_ens) rather than the coordinate - compute per-metric ens iteration via metric_has_ens / ens_values Behaviour is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Collaborator
|
@jpolz : could you have a look? |
4 tasks
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
Enables the previously dead probabilistic metrics (spread, ssr, crps, rank_histogram) in the evaluation package, corrects the spread-skill ratio to the standard ensemble-mean definition, and makes the spatial score-map path robust for metrics that collapse the ensemble dimension. This unblocks GenCast-style spread-skill diagnostics over lead time and ensemble-spread maps.
I am not very familiar with the eval pipeline, so it would be good if this could be reviewed by someone more knowledgeable
scores/score.pyassert self.ens_dim … / return None(undefined
self.ens_dim, unconditional return) with a real check: warn and skip when theensemble dim
self._ens_dimis absent from the predictions (e.g. deterministic runs), otherwisedispatch to the metric function. This activates
spread,ssr,crps, andrank_histogram.calc_ssrnow divides the ensemble spread by the RMSE ofthe ensemble mean (the "skill", GenCast / WeatherBench2 convention) —
calc_spread(p) / calc_rmse(p.mean("ens"), gt)— instead of the full-ensemble per-member RMSE.SSR is now a single value per variable/level/lead-time with the standard calibration
interpretation (under-/over-dispersion), consistent with the already ensemble-reduced spread
numerator.
plotting/plot_orchestration.py(_plot_score_maps_per_stream)CoordinateValidationErrorcrash. Guard the ensemble-label assignment on"ens" in plot_metrics.dims(the concatenated result) rather thanpreds.dims. When everyselected metric reduces the ensemble dim (e.g.
metrics: ["ssr"]),plot_metricshas noensdim and the previous unconditional
plot_metrics["ens"] = preds.ensraised.ensdim in theirown result (
ens_metrics). Iterate ensemble members only for those; ensemble-reduced metrics(
spread,crps,ssr) get a single map instead of one identical map per member.xr.concatbroadcasts a reduced metric acrossens,select a single member (
isel(ens=0, drop=True)) so the plotted field is 2-D.Issue Number
Closes #2502
Checklist before asking for review
./scripts/actions.sh lint./scripts/actions.sh unit-test./scripts/actions.sh integration-testlaunch-slurm.py --time 60