MCPcopy Index your code
hub / github.com/modelscope/modelscope / register_plugins_repo

Function register_plugins_repo

modelscope/utils/plugins.py:454–462  ·  view source on GitHub ↗

Try to install and import plugins from repo

(plugins: List[str])

Source from the content-addressed store, hash-verified

452
453
454def register_plugins_repo(plugins: List[str]) -> None:
455 """ Try to install and import plugins from repo"""
456 if plugins is not None:
457 install_requirements_by_names(plugins)
458 modules = []
459 for plugin in plugins:
460 module_name, module_version, _ = get_modules_from_package(plugin)
461 modules.extend(module_name)
462 import_plugins(modules)
463
464
465def register_modelhub_repo(model_dir, allow_remote=False) -> None:

Callers 3

pipelineFunction · 0.90
build_trainerFunction · 0.90
from_pretrainedMethod · 0.90

Calls 4

get_modules_from_packageFunction · 0.85
import_pluginsFunction · 0.85
extendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…