From 1fda52f8e1aeb13ed77b4de36d215a47d9a4bab4 Mon Sep 17 00:00:00 2001 From: James Fulton <41546094+dfulu@users.noreply.github.com> Date: Wed, 13 Nov 2024 11:24:00 +0000 Subject: [PATCH 01/11] Bug fixes (#259) * model checkpoint bug fixes --- pvnet/models/base_model.py | 2 +- scripts/checkpoint_to_huggingface.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pvnet/models/base_model.py b/pvnet/models/base_model.py index 83e67e7b..24ce5bfc 100644 --- a/pvnet/models/base_model.py +++ b/pvnet/models/base_model.py @@ -94,7 +94,7 @@ def minimize_data_config(input_path, output_path, model): if not model.include_nwp: del config["input_data"]["nwp"] else: - for nwp_source in config["input_data"]["nwp"].keys(): + for nwp_source in list(config["input_data"]["nwp"].keys()): nwp_config = config["input_data"]["nwp"][nwp_source] if nwp_source not in model.nwp_encoders_dict: diff --git a/scripts/checkpoint_to_huggingface.py b/scripts/checkpoint_to_huggingface.py index 0005b396..56fd8d97 100644 --- a/scripts/checkpoint_to_huggingface.py +++ b/scripts/checkpoint_to_huggingface.py @@ -2,8 +2,8 @@ use: python checkpoint_to_huggingface.py "path/to/model/checkpoints" \ - --huggingface_repo="openclimatefix/pvnet_uk_region" \ - --wandb_repo="openclimatefix/pvnet2.1"" \ + --huggingface-repo="openclimatefix/pvnet_uk_region" \ + --wandb-repo="openclimatefix/pvnet2.1" \ --local-path="~/tmp/this_model" \ --no-push-to-hub """ @@ -19,10 +19,10 @@ def push_to_huggingface( checkpoint_dir_paths: list[str], huggingface_repo: str = "openclimatefix/pvnet_uk_region", # e.g. openclimatefix/windnet_india - wandb_repo: str | None = "openclimatefix/pvnet2.1", + wandb_repo: str = "openclimatefix/pvnet2.1", val_best: bool = True, - wandb_ids: list[str] | None = [], - local_path: str | None = None, + wandb_ids: list[str] = [], + local_path: str = None, push_to_hub: bool = True, ): """Push a local model to a huggingface model repo From 9b5b7210d97836a87022e2d4270c871a23c64e96 Mon Sep 17 00:00:00 2001 From: BumpVersion Action Date: Wed, 13 Nov 2024 11:24:35 +0000 Subject: [PATCH 02/11] =?UTF-8?q?Bump=20version:=203.0.63=20=E2=86=92=203.?= =?UTF-8?q?0.64=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- pvnet/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 5d3bbe27..9c4ae5ed 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,7 +1,7 @@ [bumpversion] commit = True tag = True -current_version = 3.0.63 +current_version = 3.0.64 message = Bump version: {current_version} → {new_version} [skip ci] [bumpversion:file:pvnet/__init__.py] diff --git a/pvnet/__init__.py b/pvnet/__init__.py index 3b41ad55..6df1ae46 100644 --- a/pvnet/__init__.py +++ b/pvnet/__init__.py @@ -1,2 +1,2 @@ """PVNet""" -__version__ = "3.0.63" +__version__ = "3.0.64" From f8afe22e17f2688c1b497c7daef5c1ee0349f66e Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:44:07 +0000 Subject: [PATCH 03/11] docs: add felix-e-h-p as a contributor for code (#293) * docs: update README.md [skip ci] * docs: create .all-contributorsrc [skip ci] * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .all-contributorsrc | 26 ++++++++++++++++++++++++++ README.md | 25 +++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 .all-contributorsrc diff --git a/.all-contributorsrc b/.all-contributorsrc new file mode 100644 index 00000000..66d35d35 --- /dev/null +++ b/.all-contributorsrc @@ -0,0 +1,26 @@ +{ + "files": [ + "README.md" + ], + "imageSize": 100, + "commit": false, + "commitType": "docs", + "commitConvention": "angular", + "contributors": [ + { + "login": "felix-e-h-p", + "name": "Felix", + "avatar_url": "https://avatars.githubusercontent.com/u/137530077?v=4", + "profile": "https://github.com/felix-e-h-p", + "contributions": [ + "code" + ] + } + ], + "contributorsPerLine": 7, + "skipCi": true, + "repoType": "github", + "repoHost": "https://github.com", + "projectName": "PVNet", + "projectOwner": "openclimatefix" +} diff --git a/README.md b/README.md index 051e9a2e..0d4871a5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ # PVNet 2.1 + +[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-) + [![Python Bump Version & release](https://github.com/openclimatefix/PVNet/actions/workflows/release.yml/badge.svg)](https://github.com/openclimatefix/PVNet/actions/workflows/release.yml) [![ease of contribution: hard](https://img.shields.io/badge/ease%20of%20contribution:%20hard-bb2629)](https://github.com/openclimatefix/ocf-meta-repo?tab=readme-ov-file#overview-of-ocfs-nowcasting-repositories) @@ -231,3 +234,25 @@ If you have successfully trained a PVNet model and have a saved model checkpoint ## Testing You can use `python -m pytest tests` to run tests + +## Contributors ✨ + +Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): + + + + + + + + + + +
Felix
Felix

💻
+ + + + + + +This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! From 1a84bfdb701fcf585197bc06120e7f2c7f768bd8 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:44:57 +0000 Subject: [PATCH 04/11] docs: add Sukh-P as a contributor for code (#294) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --- .all-contributorsrc | 9 +++++++++ README.md | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 66d35d35..5067e9bf 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -15,6 +15,15 @@ "contributions": [ "code" ] + }, + { + "login": "Sukh-P", + "name": "Sukhil Patel", + "avatar_url": "https://avatars.githubusercontent.com/u/42407101?v=4", + "profile": "https://github.com/Sukh-P", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, diff --git a/README.md b/README.md index 0d4871a5..e859ed85 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # PVNet 2.1 -[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-) [![Python Bump Version & release](https://github.com/openclimatefix/PVNet/actions/workflows/release.yml/badge.svg)](https://github.com/openclimatefix/PVNet/actions/workflows/release.yml) [![ease of contribution: hard](https://img.shields.io/badge/ease%20of%20contribution:%20hard-bb2629)](https://github.com/openclimatefix/ocf-meta-repo?tab=readme-ov-file#overview-of-ocfs-nowcasting-repositories) @@ -246,6 +246,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d Felix
Felix

💻 + Sukhil Patel
Sukhil Patel

💻 From a93f16a6d50100bb772b950fc28593015c5288d2 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:45:49 +0000 Subject: [PATCH 05/11] docs: add dfulu as a contributor for code (#295) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --- .all-contributorsrc | 9 +++++++++ README.md | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 5067e9bf..d0ef8996 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -24,6 +24,15 @@ "contributions": [ "code" ] + }, + { + "login": "dfulu", + "name": "James Fulton", + "avatar_url": "https://avatars.githubusercontent.com/u/41546094?v=4", + "profile": "https://github.com/dfulu", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, diff --git a/README.md b/README.md index e859ed85..9d4b7a91 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # PVNet 2.1 -[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-) [![Python Bump Version & release](https://github.com/openclimatefix/PVNet/actions/workflows/release.yml/badge.svg)](https://github.com/openclimatefix/PVNet/actions/workflows/release.yml) [![ease of contribution: hard](https://img.shields.io/badge/ease%20of%20contribution:%20hard-bb2629)](https://github.com/openclimatefix/ocf-meta-repo?tab=readme-ov-file#overview-of-ocfs-nowcasting-repositories) @@ -247,6 +247,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d Felix
Felix

💻 Sukhil Patel
Sukhil Patel

💻 + James Fulton
James Fulton

💻 From 9ed914f368bdfe2a892f98209c1fd06424f231a1 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:46:29 +0000 Subject: [PATCH 06/11] docs: add AUdaltsova as a contributor for code (#296) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --- .all-contributorsrc | 9 +++++++++ README.md | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index d0ef8996..452a6a6f 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -33,6 +33,15 @@ "contributions": [ "code" ] + }, + { + "login": "AUdaltsova", + "name": "Alexandra Udaltsova", + "avatar_url": "https://avatars.githubusercontent.com/u/43303448?v=4", + "profile": "https://github.com/AUdaltsova", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, diff --git a/README.md b/README.md index 9d4b7a91..0596ee06 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # PVNet 2.1 -[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors-) [![Python Bump Version & release](https://github.com/openclimatefix/PVNet/actions/workflows/release.yml/badge.svg)](https://github.com/openclimatefix/PVNet/actions/workflows/release.yml) [![ease of contribution: hard](https://img.shields.io/badge/ease%20of%20contribution:%20hard-bb2629)](https://github.com/openclimatefix/ocf-meta-repo?tab=readme-ov-file#overview-of-ocfs-nowcasting-repositories) @@ -248,6 +248,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d Felix
Felix

💻 Sukhil Patel
Sukhil Patel

💻 James Fulton
James Fulton

💻 + Alexandra Udaltsova
Alexandra Udaltsova

💻 From 4073ddd7cfb78b9ed303e416513097b15a33aa68 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:47:01 +0000 Subject: [PATCH 07/11] docs: add zakwatts as a contributor for code (#297) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --- .all-contributorsrc | 9 +++++++++ README.md | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 452a6a6f..32037485 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -42,6 +42,15 @@ "contributions": [ "code" ] + }, + { + "login": "zakwatts", + "name": "Megawattz", + "avatar_url": "https://avatars.githubusercontent.com/u/47150349?v=4", + "profile": "https://github.com/zakwatts", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, diff --git a/README.md b/README.md index 0596ee06..c713c8cc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # PVNet 2.1 -[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors-) [![Python Bump Version & release](https://github.com/openclimatefix/PVNet/actions/workflows/release.yml/badge.svg)](https://github.com/openclimatefix/PVNet/actions/workflows/release.yml) [![ease of contribution: hard](https://img.shields.io/badge/ease%20of%20contribution:%20hard-bb2629)](https://github.com/openclimatefix/ocf-meta-repo?tab=readme-ov-file#overview-of-ocfs-nowcasting-repositories) @@ -249,6 +249,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d Sukhil Patel
Sukhil Patel

💻 James Fulton
James Fulton

💻 Alexandra Udaltsova
Alexandra Udaltsova

💻 + Megawattz
Megawattz

💻 From 5851765dc9011883876bedaeb57941f6054d1493 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:47:46 +0000 Subject: [PATCH 08/11] docs: add peterdudfield as a contributor for code (#298) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --- .all-contributorsrc | 9 +++++++++ README.md | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 32037485..639b773d 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -51,6 +51,15 @@ "contributions": [ "code" ] + }, + { + "login": "peterdudfield", + "name": "Peter Dudfield", + "avatar_url": "https://avatars.githubusercontent.com/u/34686298?v=4", + "profile": "https://github.com/peterdudfield", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, diff --git a/README.md b/README.md index c713c8cc..b9505084 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # PVNet 2.1 -[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-) [![Python Bump Version & release](https://github.com/openclimatefix/PVNet/actions/workflows/release.yml/badge.svg)](https://github.com/openclimatefix/PVNet/actions/workflows/release.yml) [![ease of contribution: hard](https://img.shields.io/badge/ease%20of%20contribution:%20hard-bb2629)](https://github.com/openclimatefix/ocf-meta-repo?tab=readme-ov-file#overview-of-ocfs-nowcasting-repositories) @@ -250,6 +250,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d James Fulton
James Fulton

💻 Alexandra Udaltsova
Alexandra Udaltsova

💻 Megawattz
Megawattz

💻 + Peter Dudfield
Peter Dudfield

💻 From 195fa3ac3c0b985292d454a8ce89fcdbd391b009 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:49:41 +0000 Subject: [PATCH 09/11] docs: add mahdilamb as a contributor for infra (#299) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --- .all-contributorsrc | 9 +++++++++ README.md | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 639b773d..243bf1f9 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -60,6 +60,15 @@ "contributions": [ "code" ] + }, + { + "login": "mahdilamb", + "name": "Mahdi Lamb", + "avatar_url": "https://avatars.githubusercontent.com/u/4696915?v=4", + "profile": "https://github.com/mahdilamb", + "contributions": [ + "infra" + ] } ], "contributorsPerLine": 7, diff --git a/README.md b/README.md index b9505084..f0bd8754 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # PVNet 2.1 -[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-7-orange.svg?style=flat-square)](#contributors-) [![Python Bump Version & release](https://github.com/openclimatefix/PVNet/actions/workflows/release.yml/badge.svg)](https://github.com/openclimatefix/PVNet/actions/workflows/release.yml) [![ease of contribution: hard](https://img.shields.io/badge/ease%20of%20contribution:%20hard-bb2629)](https://github.com/openclimatefix/ocf-meta-repo?tab=readme-ov-file#overview-of-ocfs-nowcasting-repositories) @@ -251,6 +251,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d Alexandra Udaltsova
Alexandra Udaltsova

💻 Megawattz
Megawattz

💻 Peter Dudfield
Peter Dudfield

💻 + Mahdi Lamb
Mahdi Lamb

🚇 From a3c225141f81f02d48effe982fd67eabddcfea05 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:51:05 +0000 Subject: [PATCH 10/11] docs: add jacobbieker as a contributor for code (#300) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --- .all-contributorsrc | 9 +++++++++ README.md | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 243bf1f9..6b3d3d2b 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -69,6 +69,15 @@ "contributions": [ "infra" ] + }, + { + "login": "jacobbieker", + "name": "Jacob Prince-Bieker", + "avatar_url": "https://avatars.githubusercontent.com/u/7170359?v=4", + "profile": "https://www.jacobbieker.com", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, diff --git a/README.md b/README.md index f0bd8754..cb151923 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # PVNet 2.1 -[![All Contributors](https://img.shields.io/badge/all_contributors-7-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors-) [![Python Bump Version & release](https://github.com/openclimatefix/PVNet/actions/workflows/release.yml/badge.svg)](https://github.com/openclimatefix/PVNet/actions/workflows/release.yml) [![ease of contribution: hard](https://img.shields.io/badge/ease%20of%20contribution:%20hard-bb2629)](https://github.com/openclimatefix/ocf-meta-repo?tab=readme-ov-file#overview-of-ocfs-nowcasting-repositories) @@ -253,6 +253,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d Peter Dudfield
Peter Dudfield

💻 Mahdi Lamb
Mahdi Lamb

🚇 + + Jacob Prince-Bieker
Jacob Prince-Bieker

💻 + From 9f7d24597b127a94801fd577ec9f32429f3fb083 Mon Sep 17 00:00:00 2001 From: Alexandra Udaltsova <43303448+AUdaltsova@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:46:11 +0000 Subject: [PATCH 11/11] Add ocf colours cycler to mae_analysis (#315) * Add ocf colours cycler to mae_analysis * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add color comments to color cycler in mae_analysis * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- experiments/mae_analysis.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/experiments/mae_analysis.py b/experiments/mae_analysis.py index ac01aed2..66f09024 100644 --- a/experiments/mae_analysis.py +++ b/experiments/mae_analysis.py @@ -7,11 +7,26 @@ import argparse +import matplotlib import matplotlib.pyplot as plt import numpy as np import pandas as pd import wandb +matplotlib.rcParams["axes.prop_cycle"] = matplotlib.cycler( + color=[ + "FFD053", # yellow + "7BCDF3", # blue + "63BCAF", # teal + "086788", # dark blue + "FF9736", # dark orange + "E4E4E4", # grey + "14120E", # black + "FFAC5F", # orange + "4C9A8E", # dark teal + ] +) + def main(project: str, runs: list[str], run_names: list[str]) -> None: """