-
Notifications
You must be signed in to change notification settings - Fork 450
Expand file tree
/
Copy path__init__.py
More file actions
80 lines (69 loc) · 2.02 KB
/
__init__.py
File metadata and controls
80 lines (69 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import warnings
from scvi import settings
from scvi.utils import error_on_missing_dependencies
from . import harreman
from .cellassign import CellAssign
from .contrastivevi import ContrastiveVI
from .cytovi import CYTOVI
from .decipher import Decipher
from .gimvi import GIMVI
from .methylvi import METHYLANVI, METHYLVI
from .mrvi import MRVI
from .mrvi_torch import TorchMRVI
from .poissonvi import POISSONVI
from .resolvi import RESOLVI
from .scar import SCAR
from .scbasset import SCBASSET
from .scviva import SCVIVA
from .solo import SOLO
from .stereoscope import RNAStereoscope, SpatialStereoscope
from .sysvi import SysVI
from .totalanvi import TOTALANVI
from .velovi import VELOVI
__all__ = [
"SCAR",
"SOLO",
"GIMVI",
"Decipher",
"RNAStereoscope",
"SpatialStereoscope",
"CellAssign",
"TOTALANVI",
"SCBASSET",
"POISSONVI",
"ContrastiveVI",
"SysVI",
"VELOVI",
"MRVI",
"TorchMRVI",
"METHYLVI",
"METHYLANVI",
"RESOLVI",
"SCVIVA",
"CYTOVI",
"harreman",
]
def __getattr__(name: str):
"""
Lazily provide object. If optional deps are missing, raise a helpful ImportError
only when object is actually requested.
"""
if name == "JaxMRVI":
warnings.warn(
"In order to use the Jax version of MRVI make sure to install scvi-tools[jax]",
DeprecationWarning,
stacklevel=settings.warnings_stacklevel,
)
error_on_missing_dependencies("flax", "jax", "jaxlib", "optax", "numpyro")
from .mrvi_jax import JaxMRVI as _JaxMRVI
return _JaxMRVI
if name == "Tangram":
warnings.warn(
"In order to use the TANGRAM make sure to install scvi-tools[jax]",
DeprecationWarning,
stacklevel=settings.warnings_stacklevel,
)
error_on_missing_dependencies("flax", "jax", "jaxlib", "optax", "numpyro")
from .tangram import Tangram as _Tangram
return _Tangram
raise AttributeError(f"module {__name__!r} has no attribute {name}")