arize-phoenix 3.25.0__py3-none-any.whl → 4.0.1__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-3.25.0.dist-info → arize_phoenix-4.0.1.dist-info}/METADATA +26 -4
- {arize_phoenix-3.25.0.dist-info → arize_phoenix-4.0.1.dist-info}/RECORD +80 -75
- phoenix/__init__.py +9 -5
- phoenix/config.py +109 -53
- phoenix/datetime_utils.py +18 -1
- phoenix/db/README.md +25 -0
- phoenix/db/__init__.py +4 -0
- phoenix/db/alembic.ini +119 -0
- phoenix/db/bulk_inserter.py +206 -0
- phoenix/db/engines.py +152 -0
- phoenix/db/helpers.py +47 -0
- phoenix/db/insertion/evaluation.py +209 -0
- phoenix/db/insertion/helpers.py +51 -0
- phoenix/db/insertion/span.py +142 -0
- phoenix/db/migrate.py +71 -0
- phoenix/db/migrations/env.py +121 -0
- phoenix/db/migrations/script.py.mako +26 -0
- phoenix/db/migrations/versions/cf03bd6bae1d_init.py +280 -0
- phoenix/db/models.py +371 -0
- phoenix/exceptions.py +5 -1
- phoenix/server/api/context.py +40 -3
- phoenix/server/api/dataloaders/__init__.py +97 -0
- phoenix/server/api/dataloaders/cache/__init__.py +3 -0
- phoenix/server/api/dataloaders/cache/two_tier_cache.py +67 -0
- phoenix/server/api/dataloaders/document_evaluation_summaries.py +152 -0
- phoenix/server/api/dataloaders/document_evaluations.py +37 -0
- phoenix/server/api/dataloaders/document_retrieval_metrics.py +98 -0
- phoenix/server/api/dataloaders/evaluation_summaries.py +151 -0
- phoenix/server/api/dataloaders/latency_ms_quantile.py +198 -0
- phoenix/server/api/dataloaders/min_start_or_max_end_times.py +93 -0
- phoenix/server/api/dataloaders/record_counts.py +125 -0
- phoenix/server/api/dataloaders/span_descendants.py +64 -0
- phoenix/server/api/dataloaders/span_evaluations.py +37 -0
- phoenix/server/api/dataloaders/token_counts.py +138 -0
- phoenix/server/api/dataloaders/trace_evaluations.py +37 -0
- phoenix/server/api/input_types/SpanSort.py +138 -68
- phoenix/server/api/routers/v1/__init__.py +11 -0
- phoenix/server/api/routers/v1/evaluations.py +275 -0
- phoenix/server/api/routers/v1/spans.py +126 -0
- phoenix/server/api/routers/v1/traces.py +82 -0
- phoenix/server/api/schema.py +112 -48
- phoenix/server/api/types/DocumentEvaluationSummary.py +1 -1
- phoenix/server/api/types/Evaluation.py +29 -12
- phoenix/server/api/types/EvaluationSummary.py +29 -44
- phoenix/server/api/types/MimeType.py +2 -2
- phoenix/server/api/types/Model.py +9 -9
- phoenix/server/api/types/Project.py +240 -171
- phoenix/server/api/types/Span.py +87 -131
- phoenix/server/api/types/Trace.py +29 -20
- phoenix/server/api/types/pagination.py +151 -10
- phoenix/server/app.py +263 -35
- phoenix/server/grpc_server.py +93 -0
- phoenix/server/main.py +75 -60
- phoenix/server/openapi/docs.py +218 -0
- phoenix/server/prometheus.py +23 -7
- phoenix/server/static/index.js +662 -643
- phoenix/server/telemetry.py +68 -0
- phoenix/services.py +4 -0
- phoenix/session/client.py +34 -30
- phoenix/session/data_extractor.py +8 -3
- phoenix/session/session.py +176 -155
- phoenix/settings.py +13 -0
- phoenix/trace/attributes.py +349 -0
- phoenix/trace/dsl/README.md +116 -0
- phoenix/trace/dsl/filter.py +660 -192
- phoenix/trace/dsl/helpers.py +24 -5
- phoenix/trace/dsl/query.py +562 -185
- phoenix/trace/fixtures.py +69 -7
- phoenix/trace/otel.py +44 -200
- phoenix/trace/schemas.py +14 -8
- phoenix/trace/span_evaluations.py +5 -2
- phoenix/utilities/__init__.py +0 -26
- phoenix/utilities/span_store.py +0 -23
- phoenix/version.py +1 -1
- phoenix/core/project.py +0 -773
- phoenix/core/traces.py +0 -96
- phoenix/datasets/dataset.py +0 -214
- phoenix/datasets/fixtures.py +0 -24
- phoenix/datasets/schema.py +0 -31
- phoenix/experimental/evals/__init__.py +0 -73
- phoenix/experimental/evals/evaluators.py +0 -413
- phoenix/experimental/evals/functions/__init__.py +0 -4
- phoenix/experimental/evals/functions/classify.py +0 -453
- phoenix/experimental/evals/functions/executor.py +0 -353
- phoenix/experimental/evals/functions/generate.py +0 -138
- phoenix/experimental/evals/functions/processing.py +0 -76
- phoenix/experimental/evals/models/__init__.py +0 -14
- phoenix/experimental/evals/models/anthropic.py +0 -175
- phoenix/experimental/evals/models/base.py +0 -170
- phoenix/experimental/evals/models/bedrock.py +0 -221
- phoenix/experimental/evals/models/litellm.py +0 -134
- phoenix/experimental/evals/models/openai.py +0 -453
- phoenix/experimental/evals/models/rate_limiters.py +0 -246
- phoenix/experimental/evals/models/vertex.py +0 -173
- phoenix/experimental/evals/models/vertexai.py +0 -186
- phoenix/experimental/evals/retrievals.py +0 -96
- phoenix/experimental/evals/templates/__init__.py +0 -50
- phoenix/experimental/evals/templates/default_templates.py +0 -472
- phoenix/experimental/evals/templates/template.py +0 -195
- phoenix/experimental/evals/utils/__init__.py +0 -172
- phoenix/experimental/evals/utils/threads.py +0 -27
- phoenix/server/api/routers/evaluation_handler.py +0 -110
- phoenix/server/api/routers/span_handler.py +0 -70
- phoenix/server/api/routers/trace_handler.py +0 -60
- phoenix/storage/span_store/__init__.py +0 -23
- phoenix/storage/span_store/text_file.py +0 -85
- phoenix/trace/dsl/missing.py +0 -60
- {arize_phoenix-3.25.0.dist-info → arize_phoenix-4.0.1.dist-info}/WHEEL +0 -0
- {arize_phoenix-3.25.0.dist-info → arize_phoenix-4.0.1.dist-info}/licenses/IP_NOTICE +0 -0
- {arize_phoenix-3.25.0.dist-info → arize_phoenix-4.0.1.dist-info}/licenses/LICENSE +0 -0
- /phoenix/{datasets → db/insertion}/__init__.py +0 -0
- /phoenix/{experimental → db/migrations}/__init__.py +0 -0
- /phoenix/{storage → server/openapi}/__init__.py +0 -0
phoenix/trace/dsl/helpers.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import warnings
|
|
1
2
|
from datetime import datetime
|
|
2
3
|
from typing import List, Optional, Protocol, Union, cast
|
|
3
4
|
|
|
@@ -28,7 +29,7 @@ class CanQuerySpans(Protocol):
|
|
|
28
29
|
self,
|
|
29
30
|
*query: SpanQuery,
|
|
30
31
|
start_time: Optional[datetime] = None,
|
|
31
|
-
|
|
32
|
+
end_time: Optional[datetime] = None,
|
|
32
33
|
project_name: Optional[str] = None,
|
|
33
34
|
) -> Optional[Union[pd.DataFrame, List[pd.DataFrame]]]: ...
|
|
34
35
|
|
|
@@ -36,10 +37,19 @@ class CanQuerySpans(Protocol):
|
|
|
36
37
|
def get_retrieved_documents(
|
|
37
38
|
obj: CanQuerySpans,
|
|
38
39
|
start_time: Optional[datetime] = None,
|
|
39
|
-
|
|
40
|
+
end_time: Optional[datetime] = None,
|
|
40
41
|
project_name: Optional[str] = None,
|
|
42
|
+
# Deprecated
|
|
43
|
+
stop_time: Optional[datetime] = None,
|
|
41
44
|
) -> pd.DataFrame:
|
|
42
45
|
project_name = project_name or get_env_project_name()
|
|
46
|
+
if stop_time is not None:
|
|
47
|
+
# Deprecated. Raise a warning
|
|
48
|
+
warnings.warn(
|
|
49
|
+
"stop_time is deprecated. Use end_time instead.",
|
|
50
|
+
DeprecationWarning,
|
|
51
|
+
)
|
|
52
|
+
end_time = end_time or stop_time
|
|
43
53
|
return cast(
|
|
44
54
|
pd.DataFrame,
|
|
45
55
|
obj.query_spans(
|
|
@@ -52,7 +62,7 @@ def get_retrieved_documents(
|
|
|
52
62
|
document_score=DOCUMENT_SCORE,
|
|
53
63
|
),
|
|
54
64
|
start_time=start_time,
|
|
55
|
-
|
|
65
|
+
end_time=end_time,
|
|
56
66
|
project_name=project_name,
|
|
57
67
|
),
|
|
58
68
|
)
|
|
@@ -61,10 +71,19 @@ def get_retrieved_documents(
|
|
|
61
71
|
def get_qa_with_reference(
|
|
62
72
|
obj: CanQuerySpans,
|
|
63
73
|
start_time: Optional[datetime] = None,
|
|
64
|
-
|
|
74
|
+
end_time: Optional[datetime] = None,
|
|
65
75
|
project_name: Optional[str] = None,
|
|
76
|
+
# Deprecated
|
|
77
|
+
stop_time: Optional[datetime] = None,
|
|
66
78
|
) -> pd.DataFrame:
|
|
67
79
|
project_name = project_name or get_env_project_name()
|
|
80
|
+
if stop_time:
|
|
81
|
+
# Deprecated. Raise a warning
|
|
82
|
+
warnings.warn(
|
|
83
|
+
"stop_time is deprecated. Use end_time instead.",
|
|
84
|
+
DeprecationWarning,
|
|
85
|
+
)
|
|
86
|
+
end_time = end_time or stop_time
|
|
68
87
|
return pd.concat(
|
|
69
88
|
cast(
|
|
70
89
|
List[pd.DataFrame],
|
|
@@ -78,7 +97,7 @@ def get_qa_with_reference(
|
|
|
78
97
|
reference=DOCUMENT_CONTENT,
|
|
79
98
|
),
|
|
80
99
|
start_time=start_time,
|
|
81
|
-
|
|
100
|
+
end_time=end_time,
|
|
82
101
|
project_name=project_name,
|
|
83
102
|
),
|
|
84
103
|
),
|