Pydantic utilities¶
Functions and classes to handle the validation of hyperparameters using Pydantic.
- exception metatrain.utils.pydantic.MetatrainValidationError(model: Any, errors: list[dict])[source]¶
Bases:
ExceptionThis class transforms Pydantic validation errors into a more user-friendly format.
- Parameters:
- metatrain.utils.pydantic.validate(model_cls: Any, data: dict, **kwargs: Any) None[source]¶
Validate with pydantic, raising custom metatrain errors.
- Parameters:
- Raises:
MetatrainValidationError – If validation fails.
- Return type:
None