From ecfa1f48ae26b229b36831bfdffae0cff4f1eaeb Mon Sep 17 00:00:00 2001 From: mohammadrezapourreza Date: Tue, 26 Mar 2024 11:53:38 -0400 Subject: [PATCH] DATA-2068/changing the logger method --- dataherald/sql_generator/dataherald_finetuning_agent.py | 2 +- dataherald/sql_generator/dataherald_sqlagent.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dataherald/sql_generator/dataherald_finetuning_agent.py b/dataherald/sql_generator/dataherald_finetuning_agent.py index 0ffd022a..e0ff4367 100644 --- a/dataherald/sql_generator/dataherald_finetuning_agent.py +++ b/dataherald/sql_generator/dataherald_finetuning_agent.py @@ -189,7 +189,7 @@ def similart_tables_based_on_few_shot_examples(self, df: pd.DataFrame) -> List[s try: tables = Parser(example["sql"]).tables except Exception as e: - logger.info(f"Error: {str(e)}") + logger.error(f"Error parsing SQL: {str(e)}") most_similar_tables.update(tables) df.drop(df[df.table_name.isin(most_similar_tables)].index, inplace=True) return most_similar_tables diff --git a/dataherald/sql_generator/dataherald_sqlagent.py b/dataherald/sql_generator/dataherald_sqlagent.py index 8914dda7..7d634138 100644 --- a/dataherald/sql_generator/dataherald_sqlagent.py +++ b/dataherald/sql_generator/dataherald_sqlagent.py @@ -250,7 +250,7 @@ def similart_tables_based_on_few_shot_examples(self, df: pd.DataFrame) -> List[s try: tables = Parser(example["sql"]).tables except Exception as e: - logger.info(f"Error: {str(e)}") + logger.error(f"Error parsing SQL: {str(e)}") most_similar_tables.update(tables) df.drop(df[df.table_name.isin(most_similar_tables)].index, inplace=True) return most_similar_tables