You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases, the RegexGenerator may be asked to create more regexes than there are unique possibilities. In this case, it will produce a warning indicating that the IDs may repeat. The message also includes the total number of unique possibilities. This total number is formatted as an imaginary number instead of an integer, which is confusing to users.
In the example below, the RegexGenerator correctly concludes that there 6 possibilities yet it represents the number as 6+0j.
/usr/local/lib/python3.10/dist-packages/rdt/transformers/text.py:164: UserWarning:
The data has 10 rows but the regex for 'ID' can only create (6+0j) unique values.
Some values in 'ID' may be repeated.
Expected Behavior
The warning should be an info.log message instead. There is nothing concerning about duplicating Regex values if the unique enforcement flag is off (default).
The number should be represented as an integer instead of an imaginary number and it should not be inside parenthesis (see below).
Info log:
The data has 10 rows but the regex for 'ID' can only create 6 unique values.
Some values in 'ID' may be repeated.
npatki
changed the title
Regex formatter's gives a confusing message: # of possibilities are shown as an imaginary number
RegexGenerator gives a confusing message: # of possibilities are shown as an imaginary number
Jan 3, 2024
Environment Details
Error Description
In some cases, the RegexGenerator may be asked to create more regexes than there are unique possibilities. In this case, it will produce a warning indicating that the IDs may repeat. The message also includes the total number of unique possibilities. This total number is formatted as an imaginary number instead of an integer, which is confusing to users.
In the example below, the RegexGenerator correctly concludes that there 6 possibilities yet it represents the number as
6+0j
.Expected Behavior
Steps to reproduce
Related Issue
This was first observed in SDV Issue 1729.
The text was updated successfully, but these errors were encountered: