vipr.plugins.huggingface package

Submodules

vipr.plugins.huggingface.controller module

class vipr.plugins.huggingface.controller.HuggingFaceController(*args: Any, **kw: Any)

Bases: ArgparseController

class Meta

Bases: object

description = 'My Plugin Controller'
label = 'huggingface'
stacked_on = 'base'
stacked_type = 'nested'
download()

Download models for HuggingFace.

vipr.plugins.huggingface.download module

vipr.plugins.huggingface.download.download_repository(extension_name: str, repo: HuggingFaceRepoConfig, app) DownloadResult

Download model files for a specific extension from Hugging Face.

Each repository entry in the config must provide: - root_dir_env_var: name of the environment variable that holds the

local root directory for this domain (e.g. REFLECTOMETRY_ROOT_DIR)

  • repo_id: the HuggingFace repository identifier

  • files: list of {source, target} entries where source is the path within the HF repo and target is the path relative to the root directory defined by root_dir_env_var

Parameters:
  • extension_name – Key of the repository entry

  • repo – Resolved repository configuration

  • app – The VIPR app instance

vipr.plugins.huggingface.huggingface module

class vipr.plugins.huggingface.huggingface.HuggingFace(app)

Bases: object

download_for_extension(extension_name: str, repo_config: HuggingFaceRepoConfig | None = None)

Utility method to download models for a specific extension.

Parameters:
  • extension_name – Name of the extension

  • repo_config – Explicit repository config. If omitted, the merged repository registry is used.

ensure_models_downloaded()

Ensure all configured models are downloaded.

get_repositories() dict[str, HuggingFaceRepoConfig]

Return the merged repository map used for model downloads.

register_repositories(repositories: dict[str, Mapping[str, Any] | BaseModel] | None)

Register multiple HuggingFace repositories provided by a plugin.

register_repository(name: str, config: Mapping[str, Any] | BaseModel)

Register a HuggingFace repository provided by a plugin.

Module contents

vipr.plugins.huggingface.load(app)