diff --git a/tests/test_wsi_registration.py b/tests/test_wsi_registration.py index fd08d1bbd..5eb381263 100644 --- a/tests/test_wsi_registration.py +++ b/tests/test_wsi_registration.py @@ -5,8 +5,6 @@ import numpy as np import pytest -from tests.conftest import timed -from tiatoolbox import logger from tiatoolbox.tools.registration.wsi_registration import ( AffineWSITransformer, DFBRegister, @@ -23,28 +21,6 @@ RNG = np.random.default_rng() # Numpy Random Generator -def test_extract_features_time(dfbr_features: Path, test_count: int = 10) -> None: - """Compute time test for CNN based feature extraction function.""" - compile_time = 0.0 - eager_compile_time = 0.0 - for _ in range(test_count): - _, _compile_time = timed(lambda: test_extract_features(dfbr_features), compiled=True) - compile_time += _compile_time - for _ in range(test_count): - _, _compile_time = timed( - lambda: test_extract_features(dfbr_features, compiled=False), - ) - eager_compile_time += _compile_time - compile_time /= test_count - eager_compile_time /= test_count - logger.info("Time taken for feature extraction (torch.compile): %f", compile_time) - logger.info( - "Time taken for feature extraction (eager execution): %f", - eager_compile_time, - ) - assert compile_time < eager_compile_time - - def test_extract_features(dfbr_features: Path, *, compiled: bool = True) -> None: """Test for CNN based feature extraction function.""" # dfbr (deep feature based registration).