From 95c7229408a97e25aea815a97037183811b9f980 Mon Sep 17 00:00:00 2001 From: Tom Zayats Date: Tue, 10 Dec 2024 14:36:29 -0800 Subject: [PATCH] update temp table name --- journeys/evaluation.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/journeys/evaluation.py b/journeys/evaluation.py index ec01ffac..6f672a8c 100644 --- a/journeys/evaluation.py +++ b/journeys/evaluation.py @@ -5,6 +5,7 @@ from typing import Any import pandas as pd +import snowflake.snowpark._internal.utils as snowpark_utils import streamlit as st from loguru import logger from snowflake.connector.pandas_tools import write_pandas @@ -114,7 +115,6 @@ def _llm_judge(frame: pd.DataFrame) -> pd.DataFrame: return pd.DataFrame({"EXPLANATION": [], "CORRECT": []}) # create prompt frame series - table_name = "__LLM_JUDGE_TEMP_TABLE" col_name = "LLM_JUDGE_PROMPT" prompt_frame = frame.apply( @@ -126,6 +126,9 @@ def _llm_judge(frame: pd.DataFrame) -> pd.DataFrame: ), ).to_frame(name=col_name) conn = get_snowflake_connection() + table_name = snowpark_utils.random_name_for_temp_object( + snowpark_utils.TempObjectType.TABLE + ) _ = write_pandas( conn=conn, df=prompt_frame,