INNER CODE UNIT · Python

__getattr__

DeepLabCut/DeepLabCut · deeplabcut/__init__.py:132

def __getattr__(name: str) -> Any:
    """Lazily load optional public exports."""
    if name not in _OPTIONAL_EXPORTS:
        raise AttributeError(f"module {__name__!r} has no attribute {name!r}")

    module_name, attr_name = _OPTIONAL_EXPORTS[name]

    try:
        module = import_module(module_name, package=__name__)
        value = getattr(module, attr_name)
    except (ModuleNotFoundError, ImportError) as exc:
        if name in {
            "launch_dlc",
            "label_frames",
            "refine_labels",
            "refine_tracklets",
            "SkeletonBuilder",
        }:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…