PVNet 5.3.12__tar.gz → 5.3.14__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 (36) hide show
  1. {pvnet-5.3.12 → pvnet-5.3.14}/PKG-INFO +2 -2
  2. {pvnet-5.3.12 → pvnet-5.3.14}/PVNet.egg-info/PKG-INFO +2 -2
  3. {pvnet-5.3.12 → pvnet-5.3.14}/PVNet.egg-info/requires.txt +1 -1
  4. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/datamodule.py +13 -11
  5. {pvnet-5.3.12 → pvnet-5.3.14}/pyproject.toml +1 -1
  6. {pvnet-5.3.12 → pvnet-5.3.14}/tests/test_datamodule.py +2 -2
  7. {pvnet-5.3.12 → pvnet-5.3.14}/tests/test_end2end.py +2 -0
  8. {pvnet-5.3.12 → pvnet-5.3.14}/LICENSE +0 -0
  9. {pvnet-5.3.12 → pvnet-5.3.14}/PVNet.egg-info/SOURCES.txt +0 -0
  10. {pvnet-5.3.12 → pvnet-5.3.14}/PVNet.egg-info/dependency_links.txt +0 -0
  11. {pvnet-5.3.12 → pvnet-5.3.14}/PVNet.egg-info/top_level.txt +0 -0
  12. {pvnet-5.3.12 → pvnet-5.3.14}/README.md +0 -0
  13. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/__init__.py +0 -0
  14. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/load_model.py +0 -0
  15. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/models/__init__.py +0 -0
  16. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/models/base_model.py +0 -0
  17. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/models/ensemble.py +0 -0
  18. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/models/late_fusion/__init__.py +0 -0
  19. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/models/late_fusion/basic_blocks.py +0 -0
  20. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/models/late_fusion/encoders/__init__.py +0 -0
  21. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/models/late_fusion/encoders/basic_blocks.py +0 -0
  22. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/models/late_fusion/encoders/encoders3d.py +0 -0
  23. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/models/late_fusion/late_fusion.py +0 -0
  24. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/models/late_fusion/linear_networks/__init__.py +0 -0
  25. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/models/late_fusion/linear_networks/basic_blocks.py +0 -0
  26. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/models/late_fusion/linear_networks/networks.py +0 -0
  27. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/models/late_fusion/site_encoders/__init__.py +0 -0
  28. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/models/late_fusion/site_encoders/basic_blocks.py +0 -0
  29. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/models/late_fusion/site_encoders/encoders.py +0 -0
  30. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/optimizers.py +0 -0
  31. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/training/__init__.py +0 -0
  32. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/training/lightning_module.py +0 -0
  33. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/training/plots.py +0 -0
  34. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/training/train.py +0 -0
  35. {pvnet-5.3.12 → pvnet-5.3.14}/pvnet/utils.py +0 -0
  36. {pvnet-5.3.12 → pvnet-5.3.14}/setup.cfg +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PVNet
3
- Version: 5.3.12
3
+ Version: 5.3.14
4
4
  Summary: PVNet
5
5
  Author-email: Peter Dudfield <info@openclimatefix.org>
6
6
  Requires-Python: <3.14,>=3.11
7
7
  Description-Content-Type: text/markdown
8
8
  License-File: LICENSE
9
- Requires-Dist: ocf-data-sampler>=1.0.9
9
+ Requires-Dist: ocf-data-sampler>=1.0.19
10
10
  Requires-Dist: numpy
11
11
  Requires-Dist: pandas
12
12
  Requires-Dist: matplotlib
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PVNet
3
- Version: 5.3.12
3
+ Version: 5.3.14
4
4
  Summary: PVNet
5
5
  Author-email: Peter Dudfield <info@openclimatefix.org>
6
6
  Requires-Python: <3.14,>=3.11
7
7
  Description-Content-Type: text/markdown
8
8
  License-File: LICENSE
9
- Requires-Dist: ocf-data-sampler>=1.0.9
9
+ Requires-Dist: ocf-data-sampler>=1.0.19
10
10
  Requires-Dist: numpy
11
11
  Requires-Dist: pandas
12
12
  Requires-Dist: matplotlib
@@ -1,4 +1,4 @@
1
- ocf-data-sampler>=1.0.9
1
+ ocf-data-sampler>=1.0.19
2
2
  numpy
3
3
  pandas
4
4
  matplotlib
