PVNet_summation
Project description
PVNet summation
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:
-
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.yamlupdatesample_save_dirto set where the predictions will be saved to. -
In
configs/datamodule/default.yaml:
- Update
pvnet_model.model_idandpvnet_model.revisionto point to the Huggingface commit or local directory where the exported PVNet model is. - Update
configurationto point to a data configuration compatible with the PVNet model whose outputs will be fed into the summation model. - Set
train_periodandval_periodto control the time ranges of the train and val period - Optionally set
max_num_train_samplesandmax_num_val_samplesto limit the number of possible train and validation example which will be used.
- In
configs/model/default.yaml:- Update the hyperparameters and structure of the summation model
- In
configs/trainer/default.yaml:- Set
accelerator: 0if running on a system without a supported GPU
- Set
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pvnet_summation-1.2.0.tar.gz.
File metadata
- Download URL: pvnet_summation-1.2.0.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c4fd9116797a0693aebebcc14de4b3b6b86ef7857e4a9bd62088720d811ad72
|
|
| MD5 |
8d96692f83d5c995c089a0db38ff7e2f
|
|
| BLAKE2b-256 |
64c88e9f9fa2bf3914b824d36a85d2bc89b7eef71d331f4535ecabdc44266436
|
File details
Details for the file pvnet_summation-1.2.0-py3-none-any.whl.
File metadata
- Download URL: pvnet_summation-1.2.0-py3-none-any.whl
- Upload date:
- Size: 25.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b03fcc90b6f1006a85eeaa4f0246150c66e9d52245b63d61038bb2b60dcca85
|
|
| MD5 |
5efc0b40afe1cf84a8639df14ba86777
|
|
| BLAKE2b-256 |
e8cf18995d3e7b174228de5a1e452467c71f9fdc7849a4dc68907e295db04cd4
|