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_models(extension_name: str, app=None)

Download models 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 in huggingface.repositories

  • app – The VIPR app instance

vipr.plugins.huggingface.huggingface module

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

Bases: object

download_for_extension(extension_name)

Utility method to download models for a specific extension.

Parameters:

extension_name – Name of the extension

ensure_models_downloaded()

Ensure all configured models are downloaded.

init_hook(app)

Hook called after command line arguments are parsed

Module contents

vipr.plugins.huggingface.load(app)