From 962d94aa758f28897017006c484235bbc05394dc Mon Sep 17 00:00:00 2001 From: James Fulton <41546094+dfulu@users.noreply.github.com> Date: Wed, 17 Apr 2024 10:20:29 +0100 Subject: [PATCH 1/2] Loosen requirements --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index f394115..4101254 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -ocf_datapipes==3.2.* -pvnet==3.0.* +ocf_datapipes>=3.2 +pvnet>=3.0 numpy pandas matplotlib From 956a9832d8af389444f6b9d2d8153e65b7a13817 Mon Sep 17 00:00:00 2001 From: James Fulton Date: Wed, 17 Apr 2024 09:42:30 +0000 Subject: [PATCH 2/2] partial update to new pvnet --- pvnet_summation/models/base_model.py | 9 +++++---- pvnet_summation/models/model.py | 2 +- requirements.txt | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/pvnet_summation/models/base_model.py b/pvnet_summation/models/base_model.py index 6e7d541..50e23a1 100644 --- a/pvnet_summation/models/base_model.py +++ b/pvnet_summation/models/base_model.py @@ -65,22 +65,23 @@ def __init__( self.output_quantiles = output_quantiles # Number of timestemps for 30 minutely data - self.forecast_len_30 = self.forecast_minutes // 30 + self.forecast_len = self.forecast_minutes // 30 - self.weighted_losses = WeightedLosses(forecast_length=self.forecast_len_30) + self.weighted_losses = WeightedLosses(forecast_length=self.forecast_len) self._accumulated_metrics = MetricAccumulator() self._accumulated_y = PredAccumulator() self._accumulated_y_hat = PredAccumulator() self._accumulated_y_sum = PredAccumulator() self._accumulated_times = PredAccumulator() + self._horizon_maes = MetricAccumulator() self.use_quantile_regression = self.output_quantiles is not None if self.use_quantile_regression: - self.num_output_features = self.forecast_len_30 * len(self.output_quantiles) + self.num_output_features = self.forecast_len * len(self.output_quantiles) else: - self.num_output_features = self.forecast_len_30 + self.num_output_features = self.forecast_len if self.pvnet_model.use_quantile_regression: self.pvnet_output_shape = ( diff --git a/pvnet_summation/models/model.py b/pvnet_summation/models/model.py index fb0ad79..18ae98e 100644 --- a/pvnet_summation/models/model.py +++ b/pvnet_summation/models/model.py @@ -96,7 +96,7 @@ def forward(self, x): if self.use_quantile_regression: # Shape: batch_size, seq_length * num_quantiles - out = out.reshape(out.shape[0], self.forecast_len_30, len(self.output_quantiles)) + out = out.reshape(out.shape[0], self.forecast_len, len(self.output_quantiles)) if self.predict_difference_from_sum: gsp_sum = self.sum_of_gsps(x) diff --git a/requirements.txt b/requirements.txt index 4101254..c31f661 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -ocf_datapipes>=3.2 -pvnet>=3.0 +ocf_datapipes>=3.3.19 +pvnet>=3.0.25 numpy pandas matplotlib