Error Storing Feedback in Phoenix with pytest: UTF-8 Codec Issues
I am trying to log evaluation metrics to Phoenix. I return the span id when I make the call and run the evaluation offline. I use the following function
def store_feedback_phoenix(span_id: str, passes_tests: int | bool, explanation: str = ""):
df = pd.DataFrame({"span_id": [span_id], "score": [passes_tests], "explanation": [explanation]})
try:
px.Client().log_evaluations(
SpanEvaluations(
dataframe=df,
eval_name="Regression Test",
)
)
except Exception as e:
print(e)I call it using
store_feedback_phoenix("f04791c5c7f2e6a6", 0, "This is a test")In a notebook it works fine, but when I run it as part of my test suite (as is, no changes, not even using real data but the exact same test) I get the following
quality.test_quality:test_quality.py:51 Error storing feedback in Phoenix: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byteAny idea what could be different when running this as part of a pytest?
