"""pytorch3d stub package with catch-all for missing submodules.""" import importlib import warnings __version__ = "0.0.0-stub" def __getattr__(name): if name.startswith("__") and name.endswith("__"): raise AttributeError(name) # Try importing submodule first try: return importlib.import_module(f".{name}", __name__) except ImportError: pass warnings.warn(f"pytorch3d stub: {name} not implemented", stacklevel=2) class _Dummy: def __init__(self, *a, **kw): pass def __call__(self, *a, **kw): return None def to(self, *a, **kw): return self _Dummy.__name__ = _Dummy.__qualname__ = name return _Dummy