-
Notifications
You must be signed in to change notification settings - Fork 28
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
Connected tabular generator with dataset_generator #324
Connected tabular generator with dataset_generator #324
Conversation
… test between dataset_generator and get_ordered_column
Head branch was pushed to by a user without write access
… refactored uncorrelated_synthesize function, and implemented parameters test
synthetic_data/generators.py
Outdated
# edge cases for extracting data from profiler report. | ||
if generator_name == "datetime": | ||
col_["format"] = col_["statistics"].get("format", None) | ||
print(col_["format"], "SHOULD NOT BE EMPTY") |
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.
print(col_["format"], "SHOULD NOT BE EMPTY") |
@@ -39,6 +39,10 @@ def random_text( | |||
) | |||
text_list = [] | |||
|
|||
# edge 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.
+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.
this file still has a ton of commented out code... needs clean up
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.
will work on it
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.
got it -- still WIP on this file
…elated_synthesize private
Head branch was pushed to by a user without write access
…e uncorrelated_synthesize private" This reverts commit caabdbf.
…puts, and params_build
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
tests/test_generators.py
Outdated
# @staticmethod | ||
# def setup_tabular_generator_mock(mock_generator): | ||
# mock_DataLabeler = mock_generator.return_value | ||
|
||
# TEST PARAM_BUILD |
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.
remove / update
tests/test_generators.py
Outdated
# def test_generate_uncorrelated_with_invalid_generator(self): | ||
# columns_to_gen = [{"generator": "non existent generator"}] | ||
# with self.assertRaisesRegex( | ||
# ValueError, "generator: non existent generator is not a valid generator." | ||
# ): | ||
# TabularGenerator.generate_dataset( | ||
# self.rng, | ||
# columns_to_generate=columns_to_gen, | ||
# dataset_length=self.dataset_length, | ||
# ) | ||
|
||
|
||
# @mock.patch("synthetic_data.dataset_generator.logging.warning") | ||
# def test_generate_dataset_with_invalid_sorting_type(self, mock_warning): | ||
# columns_to_gen = [ | ||
# { | ||
# "generator": "integer", | ||
# "name": "int", | ||
# "min_value": 4, | ||
# "max_value": 88, | ||
# "order": "random", | ||
# } | ||
# ] | ||
# unsupported_sort_types = ["cheese", "random"] | ||
|
||
# for type in unsupported_sort_types: | ||
# columns_to_gen[0]["order"] = type | ||
# dataset_generator.generate_dataset( | ||
# self.rng, | ||
# columns_to_generate=columns_to_gen, | ||
# dataset_length=self.dataset_length, | ||
# ) | ||
# mock_warning.assert_called_with( | ||
# f"""{columns_to_gen[0]["name"]} is passed with sorting type of {columns_to_gen[0]["order"]}. | ||
# Ascending and descending are the only supported options. | ||
# No sorting action will be taken.""" | ||
# ) | ||
# self.assertEqual(mock_warning.call_count, 2) | ||
|
||
# @mock.patch("synthetic_data.dataset_generator.logging.warning") | ||
# def test_generate_dataset_with_valid_sorting_type(self, mock_warning): | ||
# columns_to_gen = [ | ||
# { | ||
# "generator": "integer", | ||
# "name": "int", | ||
# "min_value": 4, | ||
# "max_value": 88, | ||
# "order": "ascending", | ||
# } | ||
# ] |
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.
huh?
Head branch was pushed to by a user without write access
0cc79fa
into
capitalone:feature/simple-tabular-generator
Connected tabular generator with dataset_generator