-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add visulization script #339
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@peterdudfield sorry for the slow response, I think this is useful for quick sanity checks on the batch data so thank you for making it! I guess we could extend it to solar later by adding in a parameter for what the target is and and if block, might also be good to add support for netcdf files/batches as well as .pt files since we some batches created in that format? |
- add limit examples - add dir - prints straight to report
for more information, see https://pre-commit.ci
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #339 +/- ##
==========================================
+ Coverage 75.24% 78.36% +3.12%
==========================================
Files 128 126 -2
Lines 6208 5962 -246
==========================================
+ Hits 4671 4672 +1
+ Misses 1537 1290 -247 ☔ View full report in Codecov by Sentry. |
could it be good to add it to the batch init so you can import it with |
sounds a good idea. Can you add that? |
also sorry to be like this but i think both file and function should be called either with visualiSe or with visualiZe |
yea, could you change it to with s? |
@peterdudfield I'm happy to do both but beforeI do: there is actually a folder for visualisation in dpipes that appears to be empty: https://github.com/openclimatefix/ocf_datapipes/tree/main/ocf_datapipes/visualization Do we scrap that or do we move this script there? (I would probably be for moving the script there, batch folder feels like more of a place for handling during batch creation, not for inference) |
yea perhaps move this function to that folder |
I've updated some stuff but can someone with access to tensor batches run that before w merge please (this does not work with .nc batches) ? want to be sure I didn't break anything :) |
How come it doesn't work with .nc batches? Do they have to be then converted to a tensor and then it might work? |
It expects the data to have BatchKeys which .nc files don't have, they get transformed into a batch after opening; I'll look into adding a function that does that here so it can handle .nc too :) |
Yea, we should think what will likely to do in of-data-sample, perhaps we wont save .nv files anymore, im not sure what the current thinking is |
Pull Request
Description
Add a script to add visualization
It loads a batch and makes a markdown report
This does not include
Could do a lot of refactoring, into smaller functions, so code is not repeated
#231
How Has This Been Tested?
Tested it locally
Checklist:
report
Batch visualization
We are looking at example 3
Wind
GSP
(and other examples)
gsp
shape value.shape=torch.Size([8, 21, 1])
Max 0.58
Min 0.00
gsp_id
shape value.shape=torch.Size([8, 1])
Max 284.00
Min 2.00
gsp_time_utc
shape value.shape=torch.Size([8, 21])
Max 1673744400.00
Min 1657915200.00
gsp_x_osgb
shape value.shape=torch.Size([8, 1])
Max 609538.81
Min 172042.17
gsp_y_osgb
shape value.shape=torch.Size([8, 1])
Max 732058.75
Min 180926.89
gsp_t0_idx
4
gsp_effective_capacity_mwp
shape value.shape=torch.Size([8, 1])
Max 330.09
Min 1.13
gsp_nominal_capacity_mwp
shape value.shape=torch.Size([8, 1])
Max 351.39
Min 1.19
gsp_solar_azimuth
shape value.shape=torch.Size([8, 21])
Max 4.36
Min -4.23
gsp_solar_elevation
shape value.shape=torch.Size([8, 21])
Max 1.21
Min -7.31
NWP
Provider ukv
(plus other examples)
nwp
Shape value.shape=torch.Size([8, 11, 10, 24, 24])
Max 21.84
Min -4.25
nwp_target_time_utc
Shape=(11,)
Max 2022-08-02 08:00:00
Min 2022-08-01 22:00:00
nwp_channel_names
nwp_step
Shape value.shape=torch.Size([8, 11])
Max 14.00
Min 1.00
nwp_t0_idx
2
nwp_init_time_utc
Shape=(11,)
Max 2022-08-01 21:00:00
Min 2022-08-01 21:00:00
Provider ecmwf
(plus other examples)
nwp
Shape value.shape=torch.Size([8, 11, 8, 12, 12])
Max 13.22
Min -2.61
nwp_target_time_utc
Shape=(11,)
Max 2022-08-02 08:00:00
Min 2022-08-01 22:00:00
nwp_channel_names
nwp_step
Shape value.shape=torch.Size([8, 11])
Max 25.00
Min 7.00
nwp_t0_idx
2
nwp_init_time_utc
Shape=(11,)
Max 2022-08-01 12:00:00
Min 2022-08-01 12:00:00