hi team, any ide from this error? KeyError: "['attributes.input.value', 'attributes.retrieval.documents'] not in index" from my code
spans_df = px.Client().get_spans_dataframe()
spans_df[["name", "span_kind", "attributes.input.value", "attributes.retrieval.documents"]].head() The error KeyError: "['attributes.input.value', 'attributes.retrieval.documents'] not in index" indicates that the columns attributes.input.value and attributes.retrieval.documents are not present in the DataFrame returned by get_spans_dataframe().According to the Phoenix documentation, the get_spans_dataframe() method should return a DataFrame with these columns if the spans contain the relevant attributes. If these columns are missing, it could be due to the spans not having these attributes or an issue with the data retrieval.Would you like more detail on how to troubleshoot this issue?Sources:
- Phoenix documentation
💡 Hint: Mention RunLLM in the thread for followups.
this happen after i clear data in the UI, and run the evaluation again
is spans_df empty since no spans are left?
yes, when i print resulting:
Empty DataFrame
Columns: [name, span_kind, parent_id, start_time, end_time, status_code, status_message, events, context.span_id, context.trace_id]yea, those attributes. columns are derived from spans. without any spans to look at, it doesn’t know what columns to return
any solutions to fix this? i already deploy the UI in separate code, and want to evaluate the RAG in another code
are you able to send more spans?
the deleted ones can’t be recovered
already do this for 15 query response = query_engine.query(query) and after that i run code for spans df, and resulting error like above
are you seeing any spans in the UI?
this happen after i clear data in the UI
were those the data from the query engine?
no, just like this
if you click projects on the left hand side, how many projects show up?
and you had spans at some point, right? did those come from the query_engine?
just 1
