I have Phoenix server 11.32.1 running in Docker but my Python client is 10.13.2. I'm getting 'Client' object has no attribute 'annotations' when trying to log evaluation results. from examples I should be able to use" await px_client.annotations.log_span_annotations_dataframe(...)" What's the correct way to log evaluation annotations
The error occurs because in Phoenix client versions ≥1.17.0, the annotations API is deprecated and replaced by resource-based APIs. You should use px_client.spans.log_span_annotations_dataframe(...) instead of px_client.annotations.log_span_annotations_dataframe(...). The correct method is: LBKSfrom phoenix.client import Client px_client = Client() px_client.spans.log_span_annotations_dataframe( dataframe=your_eval_df, annotation_name="Your Eval Name", annotator_kind="LLM", )LBKSSee client migration guide and official docs for details.Would you like more detail or async usage examples?Sources:
- client migration guide
- official docs: LLM evaluations
💡 Hint: Mention RunLLM in the thread for followups.
The method px_client.spans.log_span_annotations_dataframe() doesn't exist in Phoenix 11.34.0.
I'm on Phoenix client 11.34.0 and server 11.32.1. You told me to use px_client.spans.log_span_annotations_dataframe() but this method doesn't exist. The actual available methods on px_client.spans are:
get_span_annotations
get_span_annotations_dataframe
get_spans
get_spans_dataframe
log_spans
log_spans_dataframe
There is no method for logging annotations that I an see here. How do I actually log evaluation results/annotations to Phoenix in version 11.34.0
Getting in to another problem, trying to log llmevaluation results using client.log_evaluations() but getting "422 Unprocessable Entity". My setup:
Phoenix server: 11.32.1 (Docker)
Phoenix client: 11.34.0
Using: px.Client(endpoint="http://localhost:6006").log_evaluations(df)
DataFrame format I'm trying: python
pd.DataFrame({
'span_id': ['946bd4893035eb92'],
'name': ['Tool Usage Evaluation'],
'label': ['correct'],
'score': [1.0],
'explanation': ['Test evaluation']
})What's the correct DataFrame schema for log_evaluations() in Phoenix 11.32.1?
The tutorials dont seem to be updated with the versioning and how things should wrok
Hey GGhiasi - sorry about the version issues in our tutorials there. We'll switch over those tutorials ASAP. cc Sanjana Y.
In general GGhiasi everything is moving to this method https://arize-phoenix.readthedocs.io/projects/client/en/latest/api/spans.html#client.resources.spans.Spans.log_span_annotations
in the new client, there is no log_evaluations as it's just an annotation that's added via an LLM judge.
