Skip to content

Commit

Permalink
text2sql metric: returning gold sql exec error
Browse files Browse the repository at this point in the history
Signed-off-by: Oktie Hassanzadeh <[email protected]>
  • Loading branch information
oktie committed Feb 14, 2025
1 parent 7776710 commit eb09a0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/unitxt/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -6326,7 +6326,7 @@ def get_sql_execution_results(
# "Error executing gold SQL, if gold does not execute metric should fail"
# ) from e
gold_error = f"Error executing gold SQL: {e}"
if gold_res is None or gold_error is not None:
if gold_error is not None:
return (
0,
0,
Expand All @@ -6339,7 +6339,7 @@ def get_sql_execution_results(
0,
"",
"",
"",
gold_error,
)

gold_df = pd.DataFrame(gold_res)
Expand Down

0 comments on commit eb09a0b

Please sign in to comment.