jboth commited on
Commit
265a8b1
·
verified ·
1 Parent(s): 3964016

Upload pytorch3d_stub/pytorch3d/__init__.py with huggingface_hub

Browse files
pytorch3d_stub/pytorch3d/__init__.py CHANGED
@@ -1,2 +1,21 @@
1
- """pytorch3d stub for ZeroGPU only quaternion ops."""
 
 
 
2
  __version__ = "0.0.0-stub"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """pytorch3d stub package with catch-all for missing submodules."""
2
+ import importlib
3
+ import warnings
4
+
5
  __version__ = "0.0.0-stub"
6
+
7
+ def __getattr__(name):
8
+ if name.startswith("_"):
9
+ raise AttributeError(name)
10
+ # Try importing submodule first
11
+ try:
12
+ return importlib.import_module(f".{name}", __name__)
13
+ except ImportError:
14
+ pass
15
+ warnings.warn(f"pytorch3d stub: {name} not implemented", stacklevel=2)
16
+ class _Dummy:
17
+ def __init__(self, *a, **kw): pass
18
+ def __call__(self, *a, **kw): return None
19
+ def to(self, *a, **kw): return self
20
+ _Dummy.__name__ = _Dummy.__qualname__ = name
21
+ return _Dummy