sdv-dev/RDT

When no rounding scheme is detected, log the info instead of showing a warning

npatki opened this issue · 0 comments

npatki commented

Problem Description

Sometimes when I create synthetic data through the SDV, I have data that does not have any rounding scheme. During fitting, I receive a lot of warnings to tell me that a rounding scheme has not been detected. Such warnings are unnecessary because there is nothing I can do about this. It also breaks up the progress bar.

synthesizer.fit(data)

Preprocess Tables:   0%|          | 0/5 [00:00<?, ?it/s]/usr/local/lib/python3.10/dist-packages/rdt/transformers/numerical.py:112: UserWarning: No rounding scheme detected for column 'A'. Data will not be rounded.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/rdt/transformers/numerical.py:112: UserWarning: No rounding scheme detected for column 'B'. Data will not be rounded.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/rdt/transformers/numerical.py:112: UserWarning: No rounding scheme detected for column 'C'. Data will not be rounded.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/rdt/transformers/numerical.py:112: UserWarning: No rounding scheme detected for column 'D'. Data will not be rounded.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/rdt/transformers/numerical.py:112: UserWarning: No rounding scheme detected for column 'E'. Data will not be rounded.
  warnings.warn(
Preprocess Tables:  20%|██        | 1/5 [00:00<00:01,  3.63it/s]/usr/local/lib/python3.10/dist-packages/rdt/transformers/numerical.py:112: UserWarning: No rounding scheme detected for column 'F'. Data will not be rounded.

Expected behavior

If the rounding enforcement is on and we do not detect a rounding scheme, then we should log an INFO message instead of showing the warnings to users.

Warnings should be shown if usage is incorrect or if there is something pertinent to the outcome that the user should be able to change.