From 642b3f63315421df60826bbabd6332f94538f60e Mon Sep 17 00:00:00 2001 From: Kazuki Adachi Date: Tue, 10 Sep 2024 19:06:00 +0900 Subject: [PATCH] remove check_compute_fn argument --- ignite/metrics/regression/kendall_correlation.py | 3 +-- ignite/metrics/regression/spearman_correlation.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ignite/metrics/regression/kendall_correlation.py b/ignite/metrics/regression/kendall_correlation.py index 4db5f4e22d6..0928c816b74 100644 --- a/ignite/metrics/regression/kendall_correlation.py +++ b/ignite/metrics/regression/kendall_correlation.py @@ -90,7 +90,6 @@ def __init__( self, variant: str = "b", output_transform: Callable[..., Any] = lambda x: x, - check_compute_fn: bool = True, device: Union[str, torch.device] = torch.device("cpu"), skip_unrolling: bool = False, ) -> None: @@ -99,7 +98,7 @@ def __init__( except ImportError: raise ModuleNotFoundError("This module requires scipy to be installed.") - super().__init__(_get_kendall_tau(variant), output_transform, check_compute_fn, device, skip_unrolling) + super().__init__(_get_kendall_tau(variant), output_transform, True, device, skip_unrolling) def update(self, output: Tuple[torch.Tensor, torch.Tensor]) -> None: y_pred, y = output[0].detach(), output[1].detach() diff --git a/ignite/metrics/regression/spearman_correlation.py b/ignite/metrics/regression/spearman_correlation.py index f5cc3cfff7b..5dd6855b2d2 100644 --- a/ignite/metrics/regression/spearman_correlation.py +++ b/ignite/metrics/regression/spearman_correlation.py @@ -80,7 +80,6 @@ class SpearmanRankCorrelation(EpochMetric): def __init__( self, output_transform: Callable[..., Any] = lambda x: x, - check_compute_fn: bool = True, device: Union[str, torch.device] = torch.device("cpu"), skip_unrolling: bool = False, ) -> None: @@ -89,7 +88,7 @@ def __init__( except ImportError: raise ModuleNotFoundError("This module requires scipy to be installed.") - super().__init__(_get_spearman_r(), output_transform, check_compute_fn, device, skip_unrolling) + super().__init__(_get_spearman_r(), output_transform, True, device, skip_unrolling) def update(self, output: Tuple[torch.Tensor, torch.Tensor]) -> None: y_pred, y = output[0].detach(), output[1].detach()