Model ScannerΒΆ

The scanner module provides a way to automatically detect issues in tabular, NLP, and LLM models. It works by running a set of automatic detectors depending on the model type. The detectors analyze the model and report any issues they find.

giskard.scanner.scan(model: BaseModel, dataset: Dataset | None = None, features: Sequence[str] | None = None, params=None, only=None, verbose=True, raise_exceptions=False)[source]ΒΆ

Automatically detects model vulnerabilities.

See Scanner for more details.

  • model (BaseModel) – A Giskard model object.

  • dataset (Dataset) – A Giskard dataset object.

  • features (Sequence[str]) – A list of features to use for the scan. If not specified, all features will be used.

  • params (dict) – Advanced scanner configuration. See Scanner for more details.

  • only (list) – A tag list to limit the scan to a subset of detectors. For example, giskard.scan(model, dataset, only=["performance"]) will only run detectors for performance issues.

  • verbose (bool) – Whether to print detailed info messages. Enabled by default.

  • raise_exceptions (bool) – Whether to raise an exception if detection errors are encountered. By default, errors are logged and handled gracefully, without interrupting the scan.


A scan report object containing the results of the scan.

Return type: