PVNet 5.0.11__py3-none-any.whl → 5.0.13__py3-none-any.whl
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.
- pvnet/models/base_model.py +7 -0
- {pvnet-5.0.11.dist-info → pvnet-5.0.13.dist-info}/METADATA +1 -1
- {pvnet-5.0.11.dist-info → pvnet-5.0.13.dist-info}/RECORD +6 -6
- {pvnet-5.0.11.dist-info → pvnet-5.0.13.dist-info}/WHEEL +0 -0
- {pvnet-5.0.11.dist-info → pvnet-5.0.13.dist-info}/licenses/LICENSE +0 -0
- {pvnet-5.0.11.dist-info → pvnet-5.0.13.dist-info}/top_level.txt +0 -0
pvnet/models/base_model.py
CHANGED
|
@@ -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
|
|
@@ -7,7 +7,7 @@ pvnet/data/base_datamodule.py,sha256=Ibz0RoSr15HT6tMCs6ftXTpMa-NOKAmEd5ky55MqEK0
|
|
|
7
7
|
pvnet/data/site_datamodule.py,sha256=-KGxirGCBXVwcCREsjFkF7JDfa6NICv8bBDV6EILF_Q,962
|
|
8
8
|
pvnet/data/uk_regional_datamodule.py,sha256=KA2_7DYuSggmD5b-XiXshXq8xmu36BjtFmy_pS7e4QE,1017
|
|
9
9
|
pvnet/models/__init__.py,sha256=owzZ9xkD0DRTT51mT2Dx_p96oJjwDz57xo_MaMIEosk,145
|
|
10
|
-
pvnet/models/base_model.py,sha256=
|
|
10
|
+
pvnet/models/base_model.py,sha256=LrdC6b0IqXOYpdW5Pj6paB69FBiM31lYHfDi0zdOiJg,19134
|
|
11
11
|
pvnet/models/ensemble.py,sha256=1mFUEsl33kWcLL5d7zfDm9ypWxgAxBHgBiJLt0vwTeg,2363
|
|
12
12
|
pvnet/models/late_fusion/__init__.py,sha256=Jf0B-E0_5IvSBFoj1wvnPtwYDxs4pRIFm5qHv--Bbps,26
|
|
13
13
|
pvnet/models/late_fusion/basic_blocks.py,sha256=_cYGVyAIyEJS4wd-DEAXQXu0br66guZJn3ugoebWqZ0,1479
|
|
@@ -25,8 +25,8 @@ pvnet/training/__init__.py,sha256=FKxmPZ59Vuj5_mXomN4saJ3En5M-aDMxSs6OttTQOcg,49
|
|
|
25
25
|
pvnet/training/lightning_module.py,sha256=GVqdi5ALFo9-_WRYeyMMj2qH_k4gPxQ2sG6FhL_wRFE,13242
|
|
26
26
|
pvnet/training/plots.py,sha256=4xID7TBA4IazaARaCN5AoG5fFPJF1wIprn0y6I0C31c,2469
|
|
27
27
|
pvnet/training/train.py,sha256=zj9JMi9C6W68vGsQUBapWkJ4aDzDuJFMv0IVjO73s1k,5215
|
|
28
|
-
pvnet-5.0.
|
|
29
|
-
pvnet-5.0.
|
|
30
|
-
pvnet-5.0.
|
|
31
|
-
pvnet-5.0.
|
|
32
|
-
pvnet-5.0.
|
|
28
|
+
pvnet-5.0.13.dist-info/licenses/LICENSE,sha256=tKUnlSmcLBWMJWkHx3UjZGdrjs9LidGwLo0jsBUBAwU,1077
|
|
29
|
+
pvnet-5.0.13.dist-info/METADATA,sha256=8dcPbm-7PHwmk3mXAXw_WF3Y8hUupR0bWuqWU-z2hdw,18044
|
|
30
|
+
pvnet-5.0.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
31
|
+
pvnet-5.0.13.dist-info/top_level.txt,sha256=4mg6WjeW05SR7pg3-Q4JRE2yAoutHYpspOsiUzYVNv0,6
|
|
32
|
+
pvnet-5.0.13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|