dataeval.utils.data.requires_maite_dataset¶
-
dataeval.utils.data.requires_maite_dataset(arg_name=
'dataset', *, expected='any_target')¶ Validate a named dataset argument before the wrapped call runs (decorator).
Resolves the dataset argument by name (works for positional or keyword passing) and calls
validate_dataset(). Compatible with regular functions, methods (including__init__), andclassmethod-wrapped constructors likeEmbeddings.new().- Parameters:¶
- arg_name=
'dataset'¶ Name of the dataset parameter on the wrapped callable.
- expected=
'any_target'¶ Forwarded to
validate_dataset().
- arg_name=
Examples
>>> @requires_maite_dataset("dataset", expected="image_only") ... def fit(self, dataset): ...>>> @requires_maite_dataset(expected="object_detection") ... def evaluate(self, dataset): ...