Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

remove old testing code (#3423)

Edgar Ribaece63605973b
diff --git a/docs/source/index.rst b/docs/source/index.rst
index e02670546..e9cdf14f4 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -121,7 +121,6 @@ Join the community
morphology
onnx
tracking
- testing
utils
.. toctree::
diff --git a/docs/source/testing.rst b/docs/source/testing.rst
deleted file mode 100644
index 9551fa74e..000000000
--- a/docs/source/testing.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-kornia.testing
-==============
-
-.. meta::
- :name: description
- :content: "The `kornia.testing` module is a utility for testing and validation in Kornia, providing various tools and functions for unit testing. Please note that this module is deprecated and will be removed in release 0.8.0 (December 2024)."
-
-This module has been deprecated and will be removed on release 0.8.0 (dec 2024).
-
-.. automodule:: kornia.testing
- :members:
diff --git a/kornia/testing/__init__.py b/kornia/testing/__init__.py
index 58798ec4e..fda4b98d0 100644
--- a/kornia/testing/__init__.py
+++ b/kornia/testing/__init__.py
@@ -101,13 +101,6 @@ def tensor_to_gradcheck_var(
T = TypeVar("T")
-def dict_to(data: Dict[T, Any], device: Device, dtype: Dtype) -> Dict[T, Any]:
- out: Dict[T, Any] = {}
- for key, val in data.items():
- out[key] = val.to(device, dtype) if isinstance(val, Tensor) else val
- return out
-
-
def compute_patch_error(x: Tensor, y: Tensor, h: int, w: int) -> Tensor:
"""Compute the absolute error between patches."""
return torch.abs(x - y)[..., h // 4 : -h // 4, w // 4 : -w // 4].mean()