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, max_issues_per_detector=15)[source]ΒΆ
Automatically detects model vulnerabilities.
See
Scanner
for more details.- Parameters:
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.
max_issues_per_detector (int) β Maximal number of issues per detector
- Returns:
A scan report object containing the results of the scan.
- Return type: