-
Notifications
You must be signed in to change notification settings - Fork 303
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
Use HierarchicalSampler mixin with HMA #1449
Use HierarchicalSampler mixin with HMA #1449
Conversation
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #1449 +/- ##
==========================================
+ Coverage 96.19% 96.33% +0.13%
==========================================
Files 49 49
Lines 3992 3925 -67
==========================================
- Hits 3840 3781 -59
+ Misses 152 144 -8
☔ View full report in Codecov by Sentry. |
b254d40
to
6661b9a
Compare
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.
Looks good to me ⚡
@@ -68,7 +68,7 @@ def _sample_rows(self, synthesizer, num_rows=None): | |||
Sampled rows, shape (, num_rows) | |||
""" | |||
num_rows = num_rows or synthesizer._num_rows | |||
return synthesizer._sample_batch(num_rows, remove_extra_columns=False) | |||
return synthesizer._sample_batch(int(num_rows), keep_extra_columns=True) |
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.
@amontanez24 @pvk-developer This line is an example where using an assert could be useful. num_rows
should always be an integer, and if it is not then wherever it was set did so incorrectly, so the code there should be updated to cast it to an int.
So at this point we should assert isinstance(num_rows, int)
, or change the docstring to say that num_rows
can be a float as well. You shouldn't have to write code assuming other methods/inputs are invalid, ie casting to int
in this case.
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.
Mostly minor comments! This is looking good :)
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.
I think this looks good!
98b7a83
to
757ea16
Compare
Resolve #1428