diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 19cd1fc3..33417b49 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,7 +1,7 @@ [bumpversion] commit = True tag = True -current_version = 3.0.57 +current_version = 3.0.58 message = Bump version: {current_version} → {new_version} [skip ci] [bumpversion:file:pvnet/__init__.py] diff --git a/pvnet/__init__.py b/pvnet/__init__.py index 34aca23b..798ba127 100644 --- a/pvnet/__init__.py +++ b/pvnet/__init__.py @@ -1,2 +1,2 @@ """PVNet""" -__version__ = "3.0.57" +__version__ = "3.0.58" diff --git a/scripts/backtest_uk_gsp.py b/scripts/backtest_uk_gsp.py index f492453f..e002af3f 100644 --- a/scripts/backtest_uk_gsp.py +++ b/scripts/backtest_uk_gsp.py @@ -54,7 +54,6 @@ from tqdm import tqdm from pvnet.load_model import get_model_from_checkpoints -from pvnet.utils import GSPLocationLookup # ------------------------------------------------------------------ # USER CONFIGURED VARIABLES @@ -140,7 +139,7 @@ def get_available_t0_times(start_datetime, end_datetime, config_path): # Pop out the config file config = datapipes_dict.pop("config") - # We are going to abuse the `create_datapipes()` function to find the init-times in + # We are going to abuse the `create_t0_datapipe()` function to find the init-times in # potential_init_times which we have input data for. To do this, we will feed in some fake GSP # data which has the potential_init_times as timestamps. This is a bit hacky but works for now @@ -168,7 +167,7 @@ def get_available_t0_times(start_datetime, end_datetime, config_path): # Overwrite the GSP data which is already in the datapipes dict datapipes_dict["gsp"] = IterableWrapper([ds_fake_gsp]) - # Use create_t0_and_loc_datapipes to get datapipe of init-times + # Use create_t0_datapipe to get datapipe of init-times t0_datapipe = create_t0_datapipe( datapipes_dict, configuration=config, @@ -196,10 +195,6 @@ def get_times_datapipe(config_path): Datapipe: A Datapipe yielding init-times """ - # Set up ID location query object - ds_gsp = get_gsp_ds(config_path) - GSPLocationLookup(ds_gsp.x_osgb, ds_gsp.y_osgb) - # Filter the init-times to times we have all input data for available_target_times = get_available_t0_times( start_datetime, diff --git a/scripts/save_concurrent_batches.py b/scripts/save_concurrent_batches.py index ed32dfba..37833b9e 100644 --- a/scripts/save_concurrent_batches.py +++ b/scripts/save_concurrent_batches.py @@ -32,7 +32,7 @@ import hydra import numpy as np import torch -from ocf_datapipes.batch import BatchKey +from ocf_datapipes.batch import BatchKey, batch_to_tensor from ocf_datapipes.training.pvnet_all_gsp import ( construct_sliced_data_pipeline, construct_time_pipeline, @@ -72,7 +72,7 @@ def _get_datapipe(config_path, start_time, end_time, n_batches): datapipe = construct_sliced_data_pipeline( config_path, t0_datapipe, - ) + ).map(batch_to_tensor) return datapipe