From a395c68d0acd2abf75e57cccf65964e25200e1ec Mon Sep 17 00:00:00 2001 From: Henrique Chaves Date: Mon, 6 Jan 2025 21:29:21 -0300 Subject: [PATCH] Update import --- giskard/scanner/robustness/base_detector.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/giskard/scanner/robustness/base_detector.py b/giskard/scanner/robustness/base_detector.py index 63e385f07e..fdf55f461f 100644 --- a/giskard/scanner/robustness/base_detector.py +++ b/giskard/scanner/robustness/base_detector.py @@ -9,10 +9,10 @@ from ...llm import LLMImportError from ...models.base import BaseModel from ...models.base.model_prediction import ModelPredictionResults -from ...registry.transformation_function import TransformationFunction from ..issues import Issue, IssueLevel, Robustness from ..logger import logger from ..registry import Detector +from .base_perturbation_function import PerturbationFunction from .numerical_transformations import NumericalTransformation from .text_transformations import TextTransformation @@ -69,7 +69,7 @@ class BasePerturbationDetector(Detector, ABC): def __init__( self, - transformations: Optional[Sequence[TransformationFunction]] = None, + transformations: Optional[Sequence[PerturbationFunction]] = None, threshold: Optional[float] = None, output_sensitivity: Optional[float] = None, num_samples: Optional[int] = None, @@ -79,7 +79,7 @@ def __init__( Parameters ---------- - transformations: Optional[Sequence[TransformationFunction]] + transformations: Optional[Sequence[PerturbationFunction]] The transformations used in the metamorphic testing. See :ref:`transformation_functions` for details about the available transformations. If not provided, a default set of transformations will be used. threshold: Optional[float] @@ -105,7 +105,7 @@ def _select_features(self, dataset: Dataset, features: Sequence[str]) -> Sequenc raise NotImplementedError @abstractmethod - def _get_default_transformations(self) -> Sequence[TransformationFunction]: + def _get_default_transformations(self) -> Sequence[PerturbationFunction]: raise NotImplementedError @abstractmethod