Skip to content

Commit

Permalink
log messages modified
Browse files Browse the repository at this point in the history
  • Loading branch information
Ijka committed Oct 30, 2024
1 parent 2980e2e commit f98cfbd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
14 changes: 7 additions & 7 deletions src/syngen/ml/handlers/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,18 +495,18 @@ def handle(self, **kwargs):
prepared_data = self._restore_empty_columns(prepared_data)
# workaround for the case when all columns are dropped
# with technical column
if self.dataset.tech_columns:
tech_columns = list(self.dataset.tech_columns)
tech_columns = list(self.dataset.tech_columns)
if tech_columns:
prepared_data = prepared_data.drop(tech_columns, axis=1)
logger.debug(
f"Technical columns "
f"{tech_columns} were dropped"
f" from the generated table"
"Technical columns "
f"{tech_columns} were removed "
"from the generated table."
)
Report().unregister_reporters(self.table_name)
logger.info(
"Since there were no columns to train on, "
"reports will be not generated "
"Since there were no columns suitable for training, "
"reports will not be generated "
f"for the table '{self.table_name}'."
)

Expand Down
12 changes: 7 additions & 5 deletions src/syngen/ml/vae/models/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def __init__(
self.binary_columns: Set = set()
self.email_columns: Set = set()
self.long_text_columns: Set = set()
self.tech_columns: Set = set()
self.primary_keys_mapping: Dict = dict()
self.primary_keys_list: List = list()
self.primary_key_name: Optional[str] = None
Expand Down Expand Up @@ -1328,11 +1329,12 @@ def pipeline(self) -> pd.DataFrame:
tech_column = "syngen_tech_column"
logger.info(
f"Since all columns in the table '{self.table_name}' "
f"are uuid/key/long text columns, "
f"there are no suitable columns to train on. "
f"Technical column '{tech_column}' will be added to proceed "
f"with the training process and will be removed afterwards."
)
"are uuid/key/long text columns, "
"there are no suitable columns to train on. "
f"A technical column '{tech_column}' will be added "
"to proceed with the training process "
"and will be removed afterwards."
)
self.df[tech_column] = 1
self._assign_float_feature(tech_column)
self.tech_columns.add(tech_column)
Expand Down

0 comments on commit f98cfbd

Please sign in to comment.