phoenix
phoenix copied to clipboard
[BUG] attempting to load parquet tracing file throws ValueError
Describe the bug I attempted to re-load saved phoenix tracings and it failed with
To Reproduce Steps to reproduce the behavior:
- I imported libraries and configured tracing. This was following this notebook.
# Configuring OpenInference for tracing
from openinference.instrumentation.dspy import DSPyInstrumentor
from opentelemetry import trace as trace_api
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk import trace as trace_sdk
from opentelemetry.sdk.resources import Resource
from opentelemetry.sdk.trace.export import SimpleSpanProcessor
endpoint = "http://127.0.0.1:6006/v1/traces"
resource = Resource(attributes={})
tracer_provider = trace_sdk.TracerProvider(resource=resource)
span_otlp_exporter = OTLPSpanExporter(endpoint=endpoint)
tracer_provider.add_span_processor(SimpleSpanProcessor(span_exporter=span_otlp_exporter))
trace_api.set_tracer_provider(tracer_provider=tracer_provider)
DSPyInstrumentor().instrument()
While my DSPy program was compiling, I was able to view the local phoenix server and tracings.
- I successfully saved the tracings:
import phoenix as px
my_traces = px.Client().get_trace_dataset().save('/Users/abriel/repos/project/experiments/dspy/data/phoenix_traces')
- I closed the notebook and attempted to re-load the saved tracings as follows:
px.launch_app(trace=px.TraceDataset.load('52f48ccc-1fba-440b-ade8-ba8b16d266bf', directory="/Users/abriel/repos/project/experiments/dspy/data/phoenix_traces/"))
The following error was thrown:
ValueError Traceback (most recent call last)
Cell In[3], line 3
1 # Attempting to reload saved phoenix traces
2 import phoenix as px
----> 3 px.launch_app(trace=px.TraceDataset.load('52f48ccc-1fba-440b-ade8-ba8b16d266bf', directory="/Users/abriel/repos/project/experiments/dspy/data/phoenix_traces/"))
File ~/miniforge3/envs/project-venv/lib/python3.12/site-packages/phoenix/session/session.py:567, in launch_app(primary, reference, corpus, trace, default_umap_parameters, host, port, run_in_thread, notebook_environment, use_temp_dir)
564 database_url = get_env_database_connection_str()
566 if run_in_thread:
--> 567 _session = ThreadSession(
568 database_url,
569 primary,
570 reference,
571 corpus,
572 trace,
573 default_umap_parameters,
574 host=host,
575 port=port,
576 notebook_env=nb_env,
577 )
578 # TODO: catch exceptions from thread
579 else:
580 _session = ProcessSession(
581 database_url,
...
207 "conversation": row.get("conversation"),
208 }
209 )
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Expected behavior I expected the tracings to load and phoenix local server to start up.
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
- OS: MacOS (Sonoma 14.6)
- Notebook Runtime Jupyter
- Browser chrome
- Version [e.g. 0.0.1] arize-phoenix 4.33.1 arize-phoenix-evals 0.15.1 arize-phoenix-otel 0.4.1
Additional context The DSPy program optimization did fail prior to completion, but I'm not sure why that would effect loading the tracings as saving them was successful.