arize-phoenix 4.8.1__py3-none-any.whl → 4.10.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of arize-phoenix might be problematic. Click here for more details.
- {arize_phoenix-4.8.1.dist-info → arize_phoenix-4.10.0.dist-info}/METADATA +1 -1
- {arize_phoenix-4.8.1.dist-info → arize_phoenix-4.10.0.dist-info}/RECORD +32 -24
- phoenix/db/insertion/evaluation.py +7 -25
- phoenix/db/insertion/helpers.py +54 -13
- phoenix/db/insertion/span.py +12 -16
- phoenix/inferences/inferences.py +16 -4
- phoenix/pointcloud/umap_parameters.py +52 -52
- phoenix/server/api/input_types/CreateSpanAnnotationsInput.py +16 -0
- phoenix/server/api/input_types/CreateTraceAnnotationsInput.py +16 -0
- phoenix/server/api/input_types/DeleteAnnotationsInput.py +9 -0
- phoenix/server/api/input_types/PatchAnnotationsInput.py +17 -0
- phoenix/server/api/mutations/__init__.py +8 -1
- phoenix/server/api/mutations/project_mutations.py +1 -1
- phoenix/server/api/mutations/span_annotations_mutations.py +108 -0
- phoenix/server/api/mutations/trace_annotations_mutations.py +108 -0
- phoenix/server/api/queries.py +1 -0
- phoenix/server/api/routers/v1/__init__.py +2 -0
- phoenix/server/api/routers/v1/experiment_evaluations.py +3 -10
- phoenix/server/api/routers/v1/experiments.py +4 -5
- phoenix/server/api/routers/v1/spans.py +147 -2
- phoenix/server/api/routers/v1/traces.py +150 -1
- phoenix/server/api/types/AnnotatorKind.py +7 -1
- phoenix/server/api/types/ExperimentRunAnnotation.py +3 -3
- phoenix/server/api/types/SpanAnnotation.py +45 -0
- phoenix/server/api/types/TraceAnnotation.py +45 -0
- phoenix/server/static/index.js +532 -524
- phoenix/session/client.py +10 -8
- phoenix/trace/trace_dataset.py +23 -15
- phoenix/version.py +1 -1
- {arize_phoenix-4.8.1.dist-info → arize_phoenix-4.10.0.dist-info}/WHEEL +0 -0
- {arize_phoenix-4.8.1.dist-info → arize_phoenix-4.10.0.dist-info}/licenses/IP_NOTICE +0 -0
- {arize_phoenix-4.8.1.dist-info → arize_phoenix-4.10.0.dist-info}/licenses/LICENSE +0 -0
phoenix/session/client.py
CHANGED
|
@@ -68,12 +68,12 @@ class Client(TraceDataExtractor):
|
|
|
68
68
|
|
|
69
69
|
Args:
|
|
70
70
|
endpoint (str, optional): Phoenix server endpoint, e.g.
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
http://localhost:6006. If not provided, the endpoint will be
|
|
72
|
+
inferred from the environment variables.
|
|
73
73
|
|
|
74
74
|
headers (Mapping[str, str], optional): Headers to include in each
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
network request. If not provided, the headers will be inferred from
|
|
76
|
+
the environment variables (if present).
|
|
77
77
|
"""
|
|
78
78
|
if kwargs.pop("use_active_session_if_available", None) is not None:
|
|
79
79
|
print(
|
|
@@ -133,7 +133,8 @@ class Client(TraceDataExtractor):
|
|
|
133
133
|
using environment variables. If not provided, falls back to the default project.
|
|
134
134
|
|
|
135
135
|
Returns:
|
|
136
|
-
Union[pd.DataFrame, List[pd.DataFrame]]:
|
|
136
|
+
Union[pd.DataFrame, List[pd.DataFrame]]:
|
|
137
|
+
A pandas DataFrame or a list of pandas.
|
|
137
138
|
DataFrames containing the queried span data, or None if no spans are found.
|
|
138
139
|
"""
|
|
139
140
|
project_name = project_name or get_env_project_name()
|
|
@@ -191,7 +192,8 @@ class Client(TraceDataExtractor):
|
|
|
191
192
|
default project.
|
|
192
193
|
|
|
193
194
|
Returns:
|
|
194
|
-
List[Evaluations]:
|
|
195
|
+
List[Evaluations]:
|
|
196
|
+
A list of Evaluations objects containing evaluation data. Returns an
|
|
195
197
|
empty list if no evaluations are found.
|
|
196
198
|
"""
|
|
197
199
|
project_name = project_name or get_env_project_name()
|
|
@@ -341,10 +343,10 @@ class Client(TraceDataExtractor):
|
|
|
341
343
|
id (Optional[str]): An ID for the dataset.
|
|
342
344
|
|
|
343
345
|
name (Optional[str]): the name for the dataset. If provided, the ID
|
|
344
|
-
|
|
346
|
+
is ignored and the dataset is retrieved by name.
|
|
345
347
|
|
|
346
348
|
version_id (Optional[str]): An ID for the version of the dataset, or
|
|
347
|
-
|
|
349
|
+
None.
|
|
348
350
|
|
|
349
351
|
Returns:
|
|
350
352
|
A dataset object.
|
phoenix/trace/trace_dataset.py
CHANGED
|
@@ -101,6 +101,14 @@ class TraceDataset:
|
|
|
101
101
|
"""
|
|
102
102
|
A TraceDataset is a wrapper around a dataframe which is a flattened representation
|
|
103
103
|
of Spans. The collection of spans trace the LLM application's execution.
|
|
104
|
+
|
|
105
|
+
Typical usage example::
|
|
106
|
+
|
|
107
|
+
from phoenix.trace.utils import json_lines_to_df
|
|
108
|
+
|
|
109
|
+
with open("trace.jsonl", "r") as f:
|
|
110
|
+
trace_ds = TraceDataset(json_lines_to_df(f.readlines()))
|
|
111
|
+
px.launch_app(trace=trace_ds)
|
|
104
112
|
"""
|
|
105
113
|
|
|
106
114
|
name: str
|
|
@@ -122,15 +130,15 @@ class TraceDataset:
|
|
|
122
130
|
Constructs a TraceDataset from a dataframe of spans. Optionally takes in
|
|
123
131
|
evaluations for the spans in the dataset.
|
|
124
132
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
Args:
|
|
134
|
+
dataframe (pandas.DataFrame): The pandas dataframe containing the
|
|
135
|
+
tracing data. Each row of which is a flattened representation
|
|
136
|
+
of a span.
|
|
137
|
+
name (str): The name used to identify the dataset in the application.
|
|
138
|
+
If not provided, a random name will be generated.
|
|
139
|
+
evaluations (Optional[Iterable[SpanEvaluations]]): An optional list of
|
|
140
|
+
evaluations for the spans in the dataset. If provided, the evaluations
|
|
141
|
+
can be materialized into a unified dataframe as annotations.
|
|
134
142
|
"""
|
|
135
143
|
# Validate the the dataframe has required fields
|
|
136
144
|
if missing_columns := set(REQUIRED_COLUMNS) - set(dataframe.columns):
|
|
@@ -225,12 +233,12 @@ class TraceDataset:
|
|
|
225
233
|
|
|
226
234
|
Args:
|
|
227
235
|
directory (Optional[Union[str, Path]], optional): An optional path
|
|
228
|
-
|
|
229
|
-
|
|
236
|
+
to a directory where the data will be written. If not provided, the
|
|
237
|
+
data will be written to a default location.
|
|
230
238
|
|
|
231
239
|
Returns:
|
|
232
240
|
UUID: The id of the trace dataset, which can be used as key to load
|
|
233
|
-
|
|
241
|
+
the dataset from disk using `load`.
|
|
234
242
|
"""
|
|
235
243
|
directory = Path(directory or TRACE_DATASETS_DIR)
|
|
236
244
|
for evals in self.evaluations:
|
|
@@ -273,9 +281,9 @@ class TraceDataset:
|
|
|
273
281
|
id (Union[str, UUID]): The ID of the trace dataset to be loaded.
|
|
274
282
|
|
|
275
283
|
directory (Optional[Union[str, Path]], optional): The path to the
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
284
|
+
directory containing the persisted trace dataset parquet file. If
|
|
285
|
+
not provided, the parquet file will be loaded from the same default
|
|
286
|
+
location used by `save`.
|
|
279
287
|
|
|
280
288
|
Returns:
|
|
281
289
|
TraceDataset: The loaded trace dataset.
|
phoenix/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "4.
|
|
1
|
+
__version__ = "4.10.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|