Hello, None of this code works for me despite using the latest versions packages from Phoenix when I try to fetch annotations span dataframe..Any idea why this is happening? What can I do to fetch spans along with annotations in Phoenix?
To fetch spans and their annotations in Phoenix, you must first retrieve the spans (e.g., using get_spans_dataframe), then separately fetch annotations using get_span_annotations_dataframe by passing either the spans dataframe or a list of span IDs. There is no single API call that returns both spans and their annotations together; you must join the two dataframes yourself. See the example below: LBKSfrom phoenix.client import Client client = Client() spans = client.spans.get_spans_dataframe(project_identifier="default") annotations = client.spans.get_span_annotations_dataframe(spans_dataframe=spans, project_identifier="default") result = annotations.join(spans, how="left")LBKSIf you are not seeing annotations, ensure you are using the correct project identifier and that your spans actually have annotations. Also, check that you are not filtering out annotation names unintentionally. For more, see the official Exporting Annotated Spans guide.Would you like a step-by-step troubleshooting guide?Sources:
- Exporting Annotated Spans guide
- Phoenix Annotations API Reference
馃挕聽Hint: Mention RunLLM in the thread for followups.
I want all spans with annotations...Not just one specific filtered type of annotation information
How can I get all annotations?
Try leaving out the where clause in the span query
So just like this and no where clause? query = spans.SpanQuery()
Like I mentioned in my first message...I get error saying client does not have attribute spans
My client is defined like this: client = px.Client(endpoint=endpoint)
How can I specifiy my endpoint in my client? We have self-hosted pheonix on Kubernetes
If I provide endpoint, it does not like that parameter and if I don't provide endpoint, then it doesn't connect with my pheonix instance..
My imports that worked for me were like this (which works for get_spans_df but not for annotation_dataframe).. import phoenix as px client = px.Client(endpoint=endpoint)
what is the ENV variable I need to set for endpoint?
Now it worked..Thank you
it's surprising that setting the endpoint didn't work for you
After setting the endpoint as Env variable, client worked for me as Sanjana mentioned..but could not specify endpoint as a parameter in client
