HubCheckpoint#

class openstef_foundation_models.models.checkpoint.HubCheckpoint(*, kind: Literal['hub'] = 'hub', repo_id: str, filename: str, metadata_filename: str | None = None, revision: str | None = None, repo_type: str = 'model', local_dir: Path | None = None)[source]

Bases: BaseConfig

A checkpoint resolved from a HuggingFace Hub repository.

Parameters:
kind: Literal['hub']
repo_id: str
filename: str
metadata_filename: str | None
revision: str | None
repo_type: str
local_dir: Path | None
resolve() → ResolvedCheckpoint[source]

Download the weights and metadata from the Hub and resolve them.

Return type:

ResolvedCheckpoint

Returns:

A ResolvedCheckpoint pointing at the downloaded weights file.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': False, 'extra': 'ignore', 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].