Skip to main content

PVNet summation

ease of contribution: hard

This project is used for training a model to sum the regional predictions of PVNet into a national estimate.

Using the summation model to sum the regional predictions rather than doing a simple sum increases the accuracy of the national predictions and can be configured to produce estimates of the uncertainty range of the national estimate. See the PVNet repo for more details and our paper.

Setup / Installation

git clone https://github.com/openclimatefix/PVNet_summation
cd PVNet_summation
pip install .

Additional development dependencies

pip install ".[dev]"

Getting started with running PVNet summation

In order to run PVNet summation, we assume that you are already set up with PVNet and have a trained PVNet model already available either locally or pushed to HuggingFace.

Before running any code, copy the example configuration to a configs directory:

cp -r configs.example configs

You will be making local amendments to these configs.

Datasets

The datasets required are the same as documented in PVNet. The only addition is that you will need PV generation data for the national sum with location ID 0.

Training PVNet_summation

How PVNet_summation is run is determined by the extensive configuration in the config files. The configs stored in configs.example.

Make sure to update the following config files before training your model:

  1. At the very start of training we loop over all of the input samples and make predictions for them using PVNet. These predictions are saved to disk and will be loaded in the training loop for more efficient training. In configs/config.yaml update sample_save_dir to set where the predictions will be saved to.

  2. In configs/datamodule/default.yaml:

  • Update pvnet_model.model_id and pvnet_model.revision to point to the Huggingface commit or local directory where the exported PVNet model is.
  • Update configuration to point to a data configuration compatible with the PVNet model whose outputs will be fed into the summation model.
  • Set train_period and val_period to control the time ranges of the train and val period
  • Optionally set max_num_train_samples and max_num_val_samples to limit the number of possible train and validation example which will be used.
  1. In configs/model/default.yaml:
    • Update the hyperparameters and structure of the summation model
  2. In configs/trainer/default.yaml:
    • Set accelerator: 0 if running on a system without a supported GPU

Assuming you have updated the configs, you should now be able to run:

python run.py

Testing

You can use python -m pytest tests to run tests

Metadata

Release files for PVNet_summation 1.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PVNet_summation 1.2.6
File Size Uploaded Provenance Actions
pvnet_summation-1.2.6.tar.gz 21.9 kB Without provenance Details for pvnet_summation-1.2.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for PVNet_summation 1.2.6
File Interpreter ABI Platform Actions
pvnet_summation-1.2.6-py3-none-any.whl Python 3 none any Details for pvnet_summation-1.2.6-py3-none-any.whl

Total release size: 47.9 kB

Release files / pvnet_summation-1.2.6.tar.gz

Download URL pvnet_summation-1.2.6.tar.gz
Size 21.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5ed46a6a55848e7b86d759048947c520c89d10b1968a4a467bc13238b9c2ebba
BLAKE2b-256 checksum
How to use checksums
05ab92428839b1149014442eecbc1a8a9e9684f1d9ff6e74727bab6c53579e1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pvnet_summation-1.2.6-py3-none-any.whl

Download URL pvnet_summation-1.2.6-py3-none-any.whl
Size 26.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e93617cf37b0199f5f3355552c00797864e6630d74b8452aff6d2b99c5ea085d
BLAKE2b-256 checksum
How to use checksums
be8c03680d19e4face0e2ea9c1cf58f97daafee356bb551c49ed4af3c96f0260
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for PVNet_summation 1.2.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.6 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page