clika_runtime.modelverse.hub functions
list_files
list_files(source: 'str', *, revision: 'str' = 'main', token: 'str | None' = None, offline: 'bool' = False) -> 'Any'
The file listing of a repository (or local directory) with byte totals, without downloading anything.
list_models
list_models() -> 'list[_ext.ModelEntry]'
Every registered model family (ModelEntry objects: metadata, the
config and GGUF architecture names the family claims, what its runnable
factories serve (served), whether it is runnable, and what an
identity-only registration is).
normalize_source
normalize_source(source: 'str') -> 'tuple[str, str, str]'
Split a source into (repo, revision, weight selector): a hub URL or an
org/model:tag spelling resolves to its parts; a plain source passes
through with empty revision and selector.
snapshot
snapshot(source: 'str', *, revision: 'str' = 'main', cache_dir: 'str | None' = None, token: 'str | None' = None, offline: 'bool' = False, weights: 'str | None' = None, include_weights: 'bool' = True, progress: 'Progress | None' = None, file_progress: 'FileProgress | None' = None) -> 'Any'
Resolve source (a hub repo id or a local directory) to a local
snapshot through the registry's download door, the one resolve
clikart-cli fetch takes: the planning verdict first (a checkpoint the
runtime cannot serve refuses before any file moves), the download under
the families' own resolve options, the checkpoint's license line, then
the companions the family names (a codec checkpoint, say), each fetched
and named in the answer with its outcome. Returns what was resolved
(local_dir, files, weights_primary on the GGUF lane,
license_line or license_failure, companions).
weights selects one option of a multi-option repo ("Q6_K", a glob,
a file name); a multi-option repo refuses without it, naming the options.
include_weights=False fetches the small files only (the configuration,
the tokenizer and processor files) and answers with no license line and no
companions. progress(done, total) and file_progress(info) report
the download; return False from either to cancel. offline refuses any
network access and resolves strictly from the cache. A refusal raises the
runtime's typed error with the hub's own code name.
snapshot_download
snapshot_download(source: 'str', **options: 'Any') -> 'str'
Download (or find in the cache) the snapshot of source through the
registry's download door and return its local directory. Options are
those of :func:snapshot; the companions the family names are fetched
beside it, and the license line is logged.