Skip to content

Commit

Permalink
update temp table name
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-tzayats committed Dec 10, 2024
1 parent c5547fc commit 95c7229
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion journeys/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand All @@ -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,
Expand Down

0 comments on commit 95c7229

Please sign in to comment.