Skip to content

Commit b491ad6

Browse files
authored
Update __init__.py (#2423)
1 parent 43383c2 commit b491ad6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

gpytorch/lazy/__init__.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,12 @@ def cat(
6666

6767

6868
def __getattr__(name: str) -> Any:
69-
warnings.warn(
70-
"GPyTorch will be replacing all LazyTensor functionality with the linear operator package. "
71-
"Replace all references to gpytorch.lazy.*LazyTensor with linear_operator.operators.*LinearOperator.",
72-
DeprecationWarning,
73-
)
69+
if not name.startswith("_"):
70+
warnings.warn(
71+
"GPyTorch will be replacing all LazyTensor functionality with the linear operator package. "
72+
"Replace all references to gpytorch.lazy.*LazyTensor with linear_operator.operators.*LinearOperator.",
73+
DeprecationWarning,
74+
)
7475
if name == "LazyTensor":
7576
from .lazy_tensor import LazyTensor
7677

0 commit comments

Comments
 (0)