Conversation
|
@yuvraajnarula just a heads up that your PR isn't passing linting. Also just a warning that I don't think your PR will pass the pytests since you've changed the structure of the dict. So there's probably quite a lot of changes that will be required. Also the main point of the issue was to remove the calls to |
|
@dfulu This implementation addresses the immediate test failure regarding datetime encodings. Please let me know if it aligns with the core principles for this issue. |
|
Hey @devsjc |
|
Hey @devsjc |
dfulu
left a comment
There was a problem hiding this comment.
@yuvraajnarula thanks for getting the linting passing. I'm sorry to say that there are still quite a few changes required and ones which our testing suite doesn't catch.
We keep compatibility between ocf-data-sampler and PVNet, and particularly with models we've already trained. You changes modify the structure of and values in the NumpySample dict. For example you change the nesting structure of the dictionary, and also the representation of the times. NumpySample should not change in this PR. Neither should batch_to_tensor().
Also the changes you make to the Location class are dangerous since the new properties x/y sometimes return the lon/lats and sometimes the ocsgb coords. Similarly the longitude/latitude properties sometimes return the osgb coords.
Also, the point of this issue was essentially to remove the need for the numpy_sample/[generation.py, nwp.py, satellite.py] files and compile those in a single place
|
Hey @dfulu, sorry for the noise and back-and-forth on this PR. I understand the compatibility constraints are strict here. I’ve now updated the implementation to fully preserve the existing Even went through all the testing that was required with linting. I hope these current implementations match your core principles. |
Pull Request
Description
This PR introduces a unified xarray -> NumpySample conversion function to replace the existing modality-specific numpy conversion functions in numpy_sample.
What this pr does
What this PR intentionally does not do
Design question for reviewers
@dfulu
The main motivation for this PR is to move away from:
and towards:
Before continuing with:
I’d really appreciate feedback on whether this unified conversion approach feels sustainable and directionally correct for the project.
Fixes #368
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration
If your changes affect data processing, have you plotted any changes? i.e. have you done a quick sanity check?
Checklist: