PVNet 4.0.6__tar.gz → 4.0.7__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-4.0.6 → pvnet-4.0.7}/PKG-INFO +1 -1
- {pvnet-4.0.6 → pvnet-4.0.7}/PVNet.egg-info/PKG-INFO +1 -1
- pvnet-4.0.7/pvnet/__init__.py +2 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/base_model.py +30 -0
- pvnet-4.0.6/pvnet/__init__.py +0 -2
- {pvnet-4.0.6 → pvnet-4.0.7}/LICENSE +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/MANIFEST.in +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/PVNet.egg-info/SOURCES.txt +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/PVNet.egg-info/dependency_links.txt +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/PVNet.egg-info/requires.txt +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/PVNet.egg-info/top_level.txt +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/README.md +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/callbacks.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/data/__init__.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/data/base_datamodule.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/data/site_datamodule.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/data/uk_regional_datamodule.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/load_model.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/__init__.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/baseline/__init__.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/baseline/last_value.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/baseline/single_value.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/ensemble.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/model_cards/pv_india_model_card_template.md +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/model_cards/pv_uk_regional_model_card_template.md +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/model_cards/wind_india_model_card_template.md +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/multimodal/__init__.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/multimodal/basic_blocks.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/multimodal/encoders/__init__.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/multimodal/encoders/basic_blocks.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/multimodal/encoders/encoders2d.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/multimodal/encoders/encoders3d.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/multimodal/encoders/encodersRNN.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/multimodal/linear_networks/__init__.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/multimodal/linear_networks/basic_blocks.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/multimodal/linear_networks/networks.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/multimodal/multimodal.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/multimodal/multimodal_base.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/multimodal/site_encoders/__init__.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/multimodal/site_encoders/basic_blocks.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/multimodal/site_encoders/encoders.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/multimodal/unimodal_teacher.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/models/utils.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/optimizers.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/training.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pvnet/utils.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/pyproject.toml +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/setup.cfg +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/tests/test_end2end.py +0 -0
- {pvnet-4.0.6 → pvnet-4.0.7}/tests/test_utils.py +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Base model for all PVNet submodels"""
|
|
2
|
+
|
|
2
3
|
import json
|
|
3
4
|
import logging
|
|
4
5
|
import os
|
|
@@ -722,6 +723,35 @@ class BaseModel(pl.LightningModule, PVNetModelHubMixin):
|
|
|
722
723
|
try:
|
|
723
724
|
# join together validation results, and save to wandb
|
|
724
725
|
validation_results_df = pd.concat(self.validation_epoch_results)
|
|
726
|
+
validation_results_df["error"] = (
|
|
727
|
+
validation_results_df["y"] - validation_results_df["y_quantile_0.5"]
|
|
728
|
+
)
|
|
729
|
+
|
|
730
|
+
if isinstance(self.logger, pl.loggers.WandbLogger):
|
|
731
|
+
# log error distribution metrics
|
|
732
|
+
wandb.log(
|
|
733
|
+
{
|
|
734
|
+
"2nd_percentile_median_forecast_error": validation_results_df[
|
|
735
|
+
"error"
|
|
736
|
+
].quantile(0.02),
|
|
737
|
+
"5th_percentile_median_forecast_error": validation_results_df[
|
|
738
|
+
"error"
|
|
739
|
+
].quantile(0.05),
|
|
740
|
+
"95th_percentile_median_forecast_error": validation_results_df[
|
|
741
|
+
"error"
|
|
742
|
+
].quantile(0.95),
|
|
743
|
+
"98th_percentile_median_forecast_error": validation_results_df[
|
|
744
|
+
"error"
|
|
745
|
+
].quantile(0.98),
|
|
746
|
+
"95th_percentile_median_forecast_absolute_error": abs(
|
|
747
|
+
validation_results_df["error"]
|
|
748
|
+
).quantile(0.95),
|
|
749
|
+
"98th_percentile_median_forecast_absolute_error": abs(
|
|
750
|
+
validation_results_df["error"]
|
|
751
|
+
).quantile(0.98),
|
|
752
|
+
}
|
|
753
|
+
)
|
|
754
|
+
|
|
725
755
|
with tempfile.TemporaryDirectory() as tempdir:
|
|
726
756
|
filename = os.path.join(tempdir, f"validation_results_{self.current_epoch}.csv")
|
|
727
757
|
validation_results_df.to_csv(filename, index=False)
|
pvnet-4.0.6/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
|