-
Notifications
You must be signed in to change notification settings - Fork 302
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
Error if continuous training data contains null values #428
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #428 +/- ##
==========================================
+ Coverage 85.25% 85.46% +0.20%
==========================================
Files 10 11 +1
Lines 780 791 +11
==========================================
+ Hits 665 676 +11
Misses 115 115
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
tests/unit/synthesizer/test_ctgan.py
Outdated
Setup: | ||
- Create dataframe with a continuous column | ||
- Create numpy array with same data | ||
- Create dataframe with a discrete column | ||
- Create numpy array with a discrete column | ||
|
||
Input: | ||
- train_data = 2-dimensional numpy array or a pandas.DataFrame | ||
- discrete_columns = list of strings or integers | ||
|
||
Output: | ||
None | ||
|
||
Side Effects: | ||
- Raises error if a continuous column contains a null value. | ||
|
||
Note: | ||
- could create another function for numpy array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: this is an old doc style we don't use anymore, you can just have the summary for new tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
discrete_columns = ['discrete'] | ||
|
||
ctgan = CTGAN(epochs=1) | ||
with pytest.raises(InvalidDataError): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add # Run and Assert
You could also check the error message here
Fixes #414
CU-86b2pdt0b