dataeval.protocols¶
Common type protocols used for interoperability with DataEval.
Attributes¶
Type alias for a Union representing objects that can be coerced into an array. |
|
Type alias for a Union representing types that specify a torch.device. |
|
Type alias for an |
|
Type alias for an image classification datum tuple. |
|
Type alias for an |
|
Type alias for an object detection datum tuple. |
|
Type alias for an |
|
Type alias for a segmentation datum tuple. |
|
Type alias for threshold specifications. |
Classes¶
Protocol for a generic AnnotatedDataset. |
|
Protocol for array objects providing interoperability with DataEval. |
|
Protocol for chunking datasets into subsets by returning index arrays. |
|
Protocol for a generic Dataset. |
|
Protocol for determining evaluation points in sufficiency analysis. |
|
Protocol defining the interface for evaluating a trained model. |
|
Protocol for Evidence Lower Bound (ELBO) loss functions. |
|
Protocol defining a feature extraction function for drift detection. |
|
Protocol for generic loss functions that can be used with PyTorch models. |
|
Minimal protocol for metadata objects used in bias and quality analysis. |
|
Protocol for resetting model parameters between training runs. |
|
Protocol for a callable progress callback function. |
|
Protocol for reconstruction-based loss functions (Autoencoder). |
|
Protocol for targets in a Segmentation dataset. |
|
Protocol for sequence-like objects that can be indexed and iterated. |
|
Protocol for threshold objects used in bias and quality evaluators. |
|
Protocol defining the interface for training a model on a dataset subset. |
|
Protocol defining a transform function. |
|
Protocol defining the interface for updating reference data in drift detectors. |
Module Contents¶
- type dataeval.protocols.ArrayLike = np.typing.ArrayLike¶
Type alias for a Union representing objects that can be coerced into an array.
See also
- type dataeval.protocols.DeviceLike = int | str | tuple[str, int] | torch.device¶
Type alias for a Union representing types that specify a torch.device.
See also
- type dataeval.protocols.ImageClassificationDataset = AnnotatedDataset[ImageClassificationDatum]¶
Type alias for an
AnnotatedDatasetofImageClassificationDatumelements.
- type dataeval.protocols.ImageClassificationDatum = tuple[ArrayLike, ArrayLike, DatumMetadata]¶
Type alias for an image classification datum tuple.
- type dataeval.protocols.ObjectDetectionDataset = AnnotatedDataset[ObjectDetectionDatum]¶
Type alias for an
AnnotatedDatasetofObjectDetectionDatumelements.
- type dataeval.protocols.ObjectDetectionDatum = tuple[ArrayLike, ObjectDetectionTarget, DatumMetadata]¶
Type alias for an object detection datum tuple.
ArrayLikeof shape (C, H, W) - Image data in channel, height, width format.ObjectDetectionTarget- Object detection target information for the image.dict[str, Any] - Datum level metadata.
- type dataeval.protocols.SegmentationDataset = AnnotatedDataset[SegmentationDatum]¶
Type alias for an
AnnotatedDatasetofSegmentationDatumelements.
- type dataeval.protocols.SegmentationDatum = tuple[ArrayLike, SegmentationTarget, DatumMetadata]¶
Type alias for a segmentation datum tuple.
ArrayLikeof shape (C, H, W) - Image data in channel, height, width format.SegmentationTarget- Segmentation target information for the image.dict[str, Any] - Datum level metadata.
- dataeval.protocols.ThresholdLike¶
Type alias for threshold specifications.
Values default to modified z-score thresholds if not provided. -
float: symmetric multiplier (same for lower and upper) -str: named threshold (e.g., “modzscore”) with default bounds -tuple[float | None, float | None]:(lower, upper)for asymmetric bounds -tuple[str, float | tuple[float | None, float | None]]: named threshold with optional lower and upper bounds -tuple[str, bounds, (lower_limit, upper_limit)]: named threshold with bounds and limit clamping, e.g.("zscore", (1.0, 3.5), (0.0, 1.0)). PassNonefor bounds to use defaults:("zscore", None, (0.0, 1.0))-tuple[bounds | None, (lower_limit, upper_limit)]: default threshold with bounds and limit clamping, e.g.(2.5, (0.0, 1.0))or(None, (0.0, 1.0))for default multiplier -Threshold: a fully configured Threshold instance