From edf078f6cd1a024610f08a0444844b4a3c320748 Mon Sep 17 00:00:00 2001 From: Kazuki Adachi Date: Sat, 12 Oct 2024 12:29:44 +0900 Subject: [PATCH] add description for check_compute_fn argument --- ignite/metrics/regression/kendall_correlation.py | 3 +++ ignite/metrics/regression/spearman_correlation.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ignite/metrics/regression/kendall_correlation.py b/ignite/metrics/regression/kendall_correlation.py index 04090d0d7d9..7ad87b22402 100644 --- a/ignite/metrics/regression/kendall_correlation.py +++ b/ignite/metrics/regression/kendall_correlation.py @@ -55,6 +55,9 @@ class KendallRankCorrelation(EpochMetric): form expected by the metric. This can be useful if, for example, you have a multi-output model and you want to compute the metric with respect to one of the outputs. By default, metrics require the output as ``(y_pred, y)`` or ``{'y_pred': y_pred, 'y': y}``. + check_compute_fn: if True, ``compute_fn`` is run on the first batch of data to ensure there are no + issues. If issues exist, user is warned that there might be an issue with the ``compute_fn``. + Default, True. device: specifies which device updates are accumulated on. Setting the metric's device to be the same as your ``update`` arguments ensures the ``update`` method is non-blocking. By default, CPU. diff --git a/ignite/metrics/regression/spearman_correlation.py b/ignite/metrics/regression/spearman_correlation.py index f5cc3cfff7b..175198ed688 100644 --- a/ignite/metrics/regression/spearman_correlation.py +++ b/ignite/metrics/regression/spearman_correlation.py @@ -46,6 +46,9 @@ class SpearmanRankCorrelation(EpochMetric): form expected by the metric. This can be useful if, for example, you have a multi-output model and you want to compute the metric with respect to one of the outputs. By default, metrics require the output as ``(y_pred, y)`` or ``{'y_pred': y_pred, 'y': y}``. + check_compute_fn: if True, ``compute_fn`` is run on the first batch of data to ensure there are no + issues. If issues exist, user is warned that there might be an issue with the ``compute_fn``. + Default, True. device: specifies which device updates are accumulated on. Setting the metric's device to be the same as your ``update`` arguments ensures the ``update`` method is non-blocking. By default, CPU.