diff --git a/skore-hub-project/src/skore_hub_project/report/cross_validation_report.py b/skore-hub-project/src/skore_hub_project/report/cross_validation_report.py index cd98c554e..b774ecd96 100644 --- a/skore-hub-project/src/skore_hub_project/report/cross_validation_report.py +++ b/skore-hub-project/src/skore_hub_project/report/cross_validation_report.py @@ -6,7 +6,6 @@ import numpy as np from pydantic import Field, computed_field -from sklearn.model_selection import BaseCrossValidator from sklearn.model_selection._split import _CVIterableWrapper from skore_hub_project.artefact import CrossValidationReportArtefact @@ -160,12 +159,10 @@ def dataset_size(self) -> int: @cached_property def splitting_strategy_name(self) -> str: """The name of the splitting strategy used by the report.""" - is_sklearn_splitter = isinstance(self.report.splitter, BaseCrossValidator) is_iterable_splitter = isinstance(self.report.splitter, _CVIterableWrapper) - is_standard_strategy = is_sklearn_splitter and (not is_iterable_splitter) return ( - is_standard_strategy and self.report.splitter.__class__.__name__ or "custom" + is_iterable_splitter and "custom" or self.report.splitter.__class__.__name__ ) @computed_field # type: ignore[prop-decorator]