Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KS Test Error Handling #131

Open
npatki opened this issue May 23, 2022 · 0 comments
Open

KS Test Error Handling #131

npatki opened this issue May 23, 2022 · 0 comments
Labels
feature request Request for a new feature

Comments

@npatki
Copy link
Contributor

npatki commented May 23, 2022

Problem Description

As a user, I want only the relevant errors surfaced to me and expected behavior to be suppressed.

For now, focus on the KS Test metric (see #129 and #130 for more details)

Expected behavior

  • Create a new MetricComputationError to be used when there is a mathematical error when computing the metric (eg. when calling scipy or dividing by zero)

For tabular and relational tests compute method:

  • If there are 0 columns with valid data types, return None and throw a warning. This is not an error; the metric is simply undefined.
>>> InvertedKSTest.compute(real_data, synthetic_data, metadata)
Warning: Incompatible data types. The InvertedKSTest is only defined for column types ['datetime', 'numerical']. None were found in the data.
None
  • If the entire test is resulting in mathematical errors (eg all results are invalid), throw a MetricComputationError
>>> InvertedKSTest.compute(real_data, synthetic_data, metadata)
MetricComputationError: <message>
  • However, if only certain columns are returning a MetricComputationError, show a warning but keep going with the other columns
>>> InvertedKSTest.compute(real_data, synthetic_data, metadata)
Warning: InvertedKSTest returned a MetricComputationError for column 'user_age'. Skipping this column.
Warning: InvertedKSTest returned a MetricComputationError for column 'weight'. Skipping this column.
0.699382
@npatki npatki added new feature pending review This issue needs to be further reviewed, so work cannot be started labels May 23, 2022
@npatki npatki added feature request Request for a new feature and removed pending review This issue needs to be further reviewed, so work cannot be started new feature labels Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

1 participant