Environment Details
Please indicate the following details about the environment in which you found the bug:
- SDV version:
- Python version:
- Operating System:
Error Description
Metadata validation should error if a column has range values and the data exceeds the given range. Passing out of range data for an ordinal column with range_values set does not raise the expected error.
If the ordinal data contains values that are not in the range_values list, metadata validation should error with: `Out of range values found for categorical column 'room_type': [{out of range values}].
Steps to reproduce
from sdv.datasets.demo import download_demo
data, metadata = download_demo('multi_table', 'fake_hotels')
metadata.update_column('room_type', 'guests', sdtype='ordinal', range_values=['BASIC', 'SUITE'])
metadata.validate_data(data)
Environment Details
Please indicate the following details about the environment in which you found the bug:
Error Description
Metadata validation should error if a column has range values and the data exceeds the given range. Passing out of range data for an ordinal column with
range_valuesset does not raise the expected error.If the ordinal data contains values that are not in the
range_valueslist, metadata validation should error with: `Out of range values found for categorical column 'room_type': [{out of range values}].Steps to reproduce