PVNet 5.0.21__tar.gz → 5.0.23__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. {pvnet-5.0.21 → pvnet-5.0.23}/PKG-INFO +1 -1
  2. {pvnet-5.0.21 → pvnet-5.0.23}/PVNet.egg-info/PKG-INFO +1 -1
  3. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/training/lightning_module.py +6 -5
  4. {pvnet-5.0.21 → pvnet-5.0.23}/LICENSE +0 -0
  5. {pvnet-5.0.21 → pvnet-5.0.23}/PVNet.egg-info/SOURCES.txt +0 -0
  6. {pvnet-5.0.21 → pvnet-5.0.23}/PVNet.egg-info/dependency_links.txt +0 -0
  7. {pvnet-5.0.21 → pvnet-5.0.23}/PVNet.egg-info/requires.txt +0 -0
  8. {pvnet-5.0.21 → pvnet-5.0.23}/PVNet.egg-info/top_level.txt +0 -0
  9. {pvnet-5.0.21 → pvnet-5.0.23}/README.md +0 -0
  10. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/__init__.py +0 -0
  11. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/data/__init__.py +0 -0
  12. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/data/base_datamodule.py +0 -0
  13. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/data/site_datamodule.py +0 -0
  14. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/data/uk_regional_datamodule.py +0 -0
  15. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/load_model.py +0 -0
  16. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/models/__init__.py +0 -0
  17. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/models/base_model.py +0 -0
  18. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/models/ensemble.py +0 -0
  19. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/models/late_fusion/__init__.py +0 -0
  20. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/models/late_fusion/basic_blocks.py +0 -0
  21. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/models/late_fusion/encoders/__init__.py +0 -0
  22. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/models/late_fusion/encoders/basic_blocks.py +0 -0
  23. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/models/late_fusion/encoders/encoders3d.py +0 -0
  24. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/models/late_fusion/late_fusion.py +0 -0
  25. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/models/late_fusion/linear_networks/__init__.py +0 -0
  26. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/models/late_fusion/linear_networks/basic_blocks.py +0 -0
  27. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/models/late_fusion/linear_networks/networks.py +0 -0
  28. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/models/late_fusion/site_encoders/__init__.py +0 -0
  29. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/models/late_fusion/site_encoders/basic_blocks.py +0 -0
  30. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/models/late_fusion/site_encoders/encoders.py +0 -0
  31. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/optimizers.py +0 -0
  32. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/training/__init__.py +0 -0
  33. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/training/plots.py +0 -0
  34. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/training/train.py +0 -0
  35. {pvnet-5.0.21 → pvnet-5.0.23}/pvnet/utils.py +0 -0
  36. {pvnet-5.0.21 → pvnet-5.0.23}/pyproject.toml +0 -0
  37. {pvnet-5.0.21 → pvnet-5.0.23}/setup.cfg +0 -0
  38. {pvnet-5.0.21 → pvnet-5.0.23}/tests/test_end2end.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PVNet
3
- Version: 5.0.21
3
+ Version: 5.0.23
4
4
  Summary: PVNet
5
5
  Author-email: Peter Dudfield <info@openclimatefix.org>
6
6
  Requires-Python: >=3.11
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PVNet
3
- Version: 5.0.21
3
+ Version: 5.0.23
4
4
  Summary: PVNet
5
5
  Author-email: Peter Dudfield <info@openclimatefix.org>
6
6
  Requires-Python: >=3.11
@@ -38,6 +38,7 @@ class PVNetLightningModule(pl.LightningModule):
38
38
 
39
39
  self.model = model
40
40
  self._optimizer = optimizer
41
+ self.save_all_validation_results = save_all_validation_results
41
42
 
42
43
  # Model must have lr to allow tuning
43
44
  # This setting is only used when lr is tuned with callback
@@ -151,13 +152,13 @@ class PVNetLightningModule(pl.LightningModule):
151
152
  def _store_val_predictions(self, batch: TensorBatch, y_hat: torch.Tensor) -> None:
152
153
  """Internally store the validation predictions"""
153
154
 
154
- taregt_key = self.model._target_key
155
+ target_key = self.model._target_key
155
156
 
156
- y = batch[taregt_key][:, -self.model.forecast_len :].cpu().numpy()
157
+ y = batch[target_key][:, -self.model.forecast_len :].cpu().numpy()
157
158
  y_hat = y_hat.cpu().numpy()
158
- ids = batch[f"{taregt_key}_id"].cpu().numpy()
159
+ ids = batch[f"{target_key}_id"].cpu().numpy()
159
160
  init_times_utc = pd.to_datetime(
160
- batch[f"{taregt_key}_time_utc"][:, self.model.history_len+1]
161
+ batch[f"{target_key}_time_utc"][:, self.model.history_len+1]
161
162
  .cpu().numpy().astype("datetime64[ns]")
162
163
  )
163
164
 
@@ -312,7 +313,7 @@ class PVNetLightningModule(pl.LightningModule):
312
313
  self.log_dict(extreme_error_metrics, on_step=False, on_epoch=True)
313
314
 
314
315
  # Optionally save all validation results - these are overridden each epoch
315
- if self.hparams.save_all_validation_results:
316
+ if self.save_all_validation_results:
316
317
  # Add attributes
317
318
  ds_val_results.attrs["epoch"] = self.current_epoch
318
319
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes