PVNet 0.0.17__tar.gz → 0.0.19__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-0.0.17 → PVNet-0.0.19}/PKG-INFO +1 -1
- {PVNet-0.0.17 → PVNet-0.0.19}/PVNet.egg-info/PKG-INFO +1 -1
- PVNet-0.0.19/pvnet/__init__.py +2 -0
- {PVNet-0.0.17 → PVNet-0.0.19}/pvnet/app.py +6 -3
- PVNet-0.0.17/pvnet/__init__.py +0 -2
- {PVNet-0.0.17 → PVNet-0.0.19}/LICENSE +0 -0
- {PVNet-0.0.17 → PVNet-0.0.19}/MANIFEST.in +0 -0
- {PVNet-0.0.17 → PVNet-0.0.19}/PVNet.egg-info/SOURCES.txt +0 -0
- {PVNet-0.0.17 → PVNet-0.0.19}/PVNet.egg-info/dependency_links.txt +0 -0
- {PVNet-0.0.17 → PVNet-0.0.19}/PVNet.egg-info/requires.txt +0 -0
- {PVNet-0.0.17 → PVNet-0.0.19}/PVNet.egg-info/top_level.txt +0 -0
- {PVNet-0.0.17 → PVNet-0.0.19}/README.md +0 -0
- {PVNet-0.0.17 → PVNet-0.0.19}/pvnet/callbacks.py +0 -0
- {PVNet-0.0.17 → PVNet-0.0.19}/pvnet/optimizers.py +0 -0
- {PVNet-0.0.17 → PVNet-0.0.19}/pvnet/training.py +0 -0
- {PVNet-0.0.17 → PVNet-0.0.19}/pvnet/utils.py +0 -0
- {PVNet-0.0.17 → PVNet-0.0.19}/pyproject.toml +0 -0
- {PVNet-0.0.17 → PVNet-0.0.19}/requirements-dev.txt +0 -0
- {PVNet-0.0.17 → PVNet-0.0.19}/requirements.txt +0 -0
- {PVNet-0.0.17 → PVNet-0.0.19}/setup.cfg +0 -0
- {PVNet-0.0.17 → PVNet-0.0.19}/setup.py +0 -0
- {PVNet-0.0.17 → PVNet-0.0.19}/tests/__init__.py +0 -0
- {PVNet-0.0.17 → PVNet-0.0.19}/tests/conftest.py +0 -0
- {PVNet-0.0.17 → PVNet-0.0.19}/tests/test_app.py +0 -0
|
@@ -33,7 +33,6 @@ from ocf_datapipes.utils.utils import stack_np_examples_into_batch
|
|
|
33
33
|
from sqlalchemy.orm import Session
|
|
34
34
|
from torchdata.dataloader2 import DataLoader2, MultiProcessingReadingService
|
|
35
35
|
from torchdata.datapipes.iter import IterableWrapper
|
|
36
|
-
from tqdm import tqdm
|
|
37
36
|
|
|
38
37
|
import pvnet
|
|
39
38
|
from pvnet.data.datamodule import batch_to_tensor
|
|
@@ -66,6 +65,8 @@ batch_size = 10
|
|
|
66
65
|
model_name = "openclimatefix/pvnet_v2"
|
|
67
66
|
model_version = "7cc7e9f8e5fc472a753418c45b2af9f123547b6c"
|
|
68
67
|
|
|
68
|
+
model_name_ocf_db = "pvnet_v2"
|
|
69
|
+
|
|
69
70
|
# ---------------------------------------------------------------------------
|
|
70
71
|
# LOGGER
|
|
71
72
|
|
|
@@ -258,7 +259,8 @@ def app(t0=None, apply_adjuster=False, gsp_ids=gsp_ids):
|
|
|
258
259
|
normed_preds = []
|
|
259
260
|
|
|
260
261
|
with torch.no_grad():
|
|
261
|
-
for batch in
|
|
262
|
+
for i, batch in enumerate(dataloader):
|
|
263
|
+
logger.info(f"Predicting for batch: {i}")
|
|
262
264
|
# Run batch through model
|
|
263
265
|
device_batch = copy_batch_to_device(batch_to_tensor(batch), device)
|
|
264
266
|
preds = model(device_batch).detach().cpu().numpy()
|
|
@@ -273,6 +275,7 @@ def app(t0=None, apply_adjuster=False, gsp_ids=gsp_ids):
|
|
|
273
275
|
preds[sun_down_mask] = 0
|
|
274
276
|
|
|
275
277
|
normed_preds += [preds]
|
|
278
|
+
logger.info(f"Completed batch: {i}")
|
|
276
279
|
|
|
277
280
|
normed_preds = np.concatenate(normed_preds)
|
|
278
281
|
|
|
@@ -312,7 +315,7 @@ def app(t0=None, apply_adjuster=False, gsp_ids=gsp_ids):
|
|
|
312
315
|
connection = DatabaseConnection(url=os.environ["DB_URL"])
|
|
313
316
|
with connection.get_session() as session:
|
|
314
317
|
sql_forecasts = convert_df_to_forecasts(
|
|
315
|
-
df, session, model_name=
|
|
318
|
+
df, session, model_name=model_name_ocf_db, version=model_version
|
|
316
319
|
)
|
|
317
320
|
|
|
318
321
|
save_sql_forecasts(
|
PVNet-0.0.17/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
|