arize-phoenix 8.9.0__py3-none-any.whl → 8.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-8.9.0.dist-info → arize_phoenix-8.10.0.dist-info}/METADATA +4 -4
- {arize_phoenix-8.9.0.dist-info → arize_phoenix-8.10.0.dist-info}/RECORD +18 -17
- phoenix/experiments/types.py +2 -0
- phoenix/server/api/helpers/playground_clients.py +9 -2
- phoenix/server/api/mutations/__init__.py +3 -1
- phoenix/server/api/mutations/trace_mutations.py +74 -0
- phoenix/server/api/routers/v1/prompts.py +14 -2
- phoenix/server/app.py +1 -1
- phoenix/server/static/.vite/manifest.json +14 -14
- phoenix/server/static/assets/{components-C4AzQH6p.js → components-CVzKofML.js} +1 -1
- phoenix/server/static/assets/{index-DYSOLesW.js → index-Ctff7oin.js} +1 -1
- phoenix/server/static/assets/{pages-DEHszGOs.js → pages-CVFLHgre.js} +345 -337
- phoenix/server/static/assets/{vendor-arizeai-CLxvyk4B.js → vendor-arizeai-BiZagY4a.js} +21 -21
- phoenix/version.py +1 -1
- {arize_phoenix-8.9.0.dist-info → arize_phoenix-8.10.0.dist-info}/WHEEL +0 -0
- {arize_phoenix-8.9.0.dist-info → arize_phoenix-8.10.0.dist-info}/entry_points.txt +0 -0
- {arize_phoenix-8.9.0.dist-info → arize_phoenix-8.10.0.dist-info}/licenses/IP_NOTICE +0 -0
- {arize_phoenix-8.9.0.dist-info → arize_phoenix-8.10.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: arize-phoenix
|
|
3
|
-
Version: 8.
|
|
3
|
+
Version: 8.10.0
|
|
4
4
|
Summary: AI Observability and Evaluation
|
|
5
5
|
Project-URL: Documentation, https://docs.arize.com/phoenix/
|
|
6
6
|
Project-URL: Issues, https://github.com/Arize-ai/phoenix/issues
|
|
@@ -48,7 +48,7 @@ Requires-Dist: scipy
|
|
|
48
48
|
Requires-Dist: sqlalchemy[asyncio]<3,>=2.0.4
|
|
49
49
|
Requires-Dist: sqlean-py>=3.45.1
|
|
50
50
|
Requires-Dist: starlette
|
|
51
|
-
Requires-Dist: strawberry-graphql
|
|
51
|
+
Requires-Dist: strawberry-graphql>=0.262.0
|
|
52
52
|
Requires-Dist: tqdm
|
|
53
53
|
Requires-Dist: typing-extensions>=4.6
|
|
54
54
|
Requires-Dist: uvicorn
|
|
@@ -69,7 +69,7 @@ Requires-Dist: opentelemetry-sdk; extra == 'container'
|
|
|
69
69
|
Requires-Dist: opentelemetry-semantic-conventions; extra == 'container'
|
|
70
70
|
Requires-Dist: prometheus-client; extra == 'container'
|
|
71
71
|
Requires-Dist: py-grpc-prometheus; extra == 'container'
|
|
72
|
-
Requires-Dist: strawberry-graphql[opentelemetry]==0.
|
|
72
|
+
Requires-Dist: strawberry-graphql[opentelemetry]==0.262.0; extra == 'container'
|
|
73
73
|
Requires-Dist: umap-learn; extra == 'container'
|
|
74
74
|
Requires-Dist: uvloop; (platform_system != 'Windows') and extra == 'container'
|
|
75
75
|
Provides-Extra: dev
|
|
@@ -100,7 +100,7 @@ Requires-Dist: pytest-postgresql; extra == 'dev'
|
|
|
100
100
|
Requires-Dist: pytest-xdist; extra == 'dev'
|
|
101
101
|
Requires-Dist: pytest==8.3.3; extra == 'dev'
|
|
102
102
|
Requires-Dist: ruff==0.6.9; extra == 'dev'
|
|
103
|
-
Requires-Dist: strawberry-graphql[debug-server,opentelemetry]==0.
|
|
103
|
+
Requires-Dist: strawberry-graphql[debug-server,opentelemetry]==0.262.0; extra == 'dev'
|
|
104
104
|
Requires-Dist: tabulate; extra == 'dev'
|
|
105
105
|
Requires-Dist: tox-uv==1.11.3; extra == 'dev'
|
|
106
106
|
Requires-Dist: tox==4.18.1; extra == 'dev'
|
|
@@ -6,7 +6,7 @@ phoenix/exceptions.py,sha256=n2L2KKuecrdflB9MsCdAYCiSEvGJptIsfRkXMoJle7A,169
|
|
|
6
6
|
phoenix/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
7
7
|
phoenix/services.py,sha256=kpW1WL0kiB8XJsO6XycvZVJ-lBkNoenhQ7atCvBoSe8,5365
|
|
8
8
|
phoenix/settings.py,sha256=ht-0oN-sMV6SPXrk7Tu1EZlngpAYkGNLYPhO8DyrdQI,661
|
|
9
|
-
phoenix/version.py,sha256=
|
|
9
|
+
phoenix/version.py,sha256=wksB2Fuk1WwfEmtdei9zkvR3TbbzOltLZAcITFOP8sY,23
|
|
10
10
|
phoenix/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
phoenix/core/embedding_dimension.py,sha256=zKGbcvwOXgLf-yrJBpQyKtd-LEOPRKHnUToyAU8Owis,87
|
|
12
12
|
phoenix/core/model.py,sha256=qBFraOtmwCCnWJltKNP18DDG0mULXigytlFsa6YOz6k,4837
|
|
@@ -49,7 +49,7 @@ phoenix/db/types/model_provider.py,sha256=96UMeqiy5X9PmYMOWA6dZAmI_BSV3yVxt9HEVY
|
|
|
49
49
|
phoenix/experiments/__init__.py,sha256=6JGwgUd7xCbGpuHqYZlsmErmYvVgv7N_j43bn3dUqsk,123
|
|
50
50
|
phoenix/experiments/functions.py,sha256=QOwYNMO1qxG2bah4ZjJKMk7agFkZRWGvwyazLcwRCys,32573
|
|
51
51
|
phoenix/experiments/tracing.py,sha256=seNh9rBH-rtQe8_FPI_VJj1rbo3ADcP6wDvERkMoxNc,2858
|
|
52
|
-
phoenix/experiments/types.py,sha256=
|
|
52
|
+
phoenix/experiments/types.py,sha256=yntt6fnAny1U4Q9Y5Mm4ZYIb9319OaJovl-kyXFtGQE,23475
|
|
53
53
|
phoenix/experiments/utils.py,sha256=MZ1-OnTcavk_KUtbfGqt55Fk9TGtJpYG_K71WsN-zDk,785
|
|
54
54
|
phoenix/experiments/evaluators/__init__.py,sha256=CPWW1EiufLqc0JWghE4wVAPG_z6Wt4mD_-yf_4IckB4,772
|
|
55
55
|
phoenix/experiments/evaluators/base.py,sha256=zefFLqyYLMxJnZxDs1S0QCrnb43YJraoadCMqRMU72A,5576
|
|
@@ -80,7 +80,7 @@ phoenix/pointcloud/pointcloud.py,sha256=SN_1wXZcwKrtSnHGZLDZGx71orqE1WyVF7E-D58d
|
|
|
80
80
|
phoenix/pointcloud/projectors.py,sha256=TQgwc9cJDjJkin1WZyZzgl3HsYrLLiyWD7Czy4jNW3U,1088
|
|
81
81
|
phoenix/pointcloud/umap_parameters.py,sha256=db_WEPoamuWtopZx7tQfAXPnoE0MS8FkAV0_ThjEx_Q,1735
|
|
82
82
|
phoenix/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
83
|
-
phoenix/server/app.py,sha256=
|
|
83
|
+
phoenix/server/app.py,sha256=nAjMImoLpP051uTldLPw98ggOJY-1zZiIjlPsG3DyXs,39379
|
|
84
84
|
phoenix/server/bearer_auth.py,sha256=0UudvkAS_dxna5JEJJhGUYwB6Ny-e22ssX5Mm79QwCk,5907
|
|
85
85
|
phoenix/server/dml_event.py,sha256=MjJmVEKytq75chBOSyvYDusUnEbg1pHpIjR3pZkUaJA,2838
|
|
86
86
|
phoenix/server/dml_event_handler.py,sha256=EZLXmCvx4pJrCkz29gxwKwmvmUkTtPCHw6klR-XM8qE,8258
|
|
@@ -144,7 +144,7 @@ phoenix/server/api/dataloaders/cache/two_tier_cache.py,sha256=cmo8FUT3E91R139IEz
|
|
|
144
144
|
phoenix/server/api/helpers/__init__.py,sha256=m2-xaSPqUiSs91k62JaRDjFNfl-1byxBfY-m_Vxw16U,272
|
|
145
145
|
phoenix/server/api/helpers/dataset_helpers.py,sha256=DoMBTg-qXTnC_K4Evx1WKpCCYgRbITpVqyY-8efJRf0,8984
|
|
146
146
|
phoenix/server/api/helpers/experiment_run_filters.py,sha256=DOnVwrmn39eAkk2mwuZP8kIcAnR5jrOgllEwWSjsw94,29893
|
|
147
|
-
phoenix/server/api/helpers/playground_clients.py,sha256=
|
|
147
|
+
phoenix/server/api/helpers/playground_clients.py,sha256=lv8xoNNiNgfM58V5W1NrVzHgH2C8RRQWhjmNNud_nlg,41112
|
|
148
148
|
phoenix/server/api/helpers/playground_registry.py,sha256=CPLMziFB2wmr-dfbx7VbzO2f8YIG_k5RftzvGXYGQ1w,2570
|
|
149
149
|
phoenix/server/api/helpers/playground_spans.py,sha256=PjGNDc7cpqn5lmRM6TO_J1eVRGlgsNdQ8IT--5JVz0o,16881
|
|
150
150
|
phoenix/server/api/helpers/prompts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -188,7 +188,7 @@ phoenix/server/api/input_types/TimeRange.py,sha256=pwhC2jx6dFIgT0qFfnO68qiJp9-m7
|
|
|
188
188
|
phoenix/server/api/input_types/TraceAnnotationSort.py,sha256=BzwiUnMh2VsgQYnhDlbJ6ljHugqIS4YDUlYzvq_tl3o,365
|
|
189
189
|
phoenix/server/api/input_types/UserRoleInput.py,sha256=xxhFe0ITZOgRVEJbVem_W6F1Ip_H6xDENdQqMMx-kKE,129
|
|
190
190
|
phoenix/server/api/input_types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
191
|
-
phoenix/server/api/mutations/__init__.py,sha256=
|
|
191
|
+
phoenix/server/api/mutations/__init__.py,sha256=MlJPciihC5gwE0AVkaqZhYeVkaCuuq1EaDTrs1MRw2I,1560
|
|
192
192
|
phoenix/server/api/mutations/api_key_mutations.py,sha256=diNBL06zrFCmzR-leYbL-AxDqN05-YtbzsnsAdew_K8,6194
|
|
193
193
|
phoenix/server/api/mutations/chat_mutations.py,sha256=ChRh4YbNkBgFO05CNElzqJ1hIvo7lr5Zn0lvlRs51pE,22997
|
|
194
194
|
phoenix/server/api/mutations/dataset_mutations.py,sha256=V52mL0vizxL9cvWWBkmd19rGu8xvu-B8LOosZkROPIk,27004
|
|
@@ -200,6 +200,7 @@ phoenix/server/api/mutations/prompt_mutations.py,sha256=Yg-6L2PiKUZfFyNarptu3OdE
|
|
|
200
200
|
phoenix/server/api/mutations/prompt_version_tag_mutations.py,sha256=t77osYb5he2Am4UeNis7pzY9MnaA9PNEQhsQelRH8k8,5767
|
|
201
201
|
phoenix/server/api/mutations/span_annotations_mutations.py,sha256=sumBLUqRKlgMASWdWwYItmIJ2l7AyAp_PlIYeXYfguc,5970
|
|
202
202
|
phoenix/server/api/mutations/trace_annotations_mutations.py,sha256=sEcEt8hbMt8YMiRX5o3xcJ5rWWZbDeBPMNz2teZoi3U,5945
|
|
203
|
+
phoenix/server/api/mutations/trace_mutations.py,sha256=D5h2HYdlTo6yYZNq-O-PjaS9GeiZHxxVaOxDdh7fwjw,2957
|
|
203
204
|
phoenix/server/api/mutations/user_mutations.py,sha256=FgZXQjCqmJ_0dyqiXv6NoGF7TjOO2a0aX7xDMDKtl-A,13603
|
|
204
205
|
phoenix/server/api/openapi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
205
206
|
phoenix/server/api/openapi/main.py,sha256=yKdzJYI4cxy_1mFcK4_7YObIcuRviBIfwNjB23RG14k,461
|
|
@@ -216,7 +217,7 @@ phoenix/server/api/routers/v1/experiment_evaluations.py,sha256=vx4CKlE84sAL1vtPi
|
|
|
216
217
|
phoenix/server/api/routers/v1/experiment_runs.py,sha256=bInuasRv7ogiYf8fq-LwpJ5tptmMQsBNDlJAqwdymko,6378
|
|
217
218
|
phoenix/server/api/routers/v1/experiments.py,sha256=yJh48HSFjBB5PtQld9Kt2CxAYdpekl0jjIyeVHB30oE,15826
|
|
218
219
|
phoenix/server/api/routers/v1/models.py,sha256=r0nM2kFJ3mxDqgc5vFr1cjNuyOPs3RIKE_DS2VMdF48,1749
|
|
219
|
-
phoenix/server/api/routers/v1/prompts.py,sha256=
|
|
220
|
+
phoenix/server/api/routers/v1/prompts.py,sha256=ytK8HnOZNxUMDtC7XAFxzaTSM9DMMua13vWsqqd4PAw,14986
|
|
220
221
|
phoenix/server/api/routers/v1/spans.py,sha256=uoU_bwIgz86fuvPjP5sX8goDyuCcnsTig-x3f17p60U,9625
|
|
221
222
|
phoenix/server/api/routers/v1/traces.py,sha256=hSv35QIB4mwFgp53rOpz3zWIiSwbZzQnjafD790QuJU,7908
|
|
222
223
|
phoenix/server/api/routers/v1/utils.py,sha256=SoRl0Dc8By15ZckhNcXg2QRrqYjMvgTjVcqrZ6MwVmo,3065
|
|
@@ -313,13 +314,13 @@ phoenix/server/static/apple-touch-icon-76x76.png,sha256=CT_xT12I0u2i0WU8JzBZBuOQ
|
|
|
313
314
|
phoenix/server/static/apple-touch-icon.png,sha256=fOfpjqGpWYbJ0eAurKsyoZP1EAs6ZVooBJ_SGk2ZkDs,3801
|
|
314
315
|
phoenix/server/static/favicon.ico,sha256=bY0vvCKRftemZfPShwZtE93DiiQdaYaozkPGwNFr6H8,34494
|
|
315
316
|
phoenix/server/static/modernizr.js,sha256=mvK-XtkNqjOral-QvzoqsyOMECXIMu5BQwSVN_wcU9c,2564
|
|
316
|
-
phoenix/server/static/.vite/manifest.json,sha256=
|
|
317
|
-
phoenix/server/static/assets/components-
|
|
318
|
-
phoenix/server/static/assets/index-
|
|
319
|
-
phoenix/server/static/assets/pages-
|
|
317
|
+
phoenix/server/static/.vite/manifest.json,sha256=RVqrVl8ER15uOPhyqrvlOhvtDW4I4yqwKgetXJ7Ds9o,2165
|
|
318
|
+
phoenix/server/static/assets/components-CVzKofML.js,sha256=ncp4gOOq5QdYz_LBPdLy4zTPGIEEmmnQSfVjb8kd3KI,424183
|
|
319
|
+
phoenix/server/static/assets/index-Ctff7oin.js,sha256=msNwFX-LMi191AKNaA_wAUctTK-RewbdMkSsjn2FH-E,59207
|
|
320
|
+
phoenix/server/static/assets/pages-CVFLHgre.js,sha256=sJDoDq-r9tNwyH6b4SKJYyeymn29wCQ14hAl5ZPYJ90,840022
|
|
320
321
|
phoenix/server/static/assets/vendor-Cg6lcjUC.css,sha256=nZrkr0u6NNElFGvpWHk9GTHeGoibCXCli1bE7mXZGZg,1816
|
|
321
322
|
phoenix/server/static/assets/vendor-VJCVsFqd.js,sha256=d5PqgO3T3CRxy2q7Jk4b-1MVab_E3kKeDg3OtBILa0E,2265494
|
|
322
|
-
phoenix/server/static/assets/vendor-arizeai-
|
|
323
|
+
phoenix/server/static/assets/vendor-arizeai-BiZagY4a.js,sha256=v9L6kaDEhwTmE76ilfx5BJ89lGXjmyWft580Ei3vQ4Q,202788
|
|
323
324
|
phoenix/server/static/assets/vendor-codemirror-0mUqu36F.js,sha256=WOPvKseqLr9P1W5beQJSTX3m_6JIkbx7xjWWZK8qHeE,393496
|
|
324
325
|
phoenix/server/static/assets/vendor-recharts-CfKQSOmq.js,sha256=TWJ68mOSnbpn8XscPz1N3Zs-EkLLqYDtgQ25vDJCL4I,282095
|
|
325
326
|
phoenix/server/static/assets/vendor-shiki-BsgMOuir.js,sha256=cFiYo70OgEzfurmjGOmzkxAWdlOcSEfZBSY6RFqA0mk,8980312
|
|
@@ -363,9 +364,9 @@ phoenix/utilities/project.py,sha256=auVpARXkDb-JgeX5f2aStyFIkeKvGwN9l7qrFeJMVxI,
|
|
|
363
364
|
phoenix/utilities/re.py,sha256=6YyUWIkv0zc2SigsxfOWIHzdpjKA_TZo2iqKq7zJKvw,2081
|
|
364
365
|
phoenix/utilities/span_store.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
365
366
|
phoenix/utilities/template_formatters.py,sha256=gh9PJD6WEGw7TEYXfSst1UR4pWWwmjxMLrDVQ_CkpkQ,2779
|
|
366
|
-
arize_phoenix-8.
|
|
367
|
-
arize_phoenix-8.
|
|
368
|
-
arize_phoenix-8.
|
|
369
|
-
arize_phoenix-8.
|
|
370
|
-
arize_phoenix-8.
|
|
371
|
-
arize_phoenix-8.
|
|
367
|
+
arize_phoenix-8.10.0.dist-info/METADATA,sha256=WmPj1Vucp2RIf0uaIQHillrSRggnUxrtUJ_xdu8COGs,23739
|
|
368
|
+
arize_phoenix-8.10.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
369
|
+
arize_phoenix-8.10.0.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
|
|
370
|
+
arize_phoenix-8.10.0.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
|
|
371
|
+
arize_phoenix-8.10.0.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
|
|
372
|
+
arize_phoenix-8.10.0.dist-info/RECORD,,
|
phoenix/experiments/types.py
CHANGED
|
@@ -282,6 +282,8 @@ class ExperimentEvaluationRun:
|
|
|
282
282
|
ExperimentTask: TypeAlias = Union[
|
|
283
283
|
Callable[[Example], TaskOutput],
|
|
284
284
|
Callable[[Example], Awaitable[TaskOutput]],
|
|
285
|
+
Callable[..., JSONSerializable],
|
|
286
|
+
Callable[..., Awaitable[JSONSerializable]],
|
|
285
287
|
]
|
|
286
288
|
|
|
287
289
|
|
|
@@ -761,6 +761,13 @@ class AnthropicStreamingClient(PlaygroundStreamingClient):
|
|
|
761
761
|
import anthropic.types as anthropic_types
|
|
762
762
|
|
|
763
763
|
anthropic_messages, system_prompt = self._build_anthropic_messages(messages)
|
|
764
|
+
if (
|
|
765
|
+
"thinking" in invocation_parameters
|
|
766
|
+
and isinstance(invocation_parameters, dict)
|
|
767
|
+
and "type" in invocation_parameters["thinking"]
|
|
768
|
+
and invocation_parameters["thinking"]["type"] == "enabled"
|
|
769
|
+
):
|
|
770
|
+
invocation_parameters.pop("top_p", None)
|
|
764
771
|
anthropic_params = {
|
|
765
772
|
"messages": anthropic_messages,
|
|
766
773
|
"model": self.model_name,
|
|
@@ -810,9 +817,9 @@ class AnthropicStreamingClient(PlaygroundStreamingClient):
|
|
|
810
817
|
elif isinstance(event, anthropic_streaming._types.CitationEvent):
|
|
811
818
|
raise NotImplementedError
|
|
812
819
|
elif isinstance(event, anthropic_streaming._types.ThinkingEvent):
|
|
813
|
-
|
|
820
|
+
pass
|
|
814
821
|
elif isinstance(event, anthropic_streaming._types.SignatureEvent):
|
|
815
|
-
|
|
822
|
+
pass
|
|
816
823
|
else:
|
|
817
824
|
assert_never(event)
|
|
818
825
|
|
|
@@ -13,12 +13,14 @@ from phoenix.server.api.mutations.prompt_mutations import PromptMutationMixin
|
|
|
13
13
|
from phoenix.server.api.mutations.prompt_version_tag_mutations import PromptVersionTagMutationMixin
|
|
14
14
|
from phoenix.server.api.mutations.span_annotations_mutations import SpanAnnotationMutationMixin
|
|
15
15
|
from phoenix.server.api.mutations.trace_annotations_mutations import TraceAnnotationMutationMixin
|
|
16
|
+
from phoenix.server.api.mutations.trace_mutations import TraceMutationMixin
|
|
16
17
|
from phoenix.server.api.mutations.user_mutations import UserMutationMixin
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
@strawberry.type
|
|
20
21
|
class Mutation(
|
|
21
22
|
ApiKeyMutationMixin,
|
|
23
|
+
ChatCompletionMutationMixin,
|
|
22
24
|
DatasetMutationMixin,
|
|
23
25
|
ExperimentMutationMixin,
|
|
24
26
|
ExportEventsMutationMixin,
|
|
@@ -28,7 +30,7 @@ class Mutation(
|
|
|
28
30
|
PromptLabelMutationMixin,
|
|
29
31
|
SpanAnnotationMutationMixin,
|
|
30
32
|
TraceAnnotationMutationMixin,
|
|
33
|
+
TraceMutationMixin,
|
|
31
34
|
UserMutationMixin,
|
|
32
|
-
ChatCompletionMutationMixin,
|
|
33
35
|
):
|
|
34
36
|
pass
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import strawberry
|
|
2
|
+
from sqlalchemy import and_, delete, not_, select
|
|
3
|
+
from sqlalchemy.orm import load_only
|
|
4
|
+
from sqlalchemy.sql import literal
|
|
5
|
+
from strawberry.relay import GlobalID
|
|
6
|
+
from strawberry.types import Info
|
|
7
|
+
|
|
8
|
+
from phoenix.db import models
|
|
9
|
+
from phoenix.server.api.auth import IsNotReadOnly
|
|
10
|
+
from phoenix.server.api.context import Context
|
|
11
|
+
from phoenix.server.api.exceptions import BadRequest
|
|
12
|
+
from phoenix.server.api.queries import Query
|
|
13
|
+
from phoenix.server.api.types.node import from_global_id_with_expected_type
|
|
14
|
+
from phoenix.server.dml_event import SpanDeleteEvent
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@strawberry.type
|
|
18
|
+
class TraceMutationMixin:
|
|
19
|
+
@strawberry.mutation(permission_classes=[IsNotReadOnly]) # type: ignore
|
|
20
|
+
async def delete_traces(
|
|
21
|
+
self,
|
|
22
|
+
info: Info[Context, None],
|
|
23
|
+
trace_ids: list[GlobalID],
|
|
24
|
+
) -> Query:
|
|
25
|
+
if not trace_ids:
|
|
26
|
+
raise BadRequest("Must provide at least one trace ID to delete")
|
|
27
|
+
trace_ids = list(set(trace_ids))
|
|
28
|
+
try:
|
|
29
|
+
trace_rowids = [
|
|
30
|
+
from_global_id_with_expected_type(global_id=id, expected_type_name="Trace")
|
|
31
|
+
for id in trace_ids
|
|
32
|
+
]
|
|
33
|
+
except ValueError as error:
|
|
34
|
+
raise BadRequest(str(error))
|
|
35
|
+
async with info.context.db() as session:
|
|
36
|
+
traces = (
|
|
37
|
+
await session.scalars(
|
|
38
|
+
delete(models.Trace)
|
|
39
|
+
.where(models.Trace.id.in_(trace_rowids))
|
|
40
|
+
.returning(models.Trace)
|
|
41
|
+
.options(
|
|
42
|
+
load_only(models.Trace.project_rowid, models.Trace.project_session_rowid)
|
|
43
|
+
)
|
|
44
|
+
)
|
|
45
|
+
).all()
|
|
46
|
+
if len(traces) < len(trace_rowids):
|
|
47
|
+
await session.rollback()
|
|
48
|
+
raise BadRequest("Invalid trace IDs provided")
|
|
49
|
+
project_ids = tuple(set(trace.project_rowid for trace in traces))
|
|
50
|
+
if len(project_ids) > 1:
|
|
51
|
+
await session.rollback()
|
|
52
|
+
raise BadRequest("Cannot delete traces from multiple projects")
|
|
53
|
+
session_ids = set(
|
|
54
|
+
session_id
|
|
55
|
+
for trace in traces
|
|
56
|
+
if (session_id := trace.project_session_rowid) is not None
|
|
57
|
+
)
|
|
58
|
+
if session_ids:
|
|
59
|
+
await session.execute(
|
|
60
|
+
delete(models.ProjectSession).where(
|
|
61
|
+
and_(
|
|
62
|
+
models.ProjectSession.id.in_(session_ids),
|
|
63
|
+
not_(
|
|
64
|
+
select(literal(1))
|
|
65
|
+
.where(
|
|
66
|
+
models.Trace.project_session_rowid == models.ProjectSession.id
|
|
67
|
+
)
|
|
68
|
+
.exists()
|
|
69
|
+
),
|
|
70
|
+
)
|
|
71
|
+
)
|
|
72
|
+
)
|
|
73
|
+
info.context.event_queue.put(SpanDeleteEvent(project_ids))
|
|
74
|
+
return Query()
|
|
@@ -2,13 +2,13 @@ import logging
|
|
|
2
2
|
from typing import Any, Optional, Union
|
|
3
3
|
|
|
4
4
|
from fastapi import APIRouter, HTTPException, Path, Query
|
|
5
|
-
from pydantic import ValidationError
|
|
5
|
+
from pydantic import ValidationError, model_validator
|
|
6
6
|
from sqlalchemy import select
|
|
7
7
|
from sqlalchemy.sql import Select
|
|
8
8
|
from starlette.requests import Request
|
|
9
9
|
from starlette.status import HTTP_404_NOT_FOUND, HTTP_422_UNPROCESSABLE_ENTITY
|
|
10
10
|
from strawberry.relay import GlobalID
|
|
11
|
-
from typing_extensions import TypeAlias, assert_never
|
|
11
|
+
from typing_extensions import Self, TypeAlias, assert_never
|
|
12
12
|
|
|
13
13
|
from phoenix.db import models
|
|
14
14
|
from phoenix.db.types.identifier import Identifier
|
|
@@ -52,6 +52,18 @@ class PromptVersionData(V1RoutesBaseModel):
|
|
|
52
52
|
tools: Optional[PromptTools] = None
|
|
53
53
|
response_format: Optional[PromptResponseFormat] = None
|
|
54
54
|
|
|
55
|
+
@model_validator(mode="after")
|
|
56
|
+
def check_template_type_match(self) -> Self:
|
|
57
|
+
if self.template_type is PromptTemplateType.CHAT:
|
|
58
|
+
if self.template.type == "chat":
|
|
59
|
+
return self
|
|
60
|
+
elif self.template_type is PromptTemplateType.STRING:
|
|
61
|
+
if self.template.type == "string":
|
|
62
|
+
return self
|
|
63
|
+
else:
|
|
64
|
+
assert_never(self.template_type)
|
|
65
|
+
raise ValueError("Template type does not match template")
|
|
66
|
+
|
|
55
67
|
|
|
56
68
|
class PromptVersion(PromptVersionData):
|
|
57
69
|
id: str
|
phoenix/server/app.py
CHANGED
|
@@ -549,7 +549,7 @@ def create_graphql_router(
|
|
|
549
549
|
read_only: bool = False,
|
|
550
550
|
secret: Optional[str] = None,
|
|
551
551
|
token_store: Optional[TokenStore] = None,
|
|
552
|
-
) -> GraphQLRouter
|
|
552
|
+
) -> GraphQLRouter[Context, None]:
|
|
553
553
|
"""Creates the GraphQL router.
|
|
554
554
|
|
|
555
555
|
Args:
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_components-
|
|
3
|
-
"file": "assets/components-
|
|
2
|
+
"_components-CVzKofML.js": {
|
|
3
|
+
"file": "assets/components-CVzKofML.js",
|
|
4
4
|
"name": "components",
|
|
5
5
|
"imports": [
|
|
6
6
|
"_vendor-VJCVsFqd.js",
|
|
7
|
-
"_pages-
|
|
8
|
-
"_vendor-arizeai-
|
|
7
|
+
"_pages-CVFLHgre.js",
|
|
8
|
+
"_vendor-arizeai-BiZagY4a.js",
|
|
9
9
|
"_vendor-codemirror-0mUqu36F.js",
|
|
10
10
|
"_vendor-three-C-AGeJYv.js"
|
|
11
11
|
]
|
|
12
12
|
},
|
|
13
|
-
"_pages-
|
|
14
|
-
"file": "assets/pages-
|
|
13
|
+
"_pages-CVFLHgre.js": {
|
|
14
|
+
"file": "assets/pages-CVFLHgre.js",
|
|
15
15
|
"name": "pages",
|
|
16
16
|
"imports": [
|
|
17
17
|
"_vendor-VJCVsFqd.js",
|
|
18
|
-
"_vendor-arizeai-
|
|
19
|
-
"_components-
|
|
18
|
+
"_vendor-arizeai-BiZagY4a.js",
|
|
19
|
+
"_components-CVzKofML.js",
|
|
20
20
|
"_vendor-codemirror-0mUqu36F.js",
|
|
21
21
|
"_vendor-recharts-CfKQSOmq.js"
|
|
22
22
|
]
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"assets/vendor-Cg6lcjUC.css"
|
|
36
36
|
]
|
|
37
37
|
},
|
|
38
|
-
"_vendor-arizeai-
|
|
39
|
-
"file": "assets/vendor-arizeai-
|
|
38
|
+
"_vendor-arizeai-BiZagY4a.js": {
|
|
39
|
+
"file": "assets/vendor-arizeai-BiZagY4a.js",
|
|
40
40
|
"name": "vendor-arizeai",
|
|
41
41
|
"imports": [
|
|
42
42
|
"_vendor-VJCVsFqd.js"
|
|
@@ -69,15 +69,15 @@
|
|
|
69
69
|
"name": "vendor-three"
|
|
70
70
|
},
|
|
71
71
|
"index.tsx": {
|
|
72
|
-
"file": "assets/index-
|
|
72
|
+
"file": "assets/index-Ctff7oin.js",
|
|
73
73
|
"name": "index",
|
|
74
74
|
"src": "index.tsx",
|
|
75
75
|
"isEntry": true,
|
|
76
76
|
"imports": [
|
|
77
77
|
"_vendor-VJCVsFqd.js",
|
|
78
|
-
"_vendor-arizeai-
|
|
79
|
-
"_pages-
|
|
80
|
-
"_components-
|
|
78
|
+
"_vendor-arizeai-BiZagY4a.js",
|
|
79
|
+
"_pages-CVFLHgre.js",
|
|
80
|
+
"_components-CVzKofML.js",
|
|
81
81
|
"_vendor-three-C-AGeJYv.js",
|
|
82
82
|
"_vendor-codemirror-0mUqu36F.js",
|
|
83
83
|
"_vendor-shiki-BsgMOuir.js",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as g,R as j,j as e,u as va,a as Me,e as a1,s as V1,b as D1,c as $e,d as Q1,f as fi,g as be,h as bi,i as Ci,k as q1,l as s,m as vi,n as Te,C as o1,o as We,p as Qe,q as yi,t as Li,v as R,w as ln,L as ya,x as La,y as wa,z as ce,A as v,B as g1,D as sn,E as p,F as xa,$ as wi,G as ka,H as Sa,I as se,J as xi,K as cn,M as ki,N as Si,O as Q,P as X1,Q as O,S as $,T as N,U as Ma,V as Ta,W as Mi,X as h1,Y as Ia,Z as Ti,_ as Ii,a0 as zi,a1 as Ai,a2 as Ei,a3 as Vi,a4 as Di,a5 as Pi,a6 as f1,a7 as Oi,a8 as _i,a9 as Fi,aa as Ri,ab as ke,ac as Y1,ad as J1,ae as en,af as F,ag as Oe,ah as Fn,ai as Ni,aj as Hi,ak as Ki,al as za,am as $i,an as _,ao as Aa,ap as Bi,aq as Ae,ar as dn,as as Zi,at as un,au as Gi,av as ji,aw as Ui,ax as Wi,ay as Qi,az as qi,aA as Rn,aB as Xi,aC as Yi,aD as Ji,aE as Nn,aF as er,aG as nr,aH as ar,aI as P1,aJ as tr,aK as ir,aL as rr,aM as or,aN as lr,aO as sr,aP as cr,aQ as dr,aR as ur,aS as mr}from"./vendor-VJCVsFqd.js";import{a as Hn,R as pr,b as gr,c as hr,m as fr,T as br,u as Cr}from"./pages-
|
|
1
|
+
import{r as g,R as j,j as e,u as va,a as Me,e as a1,s as V1,b as D1,c as $e,d as Q1,f as fi,g as be,h as bi,i as Ci,k as q1,l as s,m as vi,n as Te,C as o1,o as We,p as Qe,q as yi,t as Li,v as R,w as ln,L as ya,x as La,y as wa,z as ce,A as v,B as g1,D as sn,E as p,F as xa,$ as wi,G as ka,H as Sa,I as se,J as xi,K as cn,M as ki,N as Si,O as Q,P as X1,Q as O,S as $,T as N,U as Ma,V as Ta,W as Mi,X as h1,Y as Ia,Z as Ti,_ as Ii,a0 as zi,a1 as Ai,a2 as Ei,a3 as Vi,a4 as Di,a5 as Pi,a6 as f1,a7 as Oi,a8 as _i,a9 as Fi,aa as Ri,ab as ke,ac as Y1,ad as J1,ae as en,af as F,ag as Oe,ah as Fn,ai as Ni,aj as Hi,ak as Ki,al as za,am as $i,an as _,ao as Aa,ap as Bi,aq as Ae,ar as dn,as as Zi,at as un,au as Gi,av as ji,aw as Ui,ax as Wi,ay as Qi,az as qi,aA as Rn,aB as Xi,aC as Yi,aD as Ji,aE as Nn,aF as er,aG as nr,aH as ar,aI as P1,aJ as tr,aK as ir,aL as rr,aM as or,aN as lr,aO as sr,aP as cr,aQ as dr,aR as ur,aS as mr}from"./vendor-VJCVsFqd.js";import{a as Hn,R as pr,b as gr,c as hr,m as fr,T as br,u as Cr}from"./pages-CVFLHgre.js";import{u as vr,_ as Ea,a as me,T as ie,E as Va,b as yr,c as Lr,d as Se,D as b1,e as Le,f as wr,g as _e,A as qe,C as C1,P as mn,F as xr,L as ye,h as Da,i as l1,j as v1,I as pn,k as gn,l as Pa,m as kr,n as Sr,o as Oa,p as Mr,q as Tr,r as Ir,s as _a,t as Fa,v as zr,w as Ar,x as Kn,y as Er}from"./vendor-arizeai-BiZagY4a.js";import{L as Ra,a as Na,j as Ha,E as hn,k as Ka,d as $a,l as nn,b as Ba,h as Vr,c as Dr,e as Pr,f as Or,g as _r,i as Fr,s as Rr,m as Za,n as Xe,R as Ye,p as Nr,o as Hr}from"./vendor-codemirror-0mUqu36F.js";import{V as Kr}from"./vendor-three-C-AGeJYv.js";const Ga=function(){var n={defaultValue:null,kind:"LocalArgument",name:"clusters"},a={defaultValue:null,kind:"LocalArgument",name:"dataQualityMetricColumnName"},t={defaultValue:null,kind:"LocalArgument",name:"fetchDataQualityMetric"},i={defaultValue:null,kind:"LocalArgument",name:"fetchPerformanceMetric"},r={defaultValue:null,kind:"LocalArgument",name:"performanceMetric"},o=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"referenceValue",storageKey:null}],l=[{alias:null,args:[{kind:"Variable",name:"clusters",variableName:"clusters"}],concreteType:"Cluster",kind:"LinkedField",name:"clusters",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"eventIds",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"driftRatio",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"primaryToCorpusRatio",storageKey:null},{condition:"fetchDataQualityMetric",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"columnName",variableName:"dataQualityMetricColumnName"},{kind:"Literal",name:"metric",value:"mean"}],kind:"ObjectValue",name:"metric"}],concreteType:"DatasetValues",kind:"LinkedField",name:"dataQualityMetric",plural:!1,selections:o,storageKey:null}]},{condition:"fetchPerformanceMetric",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"metric",variableName:"performanceMetric"}],kind:"ObjectValue",name:"metric"}],concreteType:"DatasetValues",kind:"LinkedField",name:"performanceMetric",plural:!1,selections:o,storageKey:null}]}],storageKey:null}];return{fragment:{argumentDefinitions:[n,a,t,i,r],kind:"Fragment",metadata:null,name:"pointCloudStore_clusterMetricsQuery",selections:l,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,t,a,i,r],kind:"Operation",name:"pointCloudStore_clusterMetricsQuery",selections:l},params:{cacheID:"86666967012812887ac0a0149d2d2535",id:null,metadata:{},name:"pointCloudStore_clusterMetricsQuery",operationKind:"query",text:`query pointCloudStore_clusterMetricsQuery(
|
|
2
2
|
$clusters: [ClusterInput!]!
|
|
3
3
|
$fetchDataQualityMetric: Boolean!
|
|
4
4
|
$dataQualityMetricColumnName: String
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,j as o,ba as z,l as c,O as w,R as P,E as b,cm as k,e1 as S,e2 as F,e3 as L,e4 as l,v as C,e5 as E}from"./vendor-VJCVsFqd.js";import{d as R,J as I,D as T,V as j,W as _}from"./vendor-arizeai-
|
|
1
|
+
import{r as t,j as o,ba as z,l as c,O as w,R as P,E as b,cm as k,e1 as S,e2 as F,e3 as L,e4 as l,v as C,e5 as E}from"./vendor-VJCVsFqd.js";import{d as R,J as I,D as T,V as j,W as _}from"./vendor-arizeai-BiZagY4a.js";import{L as A,r as D,d as O,e as G,F as N,f as V,P as M,h as W,M as m,g as U,D as q,i as J,E as B,j as K,k as $,p as H,l as Y,n as p,o as Q,q as X,s as Z,S as oo,t as lo,v as ao,w as ro,x as co,y as u,z as f,A as y,B as go,C as eo,G as bo,H as no,I as io,J as so,K as to,N as mo,O as po,Q as uo,U as fo,V as yo,W as ho,X as vo,Y as xo,Z as zo,_ as wo,$ as Po,a0 as ko,a1 as So,a2 as Fo,a3 as Lo,a4 as Co,a5 as Eo,a6 as Ro,a7 as Io,a8 as To,a9 as jo,aa as _o,ab as Ao,ac as Do}from"./pages-CVFLHgre.js";import{W as Oo,dC as Go,b9 as No,U as Vo,dD as Mo,dE as Wo}from"./components-CVzKofML.js";import"./vendor-three-C-AGeJYv.js";import"./vendor-codemirror-0mUqu36F.js";import"./vendor-shiki-BsgMOuir.js";import"./vendor-recharts-CfKQSOmq.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const g of r)if(g.type==="childList")for(const n of g.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&s(n)}).observe(document,{childList:!0,subtree:!0});function i(r){const g={};return r.integrity&&(g.integrity=r.integrity),r.referrerPolicy&&(g.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?g.credentials="include":r.crossOrigin==="anonymous"?g.credentials="omit":g.credentials="same-origin",g}function s(r){if(r.ep)return;r.ep=!0;const g=i(r);fetch(r.href,g)}})();const h="arize-phoenix-feature-flags",d={__RESET__:!1};function Uo(){const a=localStorage.getItem(h);if(!a)return d;try{const e=JSON.parse(a);return Object.assign({},d,e)}catch{return d}}const v=t.createContext(null);function qo(){const a=P.useContext(v);if(a===null)throw new Error("useFeatureFlags must be used within a FeatureFlagsProvider");return a}function Jo(a){const[e,i]=t.useState(Uo()),s=r=>{localStorage.setItem(h,JSON.stringify(r)),i(r)};return o(v.Provider,{value:{featureFlags:e,setFeatureFlags:s},children:o(Bo,{children:a.children})})}function Bo(a){const{children:e}=a,{featureFlags:i,setFeatureFlags:s}=qo(),[r,g]=t.useState(!1);return z("ctrl+shift+f",()=>g(!0)),c(w,{children:[e,o(T,{type:"modal",isDismissable:!0,onDismiss:()=>g(!1),children:r&&o(R,{title:"Feature Flags",children:o(Oo,{height:"size-1000",padding:"size-100",children:Object.keys(i).map(n=>o(I,{isSelected:i[n],onChange:x=>s({...i,[n]:x}),children:n},n))})})})]})}const Ko=b`
|
|
2
2
|
:root {
|
|
3
3
|
--ac-global-dimension-scale-factor: 1;
|
|
4
4
|
--ac-global-dimension-size-0: 0px;
|