Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:ecmwf/anemoi-inference into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
HCookie committed Dec 14, 2024
2 parents 376b111 + 8dd8389 commit da33b3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/anemoi/inference/checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def _download_huggingfacehub(huggingface_config):
except ImportError as e:
raise ImportError("Could not import `huggingface_hub`, please run `pip install huggingface_hub`.") from e

if isinstance(huggingface_config, str):
huggingface_config = {"repo_id": huggingface_config}

if "filename" in huggingface_config:
config_path = hf_hub_download(**huggingface_config)
else:
Expand Down
2 changes: 1 addition & 1 deletion src/anemoi/inference/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Config:

description: str | None = None

checkpoint: str | Dict[Literal["huggingface"], Dict[str, Any]]
checkpoint: str | Dict[Literal["huggingface"], Dict[str, Any] | str]
"""A path to an Anemoi checkpoint file."""

date: str | int | datetime.datetime | None = None
Expand Down

0 comments on commit da33b3c

Please sign in to comment.