Skip to content

Commit

Permalink
fix the process of providing the information of the schema depending …
Browse files Browse the repository at this point in the history
…on the format of the generated data (#474)

* fix the process of providing the information of the schema depending on the format of the generated data

* update 'VERSION'

---------

Co-authored-by: Hanna Imshenetska <[email protected]@EVZZAMZSA0021.epam.com>
  • Loading branch information
Anna050689 and Hanna Imshenetska authored Oct 23, 2024
1 parent f090210 commit b24affb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/syngen/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.45
0.9.46
1 change: 1 addition & 0 deletions src/syngen/ml/data_loaders/data_loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ def _save_data(self, df: pd.DataFrame, schema: Optional[Dict]):

def save_data(self, df: pd.DataFrame, schema: Optional[Dict] = None, **kwargs):
if schema is not None:
logger.trace(f"The data will be saved with the schema: {schema}")
preprocessed_schema = (
self._get_preprocessed_schema(schema) if schema is not None else schema
)
Expand Down
5 changes: 0 additions & 5 deletions src/syngen/ml/handlers/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,11 +502,6 @@ def handle(self, **kwargs):
)
generated_data = generated_data[self.dataset.order_of_columns]

if self.original_schema:
logger.trace(
f"The synthetic data of the table - '{self.table_name}' "
f"will be saved with the schema: {self.original_schema}"
)
if generated_data is None:
DataLoader(self.paths["path_to_merged_infer"]).save_data(
prepared_data,
Expand Down

0 comments on commit b24affb

Please sign in to comment.