nowcasting_dataset icon indicating copy to clipboard operation
nowcasting_dataset copied to clipboard

Each DataSource should complain if it's asked for an example outside of its range of available datetimes.

Open JackKelly opened this issue 3 years ago • 0 comments

Detailed Description

Mostly to make debugging a bit easier :slightly_smiling_face:

Context

Related issues:

  • #439
  • #323

Although maybe this isn't strictly necessary because the "Example is the wrong shape!" logger messages already contain enough information to diagnose this issue.

Possible implementation

Checking this every time get_example is called might be too slow.

Instead, if we find that the example is the wrong shape, then maybe check if the time dim is 0 and, if it is, check if the requested t0_datetime is outside that DataSource's range of available t0 datetimes, and log a helpful error (along with the "example is wrong shape" error)?

JackKelly avatar Nov 18 '21 11:11 JackKelly