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.
Files changed (52) hide show
  1. {PVNet-3.0.22 → PVNet-3.0.23}/PKG-INFO +1 -1
  2. {PVNet-3.0.22 → PVNet-3.0.23}/PVNet.egg-info/PKG-INFO +1 -1
  3. PVNet-3.0.23/pvnet/__init__.py +2 -0
  4. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/base_model.py +3 -2
  5. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/unimodal_teacher.py +10 -1
  6. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/optimizers.py +0 -1
  7. PVNet-3.0.22/pvnet/__init__.py +0 -2
  8. {PVNet-3.0.22 → PVNet-3.0.23}/LICENSE +0 -0
  9. {PVNet-3.0.22 → PVNet-3.0.23}/MANIFEST.in +0 -0
  10. {PVNet-3.0.22 → PVNet-3.0.23}/PVNet.egg-info/SOURCES.txt +0 -0
  11. {PVNet-3.0.22 → PVNet-3.0.23}/PVNet.egg-info/dependency_links.txt +0 -0
  12. {PVNet-3.0.22 → PVNet-3.0.23}/PVNet.egg-info/requires.txt +0 -0
  13. {PVNet-3.0.22 → PVNet-3.0.23}/PVNet.egg-info/top_level.txt +0 -0
  14. {PVNet-3.0.22 → PVNet-3.0.23}/README.md +0 -0
  15. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/callbacks.py +0 -0
  16. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/data/__init__.py +0 -0
  17. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/data/base.py +0 -0
  18. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/data/datamodule.py +0 -0
  19. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/data/pv_site_datamodule.py +0 -0
  20. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/data/utils.py +0 -0
  21. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/data/wind_datamodule.py +0 -0
  22. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/__init__.py +0 -0
  23. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/baseline/__init__.py +0 -0
  24. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/baseline/last_value.py +0 -0
  25. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/baseline/single_value.py +0 -0
  26. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/ensemble.py +0 -0
  27. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/__init__.py +0 -0
  28. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/basic_blocks.py +0 -0
  29. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/encoders/__init__.py +0 -0
  30. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/encoders/basic_blocks.py +0 -0
  31. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/encoders/encoders2d.py +0 -0
  32. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/encoders/encoders3d.py +0 -0
  33. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/encoders/encodersRNN.py +0 -0
  34. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/linear_networks/__init__.py +0 -0
  35. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/linear_networks/basic_blocks.py +0 -0
  36. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/linear_networks/networks.py +0 -0
  37. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/multimodal.py +0 -0
  38. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/multimodal_base.py +0 -0
  39. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/site_encoders/__init__.py +0 -0
  40. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/site_encoders/basic_blocks.py +0 -0
  41. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/multimodal/site_encoders/encoders.py +0 -0
  42. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/models/utils.py +0 -0
  43. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/training.py +0 -0
  44. {PVNet-3.0.22 → PVNet-3.0.23}/pvnet/utils.py +0 -0
  45. {PVNet-3.0.22 → PVNet-3.0.23}/pyproject.toml +0 -0
  46. {PVNet-3.0.22 → PVNet-3.0.23}/requirements-dev.txt +0 -0
  47. {PVNet-3.0.22 → PVNet-3.0.23}/requirements.txt +0 -0
  48. {PVNet-3.0.22 → PVNet-3.0.23}/setup.cfg +0 -0
  49. {PVNet-3.0.22 → PVNet-3.0.23}/setup.py +0 -0
  50. {PVNet-3.0.22 → PVNet-3.0.23}/tests/__init__.py +0 -0
  51. {PVNet-3.0.22 → PVNet-3.0.23}/tests/conftest.py +0 -0
  52. {PVNet-3.0.22 → PVNet-3.0.23}/tests/test_end2end.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PVNet
3
- Version: 3.0.22
3
+ Version: 3.0.23
4
4
  Summary: PVNet
5
5
  Author: Peter Dudfield
6
6
  Author-email: info@openclimatefix.org
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PVNet
3
- Version: 3.0.22
3
+ Version: 3.0.23
4
4
  Summary: PVNet
5
5
  Author: Peter Dudfield
6
6
  Author-email: info@openclimatefix.org
@@ -0,0 +1,2 @@
1
+ """PVNet"""
2
+ __version__ = "3.0.23"
@@ -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
- make_clean_data_config(data_config, save_directory / DATA_CONFIG_NAME)
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
- del config["cold_start"]
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(
@@ -1,2 +0,0 @@
1
- """PVNet"""
2
- __version__ = "3.0.22"
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