baybe.surrogates.validation.make_dict_validator

baybe.surrogates.validation.make_dict_validator(specification: type)[source]

Construct an attrs dictionary validator based on a TypedDict.

Parameters:

specification (type) – Describes allowed keys and corresponding value types.

Return type:

Callable

Returns:

An attrs compatible validator.