PVNet 2.1.26__tar.gz → 2.1.28__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-2.1.26 → PVNet-2.1.28}/PKG-INFO +1 -1
- {PVNet-2.1.26 → PVNet-2.1.28}/PVNet.egg-info/PKG-INFO +1 -1
- PVNet-2.1.28/pvnet/__init__.py +2 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/app.py +14 -8
- PVNet-2.1.26/pvnet/__init__.py +0 -2
- {PVNet-2.1.26 → PVNet-2.1.28}/LICENSE +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/MANIFEST.in +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/PVNet.egg-info/SOURCES.txt +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/PVNet.egg-info/dependency_links.txt +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/PVNet.egg-info/requires.txt +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/PVNet.egg-info/top_level.txt +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/README.md +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/callbacks.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/data/__init__.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/data/datamodule.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/models/__init__.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/models/base_model.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/models/baseline/__init__.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/models/baseline/last_value.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/models/baseline/single_value.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/models/multimodal/__init__.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/models/multimodal/basic_blocks.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/models/multimodal/deep_supervision.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/models/multimodal/encoders/__init__.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/models/multimodal/encoders/basic_blocks.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/models/multimodal/encoders/encoders2d.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/models/multimodal/encoders/encoders3d.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/models/multimodal/encoders/encodersRNN.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/models/multimodal/linear_networks/__init__.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/models/multimodal/linear_networks/basic_blocks.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/models/multimodal/linear_networks/networks.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/models/multimodal/multimodal.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/models/multimodal/nwp_weighting.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/models/multimodal/weather_residual.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/models/utils.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/optimizers.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/training.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pvnet/utils.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/pyproject.toml +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/requirements-dev.txt +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/requirements.txt +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/setup.cfg +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/setup.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/tests/__init__.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/tests/conftest.py +0 -0
- {PVNet-2.1.26 → PVNet-2.1.28}/tests/test_app.py +0 -0
|
@@ -15,6 +15,7 @@ import fsspec
|
|
|
15
15
|
import numpy as np
|
|
16
16
|
import pandas as pd
|
|
17
17
|
import torch
|
|
18
|
+
import typer
|
|
18
19
|
import xarray as xr
|
|
19
20
|
from nowcasting_datamodel.connection import DatabaseConnection
|
|
20
21
|
from nowcasting_datamodel.models import (
|
|
@@ -63,16 +64,13 @@ all_gsp_ids = list(range(1, 318))
|
|
|
63
64
|
batch_size = 10
|
|
64
65
|
|
|
65
66
|
# Huggingfacehub model repo and commit for PVNet (GSP-level model)
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
default_model_name = "openclimatefix/pvnet_v2"
|
|
68
|
+
default_model_version = "96ac8c67fa8663844ddcfa82aece51ef94f34453"
|
|
68
69
|
|
|
69
70
|
# Huggingfacehub model repo and commit for PVNet summation (GSP sum to national model)
|
|
70
71
|
# If summation_model_name is set to None, a simple sum is computed instead
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"APP_SUMMATION_MODEL", default="4a145d74c725ffc72f482025d3418659a6869c94"
|
|
74
|
-
)
|
|
75
|
-
|
|
72
|
+
default_summation_model_name = "openclimatefix/pvnet_v2_summation"
|
|
73
|
+
default_summation_model_version = "4a145d74c725ffc72f482025d3418659a6869c94"
|
|
76
74
|
|
|
77
75
|
model_name_ocf_db = "pvnet_v2"
|
|
78
76
|
use_adjuster = os.getenv("USE_ADJUSTER", "True").lower() == "true"
|
|
@@ -214,6 +212,14 @@ def app(
|
|
|
214
212
|
logger.info(f"Using `pvnet` library version: {pvnet.__version__}")
|
|
215
213
|
logger.info(f"Using {num_workers} workers")
|
|
216
214
|
|
|
215
|
+
# Allow environment overwrite of model
|
|
216
|
+
model_name = os.getenv("APP_MODEL", default=default_model_name)
|
|
217
|
+
model_version = os.getenv("APP_MODEL_VERSION", default=default_model_version)
|
|
218
|
+
summation_model_name = os.getenv("APP_SUMMATION_MODEL", default=default_summation_model_name)
|
|
219
|
+
summation_model_version = os.getenv(
|
|
220
|
+
"APP_SUMMATION_MODEL", default=default_summation_model_version
|
|
221
|
+
)
|
|
222
|
+
|
|
217
223
|
# ---------------------------------------------------------------------------
|
|
218
224
|
# 0. If inference datetime is None, round down to last 30 minutes
|
|
219
225
|
if t0 is None:
|
|
@@ -506,4 +512,4 @@ def app(
|
|
|
506
512
|
|
|
507
513
|
|
|
508
514
|
if __name__ == "__main__":
|
|
509
|
-
|
|
515
|
+
typer.run(app)
|
PVNet-2.1.26/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
|