PVNet 3.0.52__tar.gz → 3.0.54__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.
- {pvnet-3.0.52 → pvnet-3.0.54}/PKG-INFO +1 -1
- {pvnet-3.0.52 → pvnet-3.0.54}/PVNet.egg-info/PKG-INFO +1 -1
- pvnet-3.0.54/pvnet/__init__.py +2 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/base_model.py +15 -4
- pvnet-3.0.52/pvnet/__init__.py +0 -2
- {pvnet-3.0.52 → pvnet-3.0.54}/LICENSE +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/MANIFEST.in +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/PVNet.egg-info/SOURCES.txt +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/PVNet.egg-info/dependency_links.txt +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/PVNet.egg-info/requires.txt +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/PVNet.egg-info/top_level.txt +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/README.md +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/callbacks.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/data/__init__.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/data/base.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/data/datamodule.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/data/pv_site_datamodule.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/data/utils.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/data/wind_datamodule.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/load_model.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/__init__.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/baseline/__init__.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/baseline/last_value.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/baseline/single_value.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/ensemble.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/multimodal/__init__.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/multimodal/basic_blocks.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/multimodal/encoders/__init__.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/multimodal/encoders/basic_blocks.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/multimodal/encoders/encoders2d.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/multimodal/encoders/encoders3d.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/multimodal/encoders/encodersRNN.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/multimodal/linear_networks/__init__.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/multimodal/linear_networks/basic_blocks.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/multimodal/linear_networks/networks.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/multimodal/multimodal.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/multimodal/multimodal_base.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/multimodal/site_encoders/__init__.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/multimodal/site_encoders/basic_blocks.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/multimodal/site_encoders/encoders.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/multimodal/unimodal_teacher.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/models/utils.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/optimizers.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/training.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pvnet/utils.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/pyproject.toml +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/setup.cfg +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/tests/test_end2end.py +0 -0
- {pvnet-3.0.52 → pvnet-3.0.54}/tests/test_utils.py +0 -0
|
@@ -242,6 +242,7 @@ class PVNetModelHubMixin:
|
|
|
242
242
|
data_config: Optional[Union[str, Path]],
|
|
243
243
|
repo_id: Optional[str] = None,
|
|
244
244
|
push_to_hub: bool = False,
|
|
245
|
+
wandb_repo: Optional[str] = None,
|
|
245
246
|
wandb_ids: Optional[Union[list[str], str]] = None,
|
|
246
247
|
card_template_path=None,
|
|
247
248
|
**kwargs,
|
|
@@ -260,9 +261,10 @@ class PVNetModelHubMixin:
|
|
|
260
261
|
ID of your repository on the Hub. Used only if `push_to_hub=True`. Will default to
|
|
261
262
|
the folder name if not provided.
|
|
262
263
|
push_to_hub (`bool`, *optional*, defaults to `False`):
|
|
263
|
-
Whether or not to push your model to the
|
|
264
|
+
Whether or not to push your model to the HuggingFace Hub after saving it.
|
|
265
|
+
wandb_repo: Identifier of the repo on wandb.
|
|
264
266
|
wandb_ids: Identifier(s) of the model on wandb.
|
|
265
|
-
card_template_path: Path to the
|
|
267
|
+
card_template_path: Path to the HuggingFace model card template. Defaults to card in
|
|
266
268
|
PVNet library if set to None.
|
|
267
269
|
kwargs:
|
|
268
270
|
Additional key word arguments passed along to the
|
|
@@ -289,11 +291,20 @@ class PVNetModelHubMixin:
|
|
|
289
291
|
# Taylor the data config to the model being saved
|
|
290
292
|
minimize_data_config(new_data_config_path, new_data_config_path, self)
|
|
291
293
|
|
|
294
|
+
# Get appropriate model card
|
|
295
|
+
model_name = repo_id.split("/")[1]
|
|
296
|
+
if model_name == "windnet_india":
|
|
297
|
+
model_card = "wind_india_model_card_template.md"
|
|
298
|
+
elif model_name == "pvnet_india":
|
|
299
|
+
model_card = "pv_india_model_card_template.md"
|
|
300
|
+
else:
|
|
301
|
+
model_card = "pv_uk_regional_model_card_template.md"
|
|
302
|
+
|
|
292
303
|
# Creating and saving model card.
|
|
293
304
|
card_data = ModelCardData(language="en", license="mit", library_name="pytorch")
|
|
294
305
|
if card_template_path is None:
|
|
295
306
|
card_template_path = (
|
|
296
|
-
f"{os.path.dirname(os.path.abspath(__file__))}/
|
|
307
|
+
f"{os.path.dirname(os.path.abspath(__file__))}/model_cards/{model_card}"
|
|
297
308
|
)
|
|
298
309
|
|
|
299
310
|
if isinstance(wandb_ids, str):
|
|
@@ -301,7 +312,7 @@ class PVNetModelHubMixin:
|
|
|
301
312
|
|
|
302
313
|
wandb_links = ""
|
|
303
314
|
for wandb_id in wandb_ids:
|
|
304
|
-
link = f"https://wandb.ai/
|
|
315
|
+
link = f"https://wandb.ai/{wandb_repo}/runs/{wandb_id}"
|
|
305
316
|
wandb_links += f" - [{link}]({link})\n"
|
|
306
317
|
|
|
307
318
|
card = ModelCard.from_template(
|
pvnet-3.0.52/pvnet/__init__.py
DELETED
|
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
|
|
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
|
|
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
|