From 6093d2fde20a4a67257eabf6f46aa20440bf1a3f Mon Sep 17 00:00:00 2001 From: mohammadrezapourreza Date: Wed, 13 Mar 2024 11:32:37 -0400 Subject: [PATCH] DH-5584/updating the timeout --- dataherald/sql_generator/create_sql_query_status.py | 2 +- dataherald/sql_generator/dataherald_finetuning_agent.py | 2 +- dataherald/sql_generator/dataherald_sqlagent.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dataherald/sql_generator/create_sql_query_status.py b/dataherald/sql_generator/create_sql_query_status.py index 16ba6102..0eb05b9e 100644 --- a/dataherald/sql_generator/create_sql_query_status.py +++ b/dataherald/sql_generator/create_sql_query_status.py @@ -34,7 +34,7 @@ def create_sql_query_status( run_with_timeout( db.run_sql, args=(query,), - timeout_duration=int(os.getenv("SQL_EXECUTION_TIMEOUT", "30")), + timeout_duration=int(os.getenv("SQL_EXECUTION_TIMEOUT", "60")), ) sql_generation.status = "VALID" sql_generation.error = None diff --git a/dataherald/sql_generator/dataherald_finetuning_agent.py b/dataherald/sql_generator/dataherald_finetuning_agent.py index 968c6090..da2915bf 100644 --- a/dataherald/sql_generator/dataherald_finetuning_agent.py +++ b/dataherald/sql_generator/dataherald_finetuning_agent.py @@ -248,7 +248,7 @@ def _run( self.db.run_sql, args=(query,), kwargs={"top_k": TOP_K}, - timeout_duration=int(os.getenv("SQL_EXECUTION_TIMEOUT", "30")), + timeout_duration=int(os.getenv("SQL_EXECUTION_TIMEOUT", "60")), ) except TimeoutError: return "SQL query execution time exceeded, proceed without query execution" diff --git a/dataherald/sql_generator/dataherald_sqlagent.py b/dataherald/sql_generator/dataherald_sqlagent.py index de6b3312..1036cb1b 100644 --- a/dataherald/sql_generator/dataherald_sqlagent.py +++ b/dataherald/sql_generator/dataherald_sqlagent.py @@ -166,7 +166,7 @@ def _run( self.db.run_sql, args=(query,), kwargs={"top_k": top_k}, - timeout_duration=int(os.getenv("SQL_EXECUTION_TIMEOUT", "30")), + timeout_duration=int(os.getenv("SQL_EXECUTION_TIMEOUT", "60")), ) except TimeoutError: return "SQL query execution time exceeded, proceed without query execution"