Skip to main content

PVNet summation

ease of contribution: hard

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

Using the summation model to sum the GSP 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 PVLive data for the national sum i.e. GSP 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.1

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.1
File Size Uploaded Provenance Actions
pvnet_summation-1.2.1.tar.gz 21.7 kB Without provenance Details for pvnet_summation-1.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 47.6 kB

Release files / pvnet_summation-1.2.1.tar.gz

Download URL pvnet_summation-1.2.1.tar.gz
Size 21.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e230ec3e5c4b6941143f8fe275f86124c6b331ce9ffc91602aff159438c0506f
BLAKE2b-256 checksum
How to use checksums
9ca7e73eaa270fdf04db36313104c4da66fd137e2157a826e91f9cd205b7d878
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","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.1-py3-none-any.whl

Download URL pvnet_summation-1.2.1-py3-none-any.whl
Size 25.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b84e9066de27d7ad95f28a4f17a827a66c7a1fe213d36bc4d5d5c1a58b43661
BLAKE2b-256 checksum
How to use checksums
370b5a14183f5765fe0b7601d85a6c17e742b9e7b4e59f19d1e336ec8990b56a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","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.1

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.1 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