-
Notifications
You must be signed in to change notification settings - Fork 162
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
HistogramOptions now named to HistogramAndQuantilesOptions
, implement num_quantiles
option to HistogramAndQuantilesOptions
#956
HistogramOptions now named to HistogramAndQuantilesOptions
, implement num_quantiles
option to HistogramAndQuantilesOptions
#956
Conversation
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.
Need to fix what this is based off of.
?? |
…es_option.py Co-authored-by: Taylor Turner <[email protected]>
Head branch was pushed to by a user without write access
Going to create a new PR for adding deprecated |
Head branch was pushed to by a user without write access
Head branch was pushed to by a user without write access
dataprofiler/tests/profilers/profiler_options/test_histogram_and_quantiles_option.py
Outdated
Show resolved
Hide resolved
…nd_quantiles_option.py Co-authored-by: Taylor Turner <[email protected]>
Head branch was pushed to by a user without write access
Head branch was pushed to by a user without write access
self.quantiles: list[float] | None = None | ||
self.quantiles: list[float] | dict = { | ||
bin_num: None for bin_num in range(self._num_quantiles - 1) | ||
} |
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.
☠️
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'm shook-eth
dataprofiler/tests/profilers/test_numeric_stats_mixin_profile.py
Outdated
Show resolved
Hide resolved
Head branch was pushed to by a user without write access
@@ -71,13 +81,58 @@ def _assert_set_helper(prop, value): | |||
with self.assertRaisesRegex(AttributeError, expected_error): | |||
option.set({"bin_count_or_method.is_enabled": True}) | |||
|
|||
# Treat num_quantiles as a BooleanOption | |||
expected_error = "type object 'num_quantiles' has no attribute " "'is_enabled'" |
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.
fix this spacing
int_options = FloatOptions() | ||
int_options.histogram_and_quantiles.bin_count_or_method = 5 | ||
int_options.histogram_and_quantiles.num_quantiles = 4 | ||
profiler = FloatColumn("0.0", int_options) |
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.
😢 bad naming.... but we should fix in this PR
float_options = FloatOptions() | ||
float_options.histogram_and_quantiles.bin_count_or_method = 5 | ||
float_options.histogram_and_quantiles.num_quantiles = 4 | ||
profiler = FloatColumn("0.0", float_options) |
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.
beauty!
…nt `num_quantiles` option to `HistogramAndQuantilesOptions` (#956) * Implemented options for `num_quantiles` feature in `NumericStatsMixin` * Implemented options for `num_quantiles.py`. * Added tests for `num_quantiles`. * Fixed tests for num_quantiles option in column profiles. * Added tests for num_quantiles option. * Update dataprofiler/tests/profilers/profiler_options/test_num_quantiles_option.py Co-authored-by: Taylor Turner <[email protected]> * Minor edits to tests * Empty commit * Precommits * Minor change to Makefile. * Got rid of print statements. * "empty commit" * Added deprecation for `HistogramOption`. * Cleaner deprecation: removed `HistogramOption` class. * json_decoder, test_h_a_q changes. * Fixed string bug for testing in test_histogram_and_quantiles * Explicitfied deprecation warning, validated profile conversion from histogramoption to histogramandquantilesoption in decoding phase. * Minor deprecation warning wording change. * Update dataprofiler/tests/profilers/profiler_options/test_histogram_and_quantiles_option.py Co-authored-by: Taylor Turner <[email protected]> * Changed deprecation warning. * Changed quantiles option to initialize to None. * Minor change * Minor change again D: * Minor change again again D: sadness --------- Co-authored-by: Taylor Turner <[email protected]>
…nt `num_quantiles` option to `HistogramAndQuantilesOptions` (capitalone#956) * Implemented options for `num_quantiles` feature in `NumericStatsMixin` * Implemented options for `num_quantiles.py`. * Added tests for `num_quantiles`. * Fixed tests for num_quantiles option in column profiles. * Added tests for num_quantiles option. * Update dataprofiler/tests/profilers/profiler_options/test_num_quantiles_option.py Co-authored-by: Taylor Turner <[email protected]> * Minor edits to tests * Empty commit * Precommits * Minor change to Makefile. * Got rid of print statements. * "empty commit" * Added deprecation for `HistogramOption`. * Cleaner deprecation: removed `HistogramOption` class. * json_decoder, test_h_a_q changes. * Fixed string bug for testing in test_histogram_and_quantiles * Explicitfied deprecation warning, validated profile conversion from histogramoption to histogramandquantilesoption in decoding phase. * Minor deprecation warning wording change. * Update dataprofiler/tests/profilers/profiler_options/test_histogram_and_quantiles_option.py Co-authored-by: Taylor Turner <[email protected]> * Changed deprecation warning. * Changed quantiles option to initialize to None. * Minor change * Minor change again D: * Minor change again again D: sadness --------- Co-authored-by: Taylor Turner <[email protected]>
PR changes:
HistogramOption
toHistogramAndQuantilesOption
HistogramAndQuantilesOption
now contains new attributenum_quantiles
HistogramOption
now deprecated, loadsHistogramAndQuantilesOption
injson_decoder
FloatColumnProfile
,TextColumnProfile
,IntColumnProfile
,NumericStatsMixinProfile
, andHistogramAndQuantilesOption