Skip to content

Commit

Permalink
log messages are added
Browse files Browse the repository at this point in the history
  • Loading branch information
Ijka committed Oct 29, 2024
1 parent 8130e07 commit 08c0086
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
13 changes: 10 additions & 3 deletions src/syngen/ml/handlers/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,17 @@ def handle(self, **kwargs):
if self.dataset.tech_columns:
tech_columns = list(self.dataset.tech_columns)
prepared_data = prepared_data.drop(tech_columns, axis=1)
logger.debug(
f"Technical columns "
f"{self.dataset.tech_columns} were dropped"
f" from the generated table"
)
Report().unregister_reporters(self.dataset.table_name)
logger.debug(f"Technical columns "
f"{self.dataset.tech_columns} are dropped"
f" from the generated table")
logger.info(
"Since there were no columns to train on, "
"reports will not be generated "
f"for the table '{self.dataset.table_name}'."
)

is_pk = self._is_pk()

Expand Down
12 changes: 8 additions & 4 deletions src/syngen/ml/vae/models/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1324,12 +1324,16 @@ def pipeline(self) -> pd.DataFrame:

# workaround for the case when all columns are dropped
# add a technical column to proceed with the training process
print(f'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
print(f"self.features: {self.features}")
if not self.features:
tech_column = "syngen_tech_column"
logger.warning(
f"There are no columns left to train on for '{self.table_name}'. "
f"Adding a technical column '{tech_column}' to proceed "
f"with the training process."
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."
)
self.df[tech_column] = 1
self._assign_float_feature(tech_column)
Expand Down

0 comments on commit 08c0086

Please sign in to comment.