File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 2
2
import glob
3
3
4
4
from ocf_datapipes .batch import BatchKey , batch_to_tensor , stack_np_examples_into_batch
5
- from ocf_datapipes .training .pvnet_site import pvnet_site_netcdf_datapipe
5
+ from ocf_datapipes .training .pvnet_site import (
6
+ pvnet_site_datapipe ,
7
+ pvnet_site_netcdf_datapipe ,
8
+ split_dataset_dict_dp ,
9
+ uncombine_from_single_dataset ,
10
+ )
6
11
7
12
from pvnet .data .base import BaseDataModule
8
13
@@ -11,9 +16,13 @@ class PVSiteDataModule(BaseDataModule):
11
16
"""Datamodule for training pvnet site and using pvnet site pipeline in `ocf_datapipes`."""
12
17
13
18
def _get_datapipe (self , start_time , end_time ):
14
- data_pipeline = pvnet_site_netcdf_datapipe (
15
- keys = ["pv" , "nwp" ],
19
+ data_pipeline = pvnet_site_datapipe (
20
+ self .configuration ,
21
+ start_time = start_time ,
22
+ end_time = end_time ,
16
23
)
24
+ data_pipeline = data_pipeline .map (uncombine_from_single_dataset ).map (split_dataset_dict_dp )
25
+ data_pipeline = data_pipeline .pvnet_site_convert_to_numpy_batch ()
17
26
18
27
data_pipeline = (
19
28
data_pipeline .batch (self .batch_size )
You can’t perform that action at this time.
0 commit comments