From f9d63be7d385113d5e07ef5b6193b293e09d7aca Mon Sep 17 00:00:00 2001 From: Kazuki Adachi Date: Mon, 14 Oct 2024 18:29:57 +0900 Subject: [PATCH] fix type hint --- ignite/metrics/clustering/silhouette_score.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ignite/metrics/clustering/silhouette_score.py b/ignite/metrics/clustering/silhouette_score.py index 13ea8bc0898..9498bb5479b 100644 --- a/ignite/metrics/clustering/silhouette_score.py +++ b/ignite/metrics/clustering/silhouette_score.py @@ -1,4 +1,4 @@ -from typing import Any, Callable, Union +from typing import Any, Callable, Union, Optional import torch from torch import Tensor @@ -97,7 +97,7 @@ def __init__( check_compute_fn: bool = True, device: Union[str, torch.device] = torch.device("cpu"), skip_unrolling: bool = False, - silhouette_kwargs: dict | None = None, + silhouette_kwargs: Optional[dict] = None, ) -> None: try: from sklearn.metrics import silhouette_score # noqa: F401