List of supported types#
Base types#
|
A Pydantic compatible 'type' which only accepts None. |
|
|
|
|
|
|
|
This type does not support coercion, only validation. |
|
This type does not support coercion, only validation. |
|
This type generally does not support coercion, only validation. |
|
Make types serializable; the serialization format is |
Functions#
A Pydantic-compatible function type, which supports deserialization. |
A function is termed “pure” if its output depends only on its inputs. If you serialize a function as part of a reproducible workflow, this is generally what you want.
NumPy types#
Validator also accepts str and scalar types (int, np.float32, etc.). |
|
Use this to use a NumPy dtype for type annotation; pydantic will recognize the type and execute appropriate validation/parsing. |
|
Use this to specify a NumPy array type annotation; pydantic will recognize the type and execute appropriate validation/parsing. |
|
alias of |
|
Pydantic typing support for the legacy RandomState object. |
SciPy distributions#
Pydantic-aware type for SciPy _frozen_ distributions. |
|
Univariate distributions in scipy.stats are implemented in a generic manner, which allows us to support all of them with the same type annotation UniDistribution. This is different for multivariate, which each require their own type.
MvDistribution is an abstract type for all multivariate distributions, and Distribution an abstract type for all univariate and multivariate ones.
Units#
Pint#
A value with pint units, e.g. 1*ureg.s. |
|
Quantities#
Exactly the same as QuantitiesValue, except that we enforce the magnitude to be 1. |
|
PyTorch#
alias of |
|
alias of |
|
Decode a torch module state serialized with torch_module_state_reduce. |
|
Encode to PyTorch model state into an ASCII string, which can be included in a JSON file. |
|
alias of |