arthurai.core.dataset_validation_utils#

Functions

ensure_obj_matches_attr_value_type(obj, ...)

Validates the object data type matches the Arthur value type

get_first_elem_if_valid_list(obj, source, ...)

Validates obj is list-like and non-empty and returns the first element.

obj_value_type_mismatch_err(attr_name, ...)

Returns UserTypeError with data type mismatch message :param: attr_name: Name of attribute whose value type has been mismatched with a column's data type :param: expected: String representing expected data type for the attribute :param: obj_type: String representing the object type that didn't match expected :raises: UnexpectedTypeError: Parameter was unexpectedly a None object.

valid_rec_obj(obj)

Validates recommendation object formatting

validate_attr_names(col_names)

Validates attribute names are correctly formatted

validate_series_data_type(series, attr)

Validates if the series data type matches the attribute's Arthur value type

validate_token_likelihoods_type(obj, source)

Validates obj data type matches TokenLikelihoods Value Type