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

Connected tabular generator with dataset_generator #324

Conversation

drahc1R
Copy link
Contributor

@drahc1R drahc1R commented Jul 31, 2023

Connected tabular generator with dataset_generator

@drahc1R drahc1R changed the title connected tabular generator with dataset_generator [WIP] connected tabular generator with dataset_generator Aug 1, 2023
synthetic_data/generators.py Outdated Show resolved Hide resolved
tests/test_generators.py Outdated Show resolved Hide resolved
tests/test_tabular_generator_integration Outdated Show resolved Hide resolved
tests/test_tabular_generator_integration Outdated Show resolved Hide resolved
auto-merge was automatically disabled August 7, 2023 13:44

Head branch was pushed to by a user without write access

synthetic_data/generators.py Outdated Show resolved Hide resolved
synthetic_data/generators.py Outdated Show resolved Hide resolved
# 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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
print(col_["format"], "SHOULD NOT BE EMPTY")

@@ -39,6 +39,10 @@ def random_text(
)
text_list = []

# edge case
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

synthetic_data/generators.py Outdated Show resolved Hide resolved
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will work on it

Copy link
Contributor

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

synthetic_data/generators.py Outdated Show resolved Hide resolved
auto-merge was automatically disabled August 8, 2023 14:40

Head branch was pushed to by a user without write access

Copy link
Contributor

@taylorfturner taylorfturner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines 136 to 140
# @staticmethod
# def setup_tabular_generator_mock(mock_generator):
# mock_DataLabeler = mock_generator.return_value

# TEST PARAM_BUILD
Copy link
Contributor

@taylorfturner taylorfturner Aug 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove / update

Comment on lines 397 to 446
# 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",
# }
# ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh?

auto-merge was automatically disabled August 9, 2023 19:02

Head branch was pushed to by a user without write access

@taylorfturner taylorfturner merged commit 0cc79fa into capitalone:feature/simple-tabular-generator Aug 9, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants