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 1/2] 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 2/2] =?UTF-8?q?Bump=20version:=203.0.63=20=E2=86=92=203.0.?= =?UTF-8?q?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"