PVNet 5.0.0__tar.gz → 5.0.1__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.0 → pvnet-5.0.1}/PKG-INFO +1 -1
  2. {pvnet-5.0.0 → pvnet-5.0.1}/PVNet.egg-info/PKG-INFO +1 -1
  3. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/data/base_datamodule.py +11 -4
  4. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/utils.py +2 -0
  5. {pvnet-5.0.0 → pvnet-5.0.1}/LICENSE +0 -0
  6. {pvnet-5.0.0 → pvnet-5.0.1}/PVNet.egg-info/SOURCES.txt +0 -0
  7. {pvnet-5.0.0 → pvnet-5.0.1}/PVNet.egg-info/dependency_links.txt +0 -0
  8. {pvnet-5.0.0 → pvnet-5.0.1}/PVNet.egg-info/requires.txt +0 -0
  9. {pvnet-5.0.0 → pvnet-5.0.1}/PVNet.egg-info/top_level.txt +0 -0
  10. {pvnet-5.0.0 → pvnet-5.0.1}/README.md +0 -0
  11. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/__init__.py +0 -0
  12. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/data/__init__.py +0 -0
  13. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/data/site_datamodule.py +0 -0
  14. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/data/uk_regional_datamodule.py +0 -0
  15. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/load_model.py +0 -0
  16. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/models/__init__.py +0 -0
  17. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/models/base_model.py +0 -0
  18. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/models/ensemble.py +0 -0
  19. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/models/late_fusion/__init__.py +0 -0
  20. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/models/late_fusion/basic_blocks.py +0 -0
  21. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/models/late_fusion/encoders/__init__.py +0 -0
  22. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/models/late_fusion/encoders/basic_blocks.py +0 -0
  23. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/models/late_fusion/encoders/encoders3d.py +0 -0
  24. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/models/late_fusion/late_fusion.py +0 -0
  25. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/models/late_fusion/linear_networks/__init__.py +0 -0
  26. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/models/late_fusion/linear_networks/basic_blocks.py +0 -0
  27. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/models/late_fusion/linear_networks/networks.py +0 -0
  28. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/models/late_fusion/site_encoders/__init__.py +0 -0
  29. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/models/late_fusion/site_encoders/basic_blocks.py +0 -0
  30. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/models/late_fusion/site_encoders/encoders.py +0 -0
  31. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/optimizers.py +0 -0
  32. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/training/__init__.py +0 -0
  33. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/training/lightning_module.py +0 -0
  34. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/training/plots.py +0 -0
  35. {pvnet-5.0.0 → pvnet-5.0.1}/pvnet/training/train.py +0 -0
  36. {pvnet-5.0.0 → pvnet-5.0.1}/pyproject.toml +0 -0
  37. {pvnet-5.0.0 → pvnet-5.0.1}/setup.cfg +0 -0
  38. {pvnet-5.0.0 → pvnet-5.0.1}/tests/test_end2end.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PVNet
3
- Version: 5.0.0
3
+ Version: 5.0.1
4
4
  Summary: PVNet
5
5
  Author-email: Peter Dudfield <info@openclimatefix.org>
6
6
  Requires-Python: >=3.10
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PVNet
3
- Version: 5.0.0
3
+ Version: 5.0.1
4
4
  Summary: PVNet
5
5
  Author-email: Peter Dudfield <info@openclimatefix.org>
6
6
  Requires-Python: >=3.10
@@ -45,6 +45,7 @@ class BasePresavedDataModule(LightningDataModule):
45
45
  batch_size: int = 16,
46
46
  num_workers: int = 0,
47
47
  prefetch_factor: int | None = None,
48
+ persistent_workers: bool = False,
48
49
  ):
49
50
  """Base Datamodule for loading pre-saved samples
50
51
 
@@ -53,8 +54,9 @@ class BasePresavedDataModule(LightningDataModule):
53
54
  batch_size: Batch size.
54
55
  num_workers: Number of workers to use in multiprocess batch loading.
55
56
  prefetch_factor: Number of data will be prefetched at the end of each worker process.
56
- train_period: Date range filter for train dataloader.
57
- val_period: Date range filter for val dataloader.
57
+ persistent_workers: If True, the data loader will not shut down the worker processes
58
+ after a dataset has been consumed once. This allows to maintain the workers Dataset
59
+ instances alive.
58
60
  """
59
61
  super().__init__()
60
62
 
@@ -71,7 +73,7 @@ class BasePresavedDataModule(LightningDataModule):
71
73
  timeout=0,
72
74
  worker_init_fn=None,
73
75
  prefetch_factor=prefetch_factor,
74
- persistent_workers=False,
76
+ persistent_workers=persistent_workers,
75
77
  )
76
78
 
77
79
  def _get_premade_samples_dataset(self, subdir: str) -> Dataset:
@@ -97,8 +99,10 @@ class BaseStreamedDataModule(LightningDataModule):
97
99
  batch_size: int = 16,
98
100
  num_workers: int = 0,
99
101
  prefetch_factor: int | None = None,
102
+ persistent_workers: bool = False,
100
103
  train_period: list[str | None] = [None, None],
101
104
  val_period: list[str | None] = [None, None],
105
+
102
106
  ):
103
107
  """Base Datamodule for streaming samples.
104
108
 
@@ -107,6 +111,9 @@ class BaseStreamedDataModule(LightningDataModule):
107
111
  batch_size: Batch size.
108
112
  num_workers: Number of workers to use in multiprocess batch loading.
109
113
  prefetch_factor: Number of data will be prefetched at the end of each worker process.
114
+ persistent_workers: If True, the data loader will not shut down the worker processes
115
+ after a dataset has been consumed once. This allows to maintain the workers Dataset
116
+ instances alive.
110
117
  train_period: Date range filter for train dataloader.
111
118
  val_period: Date range filter for val dataloader.
112
119
  """
@@ -126,7 +133,7 @@ class BaseStreamedDataModule(LightningDataModule):
126
133
  timeout=0,
127
134
  worker_init_fn=None,
128
135
  prefetch_factor=prefetch_factor,
129
- persistent_workers=False,
136
+ persistent_workers=persistent_workers,
130
137
  )
131
138
 
132
139
  def setup(self, stage: str | None = None):
@@ -43,6 +43,8 @@ def run_config_utilities(config: DictConfig) -> None:
43
43
  config.datamodule.pin_memory = False
44
44
  if config.datamodule.get("num_workers"):
45
45
  config.datamodule.num_workers = 0
46
+ if config.datamodule.get("prefetch_factor"):
47
+ config.datamodule.prefetch_factor = None
46
48
 
47
49
  # Disable adding new keys to config
48
50
  OmegaConf.set_struct(config, True)
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
File without changes
File without changes
File without changes