@@ -22,13 +22,13 @@ class PVNetDataModule(LightningDataModule):
22
22
  def __init__(
23
23
  self,
24
24
  configuration: str,
25
- batch_size: int = 16,
25
+ train_periods: list[tuple[None | str, None | str]],
26
+ val_periods: list[tuple[None | str, None | str]],
27
+ batch_size: int,
26
28
  num_workers: int = 0,
27
29
  prefetch_factor: int | None = None,
28
30
  persistent_workers: bool = False,
29
31
  pin_memory: bool = False,
30
- train_period: list[str | None] = [None, None],
31
- val_period: list[str | None] = [None, None],
32
32
  seed: int | None = None,
33
33
  dataset_pickle_dir: str | None = None,
34
34
  ):
@@ -36,6 +36,10 @@ class PVNetDataModule(LightningDataModule):
36
36
 
37
37
  Args:
38
38
  configuration: Path to ocf-data-sampler configuration file.
39
+ train_periods: List of (start_time, end_time) tuples for the train dataset. If
40
+ start_time or end_time is None, it means that there is no lower/upper bound on the
41
+ time period.
42
+ val_periods: List of (start_time, end_time) tuples for the validation dataset.
39
43
  batch_size: Batch size.
40
44
  num_workers: Number of workers to use in multiprocess batch loading.
41
45
  prefetch_factor: Number of batches loaded in advance by each worker.
@@ -44,8 +48,6 @@ class PVNetDataModule(LightningDataModule):
44
48
  instances alive.
45
49
  pin_memory: If True, the data loader will copy Tensors into device/CUDA pinned memory
46
50
  before returning them.
47
- train_period: Date range filter for train dataloader.
48
- val_period: Date range filter for val dataloader.
49
51
  seed: Random seed used in shuffling datasets.
50
52
  dataset_pickle_dir: Directory in which the val and train set will be presaved as
51
53
  pickle objects. Setting this speeds up instantiation of multiple workers a lot.
@@ -53,8 +55,8 @@ class PVNetDataModule(LightningDataModule):
53
55
  super().__init__()
54
56
 
55
57
  self.configuration = configuration
56
- self.train_period = train_period
57
- self.val_period = val_period
58
+ self.train_periods = train_periods
59
+ self.val_periods = val_periods
58
60
  self.seed = seed
59
61
  self.dataset_pickle_dir = dataset_pickle_dir
60
62
 
@@ -79,10 +81,10 @@ class PVNetDataModule(LightningDataModule):
79
81
  # shuffled once
80
82
  if stage == "fit":
81
83
  # Prepare the train dataset
82
- self.train_dataset = self._get_dataset(*self.train_period)
84
+ self.train_dataset = self._get_dataset(self.train_periods)
83
85
 
84
86
  # Prepare and pre-shuffle the val dataset and set seed for reproducibility
85
- val_dataset = self._get_dataset(*self.val_period)
87
+ val_dataset = self._get_dataset(self.val_periods)
86
88
 
87
89
  shuffled_indices = np.random.default_rng(seed=self.seed).permutation(len(val_dataset))
88
90
  self.val_dataset = Subset(val_dataset, shuffled_indices)
@@ -114,8 +116,8 @@ class PVNetDataModule(LightningDataModule):
114
116
  if os.path.exists(filepath):
115
117
  os.remove(filepath)
116
118
 
117
- def _get_dataset(self, start_time: str | None, end_time: str | None) -> PVNetDataset:
118
- return PVNetDataset(self.configuration, start_time=start_time, end_time=end_time)
119
+ def _get_dataset(self, time_periods: list[tuple[str | None, str | None]]) -> PVNetDataset:
120
+ return PVNetDataset(self.configuration, time_periods=time_periods)
119
121
 
120
122
  def train_dataloader(self) -> DataLoader:
121
123
  """Construct train dataloader"""
@@ -12,7 +12,7 @@ readme = {file="README.md", content-type="text/markdown"}
12
12
  requires-python = ">=3.11,<3.14"
13
13
 
14
14
  dependencies = [
15
- "ocf-data-sampler>=1.0.9",
15
+ "ocf-data-sampler>=1.0.19",
16
16
  "numpy",
17
17
  "pandas",
18
18
  "matplotlib",
@@ -10,6 +10,6 @@ def test_data_module(data_config_path):
10
10
  batch_size=2,
11
11
  num_workers=0,
12
12
  prefetch_factor=None,
13
- train_period=[None, None],
14
- val_period=[None, None],
13
+ train_periods=[[None, None]],
14
+ val_periods=[[None, None]],
15
15
  )
@@ -10,6 +10,8 @@ def test_model_trainer_fit(session_tmp_path, data_config_path, late_fusion_model
10
10
 
11
11
  datamodule = PVNetDataModule(
12
12
  configuration=data_config_path,
13
+ train_periods=[[None, None]],
14
+ val_periods=[[None, None]],
13
15
  batch_size=2,
14
16
  num_workers=2,
15
17
  prefetch_factor=None,
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