PyTorch

New in 0.32.0

Schemas and components for validating tensordict.TensorDict and tensordict.tensorclass. Typical imports use pandera.tensordict; implementations live under pandera.api.tensordict. See PyTorch Tensor Data Validation for usage examples.

The pandera.tensordict entry point also re-exports Check and pandera.errors — see Core for those APIs.

Schemas

pandera.api.tensordict.container.TensorDictSchema

Validate TensorDict and tensorclass objects.

Schema components

pandera.api.tensordict.components.Tensor

Validate a single tensor entry in a TensorDict.

Declarative models

pandera.api.tensordict.model.TensorDictModel

Declarative TensorDict schema using class definitions.

pandera.api.tensordict.model_components.Field

Field specification for TensorDict models.

Configuration

See also Core for the full configuration API.

pandera.config.ValidationDepth

Whether to apply checks at schema- or data-level, or both.

pandera.config.ValidationScope

Indicates whether a check/validator operates at a schema of data level.

Dtypes

See Data Types for DataType and Engine.

See also