Skip to content

Add script to fetch live data from Data Platform for the scorecard - #547

Open
PavanRaghavendraKulkarni wants to merge 2 commits into
mainfrom
scorecard-live-data-platform-test
Open

PavanRaghavendraKulkarni wants to merge 2 commits into
mainfrom
scorecard-live-data-platform-test

Conversation

@PavanRaghavendraKulkarni

@PavanRaghavendraKulkarni PavanRaghavendraKulkarni commented Sep 20, 2026 •

Copy link
Copy Markdown

Summary

  • Adds scripts/scorecard/live/fetch_from_data_platform.py, which pulls observed generation and forecaster output for a given location/time window straight from the Data Platform gRPC API and writes them out as Zarr stores in the two formats generate_scorecard.py already expects:
  • This lets the scorecard be run directly against live/dev data with no manual reformatting step.

Test plan

Ran end-to-end against the dev Data Platform (via SSH tunnel to localhost:50051) for the uk national SOLAR location:

  • Fetched observed generation (pvlive_in_day) and forecasts for pvnet_v2 and blend, full day 2026-09-19 (49 timesteps, 16/73 horizons respectively)
  • Generation Zarr validated by loading it through ocf-data-sampler's actual open_generation() — correct dims/dtypes/coords
  • Ran python scripts/scorecard/generate_scorecard.py against the fetched data — full report generated, no errors

Resulting metrics:

model NMAE
blend 1.309%
pvnet_v2 1.332%

Quantile calibration (fraction of observations below each quantile):

quantile blend pvnet_v2
0.02 0.02 0.02
0.10 0.23 0.25
0.25 0.56 0.58
0.50 0.84 0.87
0.75 0.95 0.96
0.90 0.99 0.99
0.98 1.00 1.00

Report screenshots:

t0 availability
t0 availability

NMAE by forecast horizon
NMAE by forecast horizon

NMAE by month
NMAE by month

Quantile calibration
Quantile calibration

Note: these screenshots are committed to this branch only, for PR review — they go against the repo's .gitignore rule for *.png and should be removed before merge.

…for scorecard

Fetches observed generation and forecaster output for a location/time window from
the Data Platform gRPC API and writes them out as Zarr stores matching the
ocf-data-sampler generation schema and the PVNet scorecard hindcast schema, so
generate_scorecard.py can run directly against live data.
@PavanRaghavendraKulkarni
PavanRaghavendraKulkarni force-pushed the scorecard-live-data-platform-test branch from 90f2782 to 6b1b78c Compare September 20, 2026 04:53
These are demo output from running generate_scorecard.py against live data-platform
data (uk national, 2026-09-19) for PR reference only. Not meant to stay long-term --
they go against the repo's .gitignore rule for *.png, remove before merge.
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.

1 participant