Skip to content

[SDV 2.0] Metadata validation does not error if out of range ordinal values in data #2986

Description

@frances-h

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions