PVNet 5.0.10__tar.gz → 5.0.12__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.10 → pvnet-5.0.12}/PKG-INFO +1 -1
  2. {pvnet-5.0.10 → pvnet-5.0.12}/PVNet.egg-info/PKG-INFO +1 -1
  3. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/models/base_model.py +7 -0
  4. {pvnet-5.0.10 → pvnet-5.0.12}/LICENSE +0 -0
  5. {pvnet-5.0.10 → pvnet-5.0.12}/PVNet.egg-info/SOURCES.txt +0 -0
  6. {pvnet-5.0.10 → pvnet-5.0.12}/PVNet.egg-info/dependency_links.txt +0 -0
  7. {pvnet-5.0.10 → pvnet-5.0.12}/PVNet.egg-info/requires.txt +0 -0
  8. {pvnet-5.0.10 → pvnet-5.0.12}/PVNet.egg-info/top_level.txt +0 -0
  9. {pvnet-5.0.10 → pvnet-5.0.12}/README.md +0 -0
  10. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/__init__.py +0 -0
  11. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/data/__init__.py +0 -0
  12. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/data/base_datamodule.py +0 -0
  13. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/data/site_datamodule.py +0 -0
  14. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/data/uk_regional_datamodule.py +0 -0
  15. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/load_model.py +0 -0
  16. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/models/__init__.py +0 -0
  17. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/models/ensemble.py +0 -0
  18. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/models/late_fusion/__init__.py +0 -0
  19. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/models/late_fusion/basic_blocks.py +0 -0
  20. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/models/late_fusion/encoders/__init__.py +0 -0
  21. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/models/late_fusion/encoders/basic_blocks.py +0 -0
  22. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/models/late_fusion/encoders/encoders3d.py +0 -0
  23. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/models/late_fusion/late_fusion.py +0 -0
  24. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/models/late_fusion/linear_networks/__init__.py +0 -0
  25. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/models/late_fusion/linear_networks/basic_blocks.py +0 -0
  26. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/models/late_fusion/linear_networks/networks.py +0 -0
  27. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/models/late_fusion/site_encoders/__init__.py +0 -0
  28. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/models/late_fusion/site_encoders/basic_blocks.py +0 -0
  29. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/models/late_fusion/site_encoders/encoders.py +0 -0
  30. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/optimizers.py +0 -0
  31. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/training/__init__.py +0 -0
  32. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/training/lightning_module.py +0 -0
  33. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/training/plots.py +0 -0
  34. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/training/train.py +0 -0
  35. {pvnet-5.0.10 → pvnet-5.0.12}/pvnet/utils.py +0 -0
  36. {pvnet-5.0.10 → pvnet-5.0.12}/pyproject.toml +0 -0
  37. {pvnet-5.0.10 → pvnet-5.0.12}/setup.cfg +0 -0
  38. {pvnet-5.0.10 → pvnet-5.0.12}/tests/test_end2end.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PVNet
3
- Version: 5.0.10
3
+ Version: 5.0.12
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.10
3
+ Version: 5.0.12
4
4
  Summary: PVNet
5
5
  Author-email: Peter Dudfield <info@openclimatefix.org>
6
6
  Requires-Python: >=3.11
@@ -129,6 +129,7 @@ def download_from_hf(
129
129
  force_download: bool,
130
130
  max_retries: int = 5,
131
131
  wait_time: int = 10,
132
+ token: bool | str | None = None,
132
133
  ) -> str | list[str]:
133
134
  """Tries to download one or more files from HuggingFace up to max_retries times.
134
135
 
@@ -140,6 +141,9 @@ def download_from_hf(
140
141
  force_download: Whether to force a new download
141
142
  max_retries: Maximum number of retry attempts
142
143
  wait_time: Wait time (in seconds) before retrying
144
+ token:
145
+ HF authentication token. If True, the token is read from the HuggingFace config folder.
146
+ If a string, it is used as the authentication token.
143
147
 
144
148
  Returns:
145
149
  The local file path of the downloaded file(s)
@@ -152,6 +156,7 @@ def download_from_hf(
152
156
  revision=revision,
153
157
  cache_dir=cache_dir,
154
158
  force_download=force_download,
159
+ token=token,
155
160
  )
156
161
 
157
162
  if isinstance(filename, list):
@@ -220,6 +225,7 @@ class HuggingfaceMixin:
220
225
  revision: str,
221
226
  cache_dir: str | None = None,
222
227
  force_download: bool = False,
228
+ token: bool | str | None = None,
223
229
  ) -> str:
224
230
  """Load data config file."""
225
231
  if os.path.isdir(model_id):
@@ -235,6 +241,7 @@ class HuggingfaceMixin:
235
241
  force_download=force_download,
236
242
  max_retries=5,
237
243
  wait_time=10,
244
+ token=token
238
245
  )
239
246
 
240
247
  return data_config_file
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