Skip to content

Commit

Permalink
Remove all prints
Browse files Browse the repository at this point in the history
  • Loading branch information
lajohn4747 committed May 1, 2024
1 parent 00ebb3a commit 68f8761
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
8 changes: 0 additions & 8 deletions sdv/data_processing/data_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,11 +841,7 @@ def reverse_transform(self, data, reset_keys=False):
for column in self._hyper_transformer._output_columns
if column in data.columns
]
print(f'All columns: {self._hyper_transformer._output_columns}')
print(f'columns in data: {data.columns}')
print(f'data into reverse_transformer: {data}')
reversed_data = data
print(f'reversible_columns before : {reversible_columns}')
try:
if not data.empty:
reversed_data = self._hyper_transformer.reverse_transform_subset(
Expand All @@ -854,8 +850,6 @@ def reverse_transform(self, data, reset_keys=False):
except rdt.errors.NotFittedError:
LOGGER.info(f'HyperTransformer has not been fitted for table {self.table_name}')

print(f'reversed_data.columns : {reversed_data.columns}')

for transformer in self.grouped_columns_to_transformers.values():
if not transformer.output_columns:
reversed_data = transformer.reverse_transform(reversed_data)
Expand All @@ -867,8 +861,6 @@ def reverse_transform(self, data, reset_keys=False):
for column in self.metadata.columns.keys() - set(sampled_columns + self._keys)
if self._hyper_transformer.field_transformers.get(column)
]
for col in missing_columns:
print(f'Col: {col} : {self._hyper_transformer.field_transformers.get(col)}')
if missing_columns and num_rows:
anonymized_data = self._hyper_transformer.create_anonymized_columns(
num_rows=num_rows,
Expand Down
2 changes: 0 additions & 2 deletions sdv/single_table/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,12 +606,10 @@ def _sample_rows(self, num_rows, conditions=None, transformed_conditions=None,
self._set_random_state(FIXED_RNG_SEED)

need_sample = self._data_processor.get_sdtypes(primary_keys=False) or keep_extra_columns
print(f'need_sample: {need_sample}')
if self._model and need_sample:

if conditions is None:
raw_sampled = self._sample(num_rows)
print(f'sampled rows: {raw_sampled.columns}')
else:
try:
raw_sampled = self._sample(num_rows, transformed_conditions)
Expand Down
2 changes: 1 addition & 1 deletion sdv/single_table/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def unflatten_dict(flat):

else:
subdict = unflattened.setdefault(key, {})
if subkey.isdigit():
if subkey.isdigit() and key != 'univariates':
subkey = int(subkey)

inner = subdict.setdefault(subkey, {})
Expand Down

0 comments on commit 68f8761

Please sign in to comment.