PVNet 3.0.22__tar.gz → 3.0.23__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.22 → PVNet-3.0.23}/PKG-INFO +1 -1
- {PVNet-3.0.22 → PVNet-3.0.23}/PVNet.egg-info/PKG-INFO +1 -1
- PVNet-3.0.23/pvnet/__init__.py +2 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/base_model.py +3 -2
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/unimodal_teacher.py +10 -1
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/optimizers.py +0 -1
- PVNet-3.0.22/pvnet/__init__.py +0 -2
- {PVNet-3.0.22 → PVNet-3.0.23}/LICENSE +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/MANIFEST.in +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/PVNet.egg-info/SOURCES.txt +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/PVNet.egg-info/dependency_links.txt +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/PVNet.egg-info/requires.txt +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/PVNet.egg-info/top_level.txt +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/README.md +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/callbacks.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/data/__init__.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/data/base.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/data/datamodule.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/data/pv_site_datamodule.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/data/utils.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/data/wind_datamodule.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/__init__.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/baseline/__init__.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/baseline/last_value.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/baseline/single_value.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/ensemble.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/__init__.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/basic_blocks.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/encoders/__init__.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/encoders/basic_blocks.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/encoders/encoders2d.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/encoders/encoders3d.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/encoders/encodersRNN.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/linear_networks/__init__.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/linear_networks/basic_blocks.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/linear_networks/networks.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/multimodal.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/multimodal_base.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/site_encoders/__init__.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/site_encoders/basic_blocks.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/site_encoders/encoders.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/utils.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/training.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/utils.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/pyproject.toml +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/requirements-dev.txt +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/requirements.txt +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/setup.cfg +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/setup.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/tests/__init__.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/tests/conftest.py +0 -0
- {PVNet-3.0.22 → PVNet-3.0.23}/tests/test_end2end.py +0 -0
|
@@ -165,7 +165,7 @@ class PVNetModelHubMixin(PyTorchModelHubMixin):
|
|
|
165
165
|
self,
|
|
166
166
|
save_directory: Union[str, Path],
|
|
167
167
|
config: dict,
|
|
168
|
-
data_config: Union[str, Path],
|
|
168
|
+
data_config: Optional[Union[str, Path]],
|
|
169
169
|
repo_id: Optional[str] = None,
|
|
170
170
|
push_to_hub: bool = False,
|
|
171
171
|
wandb_ids: Optional[Union[list[str], str]] = None,
|
|
@@ -206,7 +206,8 @@ class PVNetModelHubMixin(PyTorchModelHubMixin):
|
|
|
206
206
|
(save_directory / CONFIG_NAME).write_text(json.dumps(config, indent=4))
|
|
207
207
|
|
|
208
208
|
# Save cleaned datapipes configuration file
|
|
209
|
-
|
|
209
|
+
if data_config is not None:
|
|
210
|
+
make_clean_data_config(data_config, save_directory / DATA_CONFIG_NAME)
|
|
210
211
|
|
|
211
212
|
# Creating and saving model card.
|
|
212
213
|
card_data = ModelCardData(language="en", license="mit", library_name="pytorch")
|
|
@@ -369,7 +369,10 @@ class Model(MultimodalBaseModel):
|
|
|
369
369
|
def convert_to_multimodal_model(self, config):
|
|
370
370
|
"""Convert the model into a multimodal model class whilst preserving weights"""
|
|
371
371
|
config = config.copy()
|
|
372
|
-
|
|
372
|
+
|
|
373
|
+
if "cold_start" in config:
|
|
374
|
+
del config["cold_start"]
|
|
375
|
+
|
|
373
376
|
config["_target_"] = "pvnet.models.multimodal.multimodal.Model"
|
|
374
377
|
|
|
375
378
|
sources = []
|
|
@@ -416,4 +419,10 @@ class Model(MultimodalBaseModel):
|
|
|
416
419
|
|
|
417
420
|
multimodal_model.output_network.load_state_dict(self.output_network.state_dict())
|
|
418
421
|
|
|
422
|
+
if self.embedding_dim:
|
|
423
|
+
multimodal_model.embed.load_state_dict(self.embed.state_dict())
|
|
424
|
+
|
|
425
|
+
if self.include_sun:
|
|
426
|
+
multimodal_model.sun_fc1.load_state_dict(self.sun_fc1.state_dict())
|
|
427
|
+
|
|
419
428
|
return multimodal_model, config
|
|
@@ -185,7 +185,6 @@ class AdamWReduceLROnPlateau(AbstractOptimizer):
|
|
|
185
185
|
if not isinstance(self._lr, float):
|
|
186
186
|
return self._call_multi(model)
|
|
187
187
|
else:
|
|
188
|
-
assert False
|
|
189
188
|
default_lr = self._lr if model.lr is None else model.lr
|
|
190
189
|
opt = torch.optim.AdamW(model.parameters(), lr=default_lr, **self.opt_kwargs)
|
|
191
190
|
sch = torch.optim.lr_scheduler.ReduceLROnPlateau(
|
PVNet-3.0.22/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
|
|
File without changes
|