Skip to content

Commit

Permalink
Update from main (#278)
Browse files Browse the repository at this point in the history
* Bug fixes (#259)

* model checkpoint bug fixes

* Bump version: 3.0.63 → 3.0.64 [skip ci]

---------

Co-authored-by: BumpVersion Action <bumpversion@github-actions>
  • Loading branch information
dfulu and BumpVersion Action authored Nov 13, 2024
1 parent 12dc2bf commit d13312e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
2 changes: 1 addition & 1 deletion pvnet/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""PVNet"""
__version__ = "3.0.63"
__version__ = "3.0.64"
2 changes: 1 addition & 1 deletion pvnet/models/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions scripts/checkpoint_to_huggingface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand All @@ -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
Expand Down

0 comments on commit d13312e

Please sign in to comment.