arize-phoenix 8.4.0__py3-none-any.whl → 8.5.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arize-phoenix
3
- Version: 8.4.0
3
+ Version: 8.5.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
@@ -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=ewV4OXfRKUnA7PPA-m0T-EIAUCBmvPUrtesvVXFrkWA,22
9
+ phoenix/version.py,sha256=2vaM12kF495n8oVwwolLXw2PMT9RiI4j0UYsmTmhb2Q,22
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
@@ -21,7 +21,7 @@ phoenix/db/enums.py,sha256=tt7iovXLhVTLZ3_LbHNGgcI44SnNjXfkKtLAZG57T54,428
21
21
  phoenix/db/facilitator.py,sha256=sAYqzBXYSVBKPTQVYrd7ZmtqMAr1zP9dVJwjfNGW7hc,4207
22
22
  phoenix/db/helpers.py,sha256=daKbpY2QhTPo9a_T1xNHKI4WzWHkMmmrGIws7Hw-RZ4,4884
23
23
  phoenix/db/migrate.py,sha256=oUrXH8yEbcpL4eh09aSCuUiSrhFli0eT5D_j4ZmYChY,2797
24
- phoenix/db/models.py,sha256=JxZkG4qLW7O2A9cHFVbw5y09y_QtJT7GoUxazcmeQlk,42601
24
+ phoenix/db/models.py,sha256=wOqbY-pVKa8dw_TKZ23NZuFQHscv4LSKsel_JlBeU2U,45499
25
25
  phoenix/db/insertion/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
26
  phoenix/db/insertion/constants.py,sha256=8wifm7X-1XvroZ__R2Gc96NsgLhTDn0zXl4lehlXtcA,70
27
27
  phoenix/db/insertion/dataset.py,sha256=I9OC1ouVx7m6BH_c8hvcxW1dWGRAtpvXee29yBTuFkg,7136
@@ -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=MRy_pDDS0R63Wp8roLCxr_sDe_ZFZJLgwq7-n1mOYTo,39290
83
+ phoenix/server/app.py,sha256=3jSAFGkwr4Fqf0k3hKOkmhw1W1j9JI_7c2IOYZ2ewBk,39390
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
@@ -96,14 +96,14 @@ phoenix/server/types.py,sha256=gJJPBcDRkQ9VHZIt_aLqG_OBbGt1oWp4e3W3Jp61oKs,7409
96
96
  phoenix/server/api/README.md,sha256=Pyq1PLPgTzXAswrfIhGXrjI3Skq8it2jTVnanT6Ba4Q,1162
97
97
  phoenix/server/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
98
98
  phoenix/server/api/auth.py,sha256=nywpmfMI1trZTbZRD3oBj4kFjzg_vnxDljcM431T1eY,1246
99
- phoenix/server/api/context.py,sha256=zeIANzIfUPfs3odkDGvFs6RNRXYmpsz1DJoYlXNR6nM,6375
99
+ phoenix/server/api/context.py,sha256=OopBkMnY48TzulTtfuay3MXmhbFIWPtPoAsbhCW-Pl0,6459
100
100
  phoenix/server/api/exceptions.py,sha256=TA0JuY2YRnj35qGuMSQ8d0ToHum9gWm9W--3fSKHrX0,1171
101
101
  phoenix/server/api/interceptor.py,sha256=ykDnoC_apUd-llVli3m1CW18kNSIgjz2qZ6m5JmPDu8,1294
102
- phoenix/server/api/queries.py,sha256=Zygu1nR2Ktkw0-Bc3vnpG5C9LSI_DHRxfujxlOJ7_BU,34542
102
+ phoenix/server/api/queries.py,sha256=QKZkLGzqDRa7EDfUADnk3jI0Rzsc_g_fe4y4oOBGbKw,34866
103
103
  phoenix/server/api/schema.py,sha256=fcs36xQwFF_Qe41_5cWR8wYpDvOrnbcyTeo5WNMbDsA,1702
104
104
  phoenix/server/api/subscriptions.py,sha256=DSIgQF6lQqkbc7D0AaI5R4g3hIHbU04H5Y2UIpwmpy0,22989
105
105
  phoenix/server/api/utils.py,sha256=quCBRcusc6PUq9tJq7M8PgwFZp7nXgVAxtbw8feribY,833
106
- phoenix/server/api/dataloaders/__init__.py,sha256=ZgJVbqIH-Y4M863fMIOsf4Ka9iVFmWtzqr0a4mQ92BU,4266
106
+ phoenix/server/api/dataloaders/__init__.py,sha256=LiOF9d95TPOD3pYuE906trLq-_q1VP8JQ9B6SHicbbM,4360
107
107
  phoenix/server/api/dataloaders/annotation_summaries.py,sha256=2sHmIDX7n8tuPeBTs9bMKtlMKWn_Ph9awTZqmwn2Owc,5505
108
108
  phoenix/server/api/dataloaders/average_experiment_run_latency.py,sha256=GLFoFAbztOH-0FVzzZ77mATIO63UcjB50j3qXiNi-tE,1811
109
109
  phoenix/server/api/dataloaders/dataset_example_revisions.py,sha256=xF7M2dg3UmjhdCrscnztCIBBI0cg3RF48IIqvilpc18,4623
@@ -119,6 +119,7 @@ phoenix/server/api/dataloaders/experiment_sequence_number.py,sha256=zM_f78fnqhpp
119
119
  phoenix/server/api/dataloaders/latency_ms_quantile.py,sha256=CHWV9nvEEM3xqpXWubywtLtFLzbwyLU85EaP_kQajJU,7363
120
120
  phoenix/server/api/dataloaders/min_start_or_max_end_times.py,sha256=1jYglTXv4S8k7OWSGdgeJ2OxVCmZtX8a6sjJp9GPZ04,2783
121
121
  phoenix/server/api/dataloaders/num_child_spans.py,sha256=655g9SP_3gfT4qqukfgKzLy5uBLQmnVQBP-mZL3in0s,1200
122
+ phoenix/server/api/dataloaders/num_spans_per_trace.py,sha256=nNAxj6QYcTc8oykfJZxH0vtS9tE83oXoArVwQTJHzTw,922
122
123
  phoenix/server/api/dataloaders/project_by_name.py,sha256=O24Rjs0ZQaYtSnPfA6YBQfbHfUgNsHKUcc_gIKyK9vo,1086
123
124
  phoenix/server/api/dataloaders/prompt_version_sequence_number.py,sha256=tBaCbpI9KgjCACvpd-5hZy5TDSHH7PJPn4bd1xJuN-g,1314
124
125
  phoenix/server/api/dataloaders/record_counts.py,sha256=NLlMEaJ-HxiJavqbSkMbzOrIRzqzYxO8-t2mfp1vXqM,4160
@@ -130,7 +131,7 @@ phoenix/server/api/dataloaders/session_trace_latency_ms_quantile.py,sha256=s_Ce_
130
131
  phoenix/server/api/dataloaders/span_annotations.py,sha256=y5TvxnljS2P3hm_NiQd24qy313AG76lyjcZFNWGls1A,1028
131
132
  phoenix/server/api/dataloaders/span_by_id.py,sha256=gaqsMqMjJfzgsAuC--lZoRvgHk_1o78_0HnpXejg9Bc,1001
132
133
  phoenix/server/api/dataloaders/span_dataset_examples.py,sha256=rpBStVP7ZMIH11Cpq4-zCJ4amNC5ZzX72NYv4vAQTdc,1255
133
- phoenix/server/api/dataloaders/span_descendants.py,sha256=lEUpPkQtM5twbBrwzBbrJN7wZpG0K2rdL7hG2PAs5pk,2308
134
+ phoenix/server/api/dataloaders/span_descendants.py,sha256=xrAJ_pVMQ3G7o4WNn3HxGTpNLCBXJH3xPb1RKnMEd1k,3933
134
135
  phoenix/server/api/dataloaders/span_projects.py,sha256=JTfuKn2BBn72QdAP53ZGP2OUCgZJ7AzlzQAx8WivBog,1234
135
136
  phoenix/server/api/dataloaders/table_fields.py,sha256=C3ywv87XphMEvqsQGl33H4iOiXbvqWqvaM4Snps4Sv0,3068
136
137
  phoenix/server/api/dataloaders/token_counts.py,sha256=Sr_sBfLgsKYCIjgzTFV-fuat7s7DATM2u6ZftLaOnoQ,4629
@@ -182,7 +183,7 @@ phoenix/server/api/input_types/ProjectSessionSort.py,sha256=qFgLmKYeyFpx7An9ZNdD
182
183
  phoenix/server/api/input_types/PromptTemplateOptions.py,sha256=8ZJdH1F9fExcdH9dF8SJ29WycCvtEpK-Z6dZwFO7KgQ,232
183
184
  phoenix/server/api/input_types/PromptVersionInput.py,sha256=n6zBeSkK8ZFRHTjtVx4BK--azZIxXeYETa6Cufcet2I,3743
184
185
  phoenix/server/api/input_types/SpanAnnotationSort.py,sha256=T5pAGzmh4MiJp9JMAzNDByFVTczfw02FH4WFWwFezyI,361
185
- phoenix/server/api/input_types/SpanSort.py,sha256=Dhvl8BIoV52yHoqntfOax_gUc15uH8ITI_00Ha7PvYc,5959
186
+ phoenix/server/api/input_types/SpanSort.py,sha256=oqvcWHYgp_nXvXYNi5l8Bhe7PHT3LbAhUn6ZXDSzdXo,5959
186
187
  phoenix/server/api/input_types/TimeRange.py,sha256=pwhC2jx6dFIgT0qFfnO68qiJp9-m7Je5QkNscNsuVxA,700
187
188
  phoenix/server/api/input_types/TraceAnnotationSort.py,sha256=BzwiUnMh2VsgQYnhDlbJ6ljHugqIS4YDUlYzvq_tl3o,365
188
189
  phoenix/server/api/input_types/UserRoleInput.py,sha256=xxhFe0ITZOgRVEJbVem_W6F1Ip_H6xDENdQqMMx-kKE,129
@@ -278,14 +279,14 @@ phoenix/server/api/types/Retrieval.py,sha256=OhMK2ncjoyp5h1yjKhjlKpoTbQrMHuxmgSF
278
279
  phoenix/server/api/types/ScalarDriftMetricEnum.py,sha256=IUAcRPpgL41WdoIgK6cNk2Te38SspXGyEs-S1fY23_A,232
279
280
  phoenix/server/api/types/Segments.py,sha256=vT2v0efoa5cuBKxLtxTnsUP5YJJCZfTloM71Spu0tMI,2915
280
281
  phoenix/server/api/types/SortDir.py,sha256=OUpXhlCzCxPoXSDkJJygEs9Rw9pMymfaZUG5zPTrw4Y,152
281
- phoenix/server/api/types/Span.py,sha256=3Neeb1bEc2W2fNyoAfI0ULyb9gtze3Mv6iWHWRFv-Xc,24291
282
+ phoenix/server/api/types/Span.py,sha256=OJBVbOltdhqbSOepge0qPYS9PBGs2BrA9RyktQ9_otE,25371
282
283
  phoenix/server/api/types/SpanAnnotation.py,sha256=6b5G-b_OoRvDL2ayWk7MkbqarLK-F-pQMx21CpUuNGY,1168
283
284
  phoenix/server/api/types/SpanIOValue.py,sha256=c5TWdZZN3v0gHI5xWeY7gjD-sE9ugWlGGAio-gDS-Uo,1653
284
285
  phoenix/server/api/types/SystemApiKey.py,sha256=2ym8EgsTBIvxx1l9xZ-2YMovz58ZwYb_MaHBTJ9NH2E,166
285
286
  phoenix/server/api/types/TimeSeries.py,sha256=nuuZtfHmOhTjeB8_SvZ5PUQexAkTcPScwYeFC5RUlRU,5491
286
287
  phoenix/server/api/types/TokenUsage.py,sha256=g-PjAGVigpchQgkXAuC5sc53fn2YwAgfeXkGmFPi_TE,201
287
288
  phoenix/server/api/types/ToolDefinition.py,sha256=T6UH2vcbuPBDy7jKYOqMth2NdqxMPgDBf11Tpbt5Yb8,187
288
- phoenix/server/api/types/Trace.py,sha256=kH0Tv3m8chVbxMiQ27_W5v8gz6RsvGvl2qS9eoELXlw,7992
289
+ phoenix/server/api/types/Trace.py,sha256=Yhy3olalZ03k3kJkg2DHwYhBM2sUe_HIRtDY258gvFc,8193
289
290
  phoenix/server/api/types/TraceAnnotation.py,sha256=OW6A2zr1gomOuG0XQe55dk15XXX2DSM0DzatRbHWH5A,1256
290
291
  phoenix/server/api/types/UMAPPoints.py,sha256=49sWnxjcAJKRzqUY71Fa0tOPti5XjIIFT5cSg6oNu_U,1650
291
292
  phoenix/server/api/types/User.py,sha256=iTVUrI8U6-asOhBt1bOZNtoRAaRNC4WHgR1Uv2rHnWQ,1975
@@ -312,10 +313,10 @@ phoenix/server/static/apple-touch-icon-76x76.png,sha256=CT_xT12I0u2i0WU8JzBZBuOQ
312
313
  phoenix/server/static/apple-touch-icon.png,sha256=fOfpjqGpWYbJ0eAurKsyoZP1EAs6ZVooBJ_SGk2ZkDs,3801
313
314
  phoenix/server/static/favicon.ico,sha256=bY0vvCKRftemZfPShwZtE93DiiQdaYaozkPGwNFr6H8,34494
314
315
  phoenix/server/static/modernizr.js,sha256=mvK-XtkNqjOral-QvzoqsyOMECXIMu5BQwSVN_wcU9c,2564
315
- phoenix/server/static/.vite/manifest.json,sha256=E-HVSSr4xC4d_P49I-_9XpFni5j937QU2rPN0G0GDyU,2165
316
- phoenix/server/static/assets/components-BgFPI6sn.js,sha256=a7Oru901CqeUXNKQ5nUX2qa8qWWrzc6a6Sb_UTCFTPQ,420595
317
- phoenix/server/static/assets/index-CIkk8uHr.js,sha256=V2MOiWJp1tlJmjxW7QFk5VE-x5coElaXKqVeEPCYSYc,59131
318
- phoenix/server/static/assets/pages-CmDiPH1A.js,sha256=r1U0ZTva747v8lUvq1-dwBS6aVN_nsKk4xKQmIaTNpU,828439
316
+ phoenix/server/static/.vite/manifest.json,sha256=oJcJtyZJgcpqxcXwrGmAndCY6Y_eyRpoY9EVm268_6s,2165
317
+ phoenix/server/static/assets/components-BrNPaYzp.js,sha256=ve6T6CEpqTRBWsf_bIGGcGf6B6OpKdx3Dxdm9bWERiw,420595
318
+ phoenix/server/static/assets/index-CRMcwhZY.js,sha256=sStBt2JxTl_fYpwJrjFvistSO4UwnBoE8cjPMRplG3w,59131
319
+ phoenix/server/static/assets/pages-B8pBNWCb.js,sha256=_wCX7xZ5mTXtYd9PuWy1mrvhpRelsw2_5Vocz7_E_CQ,829743
319
320
  phoenix/server/static/assets/vendor-CRRq3WgM.js,sha256=J5mIL57AMCQb5lg2CVj-4e5dGb4NOhDeZNBN61fIROM,2235517
320
321
  phoenix/server/static/assets/vendor-Cg6lcjUC.css,sha256=nZrkr0u6NNElFGvpWHk9GTHeGoibCXCli1bE7mXZGZg,1816
321
322
  phoenix/server/static/assets/vendor-arizeai-Dq64X_0o.js,sha256=jAFsbq-7Q6v08obSM4NW5oMHsouV6Nd9DDV5A9YqsRE,202331
@@ -362,9 +363,9 @@ phoenix/utilities/project.py,sha256=auVpARXkDb-JgeX5f2aStyFIkeKvGwN9l7qrFeJMVxI,
362
363
  phoenix/utilities/re.py,sha256=6YyUWIkv0zc2SigsxfOWIHzdpjKA_TZo2iqKq7zJKvw,2081
363
364
  phoenix/utilities/span_store.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
364
365
  phoenix/utilities/template_formatters.py,sha256=gh9PJD6WEGw7TEYXfSst1UR4pWWwmjxMLrDVQ_CkpkQ,2779
365
- arize_phoenix-8.4.0.dist-info/METADATA,sha256=1rIrOe2Lz0jCoaJ66BH56BqI5E-0Rdm2Zkp8YBx6xaU,23646
366
- arize_phoenix-8.4.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
367
- arize_phoenix-8.4.0.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
368
- arize_phoenix-8.4.0.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
369
- arize_phoenix-8.4.0.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
370
- arize_phoenix-8.4.0.dist-info/RECORD,,
366
+ arize_phoenix-8.5.0.dist-info/METADATA,sha256=N6k050TsgnNg5A-xKTAtlz34WcubZLp0vYiPXe2RW_s,23646
367
+ arize_phoenix-8.5.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
368
+ arize_phoenix-8.5.0.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
369
+ arize_phoenix-8.5.0.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
370
+ arize_phoenix-8.5.0.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
371
+ arize_phoenix-8.5.0.dist-info/RECORD,,
phoenix/db/models.py CHANGED
@@ -1,6 +1,6 @@
1
1
  from datetime import datetime, timezone
2
2
  from enum import Enum
3
- from typing import Any, Optional, Sequence, TypedDict
3
+ from typing import Any, Iterable, Optional, Sequence, TypedDict, cast
4
4
 
5
5
  import sqlalchemy.sql as sql
6
6
  from openinference.semconv.trace import RerankerAttributes, SpanAttributes
@@ -39,7 +39,7 @@ from sqlalchemy.orm import (
39
39
  mapped_column,
40
40
  relationship,
41
41
  )
42
- from sqlalchemy.sql import expression
42
+ from sqlalchemy.sql import Values, column, compiler, expression, literal, roles, union_all
43
43
  from sqlalchemy.sql.compiler import SQLCompiler
44
44
  from sqlalchemy.sql.functions import coalesce
45
45
 
@@ -74,6 +74,72 @@ RERANKER_OUTPUT_DOCUMENTS = RerankerAttributes.RERANKER_OUTPUT_DOCUMENTS.split("
74
74
  RETRIEVAL_DOCUMENTS = SpanAttributes.RETRIEVAL_DOCUMENTS.split(".")
75
75
 
76
76
 
77
+ class SubValues(Values, roles.CompoundElementRole):
78
+ """
79
+ Adapted from the following recipe:
80
+ https://github.com/sqlalchemy/sqlalchemy/issues/7228#issuecomment-1746837960
81
+
82
+ This is part of a workaround to make it more convenient to construct the VALUES clause in
83
+ SQLite. The VALUES clause is useful for creating a temporary table in the database with a set
84
+ of user inputs in the form of multi-value tuples, which can then be joined with other tables.
85
+ """
86
+
87
+ inherit_cache = True
88
+
89
+ @property
90
+ def _all_selected_columns(self) -> Iterable[ColumnElement[Any]]:
91
+ return self.columns
92
+
93
+
94
+ @compiles(SubValues, "sqlite")
95
+ def render_subvalues_w_union(elem: SubValues, compiler: compiler.SQLCompiler, **kw: Any) -> str:
96
+ """
97
+ Adapted from the following recipe:
98
+ https://github.com/sqlalchemy/sqlalchemy/issues/7228#issuecomment-1746837960
99
+
100
+ This is part of a workaround to make it more convenient to construct the VALUES clause in
101
+ SQLite. The VALUES clause is useful for creating a temporary table in the database with a set
102
+ of user inputs in the form of multi-value tuples, which can then be joined with other tables.
103
+ """
104
+ # omit rendering parenthesis, columns, "AS name", etc.
105
+ kw.pop("asfrom", None)
106
+ return cast(str, compiler.visit_values(elem, **kw)) # type: ignore[no-untyped-call]
107
+
108
+
109
+ @compiles(Values, "sqlite")
110
+ def render_values_w_union(
111
+ elem: Values,
112
+ compiler: compiler.SQLCompiler,
113
+ from_linter: Optional[compiler.FromLinter] = None,
114
+ **kw: Any,
115
+ ) -> str:
116
+ """
117
+ Adapted from the following recipe:
118
+ https://github.com/sqlalchemy/sqlalchemy/issues/7228#issuecomment-1746837960
119
+
120
+ This is part of a workaround to make it more convenient to construct the VALUES clause in
121
+ SQLite. The VALUES clause is useful for creating a temporary table in the database with a set
122
+ of user inputs in the form of multi-value tuples, which can then be joined with other tables.
123
+ """
124
+ first: tuple[Any, ...]
125
+ rest: list[tuple[Any, ...]]
126
+ first, *rest = [e for chunk in elem._data for e in chunk]
127
+ stmt = select(*(literal(val).label(col.key) for col, val in zip(elem.columns, first)))
128
+ if rest:
129
+ cols = [column(c.key, c.type) for c in elem.columns]
130
+ stmt = union_all(stmt, SubValues(*cols).data(rest)) # type: ignore[assignment]
131
+ subquery = stmt.subquery(elem.name)
132
+ if from_linter:
133
+ # replace all occurrences of elem with subquery so the from linter
134
+ # can eliminate the values object from its cartesian product check.
135
+ edges = set(from_linter.edges)
136
+ from_linter.edges.clear()
137
+ from_linter.edges.update(
138
+ tuple(subquery if node == elem else node for node in edge) for edge in edges
139
+ )
140
+ return compiler.process(subquery, from_linter=from_linter, **kw)
141
+
142
+
77
143
  class AuthMethod(Enum):
78
144
  LOCAL = "LOCAL"
79
145
  OAUTH2 = "OAUTH2"
@@ -30,6 +30,7 @@ from phoenix.server.api.dataloaders import (
30
30
  LatencyMsQuantileDataLoader,
31
31
  MinStartOrMaxEndTimeDataLoader,
32
32
  NumChildSpansDataLoader,
33
+ NumSpansPerTraceDataLoader,
33
34
  ProjectByNameDataLoader,
34
35
  PromptVersionSequenceNumberDataLoader,
35
36
  RecordCountDataLoader,
@@ -78,6 +79,7 @@ class DataLoaders:
78
79
  latency_ms_quantile: LatencyMsQuantileDataLoader
79
80
  min_start_or_max_end_times: MinStartOrMaxEndTimeDataLoader
80
81
  num_child_spans: NumChildSpansDataLoader
82
+ num_spans_per_trace: NumSpansPerTraceDataLoader
81
83
  project_fields: TableFieldsDataLoader
82
84
  prompt_version_sequence_number: PromptVersionSequenceNumberDataLoader
83
85
  record_counts: RecordCountDataLoader
@@ -18,6 +18,7 @@ from .experiment_sequence_number import ExperimentSequenceNumberDataLoader
18
18
  from .latency_ms_quantile import LatencyMsQuantileCache, LatencyMsQuantileDataLoader
19
19
  from .min_start_or_max_end_times import MinStartOrMaxEndTimeCache, MinStartOrMaxEndTimeDataLoader
20
20
  from .num_child_spans import NumChildSpansDataLoader
21
+ from .num_spans_per_trace import NumSpansPerTraceDataLoader
21
22
  from .project_by_name import ProjectByNameDataLoader
22
23
  from .prompt_version_sequence_number import PromptVersionSequenceNumberDataLoader
23
24
  from .record_counts import RecordCountCache, RecordCountDataLoader
@@ -55,6 +56,7 @@ __all__ = [
55
56
  "LatencyMsQuantileDataLoader",
56
57
  "MinStartOrMaxEndTimeDataLoader",
57
58
  "NumChildSpansDataLoader",
59
+ "NumSpansPerTraceDataLoader",
58
60
  "PromptVersionSequenceNumberDataLoader",
59
61
  "RecordCountDataLoader",
60
62
  "SessionIODataLoader",
@@ -0,0 +1,28 @@
1
+ from typing import Iterable
2
+
3
+ from sqlalchemy import func, select
4
+ from strawberry.dataloader import DataLoader
5
+ from typing_extensions import TypeAlias
6
+
7
+ from phoenix.db.models import Span, Trace
8
+ from phoenix.server.types import DbSessionFactory
9
+
10
+ TraceRowId: TypeAlias = int
11
+
12
+ Key: TypeAlias = TraceRowId
13
+ Result: TypeAlias = int
14
+
15
+
16
+ class NumSpansPerTraceDataLoader(DataLoader[Key, Result]):
17
+ def __init__(self, db: DbSessionFactory) -> None:
18
+ super().__init__(load_fn=self._load_fn)
19
+ self._db = db
20
+
21
+ async def _load_fn(self, keys: Iterable[Key]) -> list[Result]:
22
+ stmt = (
23
+ select(Trace.id, func.count()).join(Span).where(Trace.id.in_(keys)).group_by(Trace.id)
24
+ )
25
+ async with self._db() as session:
26
+ data = await session.stream(stmt)
27
+ result: dict[Key, Result] = {id_: cnt async for id_, cnt in data}
28
+ return [result.get(id_, 0) for id_ in keys]
@@ -1,17 +1,19 @@
1
- from secrets import token_hex
2
- from typing import Iterable
1
+ from collections import defaultdict
2
+ from typing import Iterable, Optional
3
3
 
4
+ import sqlalchemy as sa
4
5
  from aioitertools.itertools import groupby
5
6
  from sqlalchemy import select
6
7
  from strawberry.dataloader import DataLoader
7
8
  from typing_extensions import TypeAlias
8
9
 
9
- from phoenix.db import models
10
+ from phoenix.db.models import Span
10
11
  from phoenix.server.types import DbSessionFactory
11
12
 
12
13
  SpanRowId: TypeAlias = int
14
+ MaxDepth: TypeAlias = int
13
15
 
14
- Key: TypeAlias = SpanRowId
16
+ Key: TypeAlias = tuple[SpanRowId, Optional[MaxDepth]]
15
17
  Result: TypeAlias = list[SpanRowId]
16
18
 
17
19
 
@@ -21,46 +23,81 @@ class SpanDescendantsDataLoader(DataLoader[Key, Result]):
21
23
  self._db = db
22
24
 
23
25
  async def _load_fn(self, keys: Iterable[Key]) -> list[Result]:
24
- root_ids = (
26
+ # Create a values expression with Span.id and respective max_depth (which can be None).
27
+ values = sa.values(
28
+ sa.Column("root_rowid", sa.Integer),
29
+ sa.Column("max_depth", sa.Integer, nullable=True),
30
+ name="values",
31
+ ).data(list(keys))
32
+
33
+ # Get the root spans with their depth limits by joining the values to the Span table.
34
+ roots = (
25
35
  select(
26
- models.Span.span_id,
27
- models.Span.id,
36
+ Span.span_id,
37
+ values.c.root_rowid,
38
+ values.c.max_depth,
28
39
  )
29
- .where(models.Span.id.in_(set(keys)))
30
- .subquery()
40
+ .join_from(values, Span, Span.id == values.c.root_rowid)
41
+ .subquery("roots")
31
42
  )
32
- root_id_label = f"root_id_{token_hex(8)}"
33
- root_rowid_label = f"root_rowid_{token_hex(8)}"
34
- descendant_ids = (
43
+
44
+ # Initialize the recursive common table expression (CTE) with direct children
45
+ # of root spans, setting depth=1.
46
+ descendants = (
35
47
  select(
36
- models.Span.id,
37
- models.Span.span_id,
38
- models.Span.parent_id.label(root_id_label),
39
- root_ids.c.id.label(root_rowid_label),
48
+ Span.id,
49
+ Span.span_id,
50
+ Span.start_time,
51
+ roots.c.root_rowid,
52
+ roots.c.max_depth,
53
+ sa.literal(1).label("depth"), # immediate children are depth=1 from root
40
54
  )
41
- .join(root_ids, models.Span.parent_id == root_ids.c.span_id)
42
- .cte(recursive=True)
55
+ .join_from(roots, Span, Span.parent_id == roots.c.span_id)
56
+ .cte("descendants", recursive=True)
43
57
  )
44
- parent_ids = descendant_ids.alias()
45
- descendant_ids = descendant_ids.union_all(
58
+
59
+ # Build the recursive part of the query to fetch descendants at increasing depths.
60
+ # This recursively finds children of spans in the current depth level.
61
+ parents = descendants.alias("parents")
62
+ descendants = descendants.union_all(
46
63
  select(
47
- models.Span.id,
48
- models.Span.span_id,
49
- parent_ids.c[root_id_label],
50
- parent_ids.c[root_rowid_label],
51
- ).join(
52
- parent_ids,
53
- models.Span.parent_id == parent_ids.c.span_id,
64
+ Span.id,
65
+ Span.span_id,
66
+ Span.start_time,
67
+ parents.c.root_rowid,
68
+ parents.c.max_depth,
69
+ (parents.c.depth + 1).label("depth"), # Increment depth for each level
70
+ )
71
+ .join_from(parents, Span, Span.parent_id == parents.c.span_id)
72
+ .where(
73
+ sa.or_(
74
+ parents.c.max_depth.is_(None), # No limit if max_depth is NULL
75
+ parents.c.depth + 1 <= parents.c.max_depth, # Stop when max depth is reached
76
+ ),
54
77
  )
55
78
  )
56
- stmt = (
57
- select(descendant_ids.c[root_rowid_label], models.Span.id)
58
- .join(descendant_ids, models.Span.id == descendant_ids.c.id)
59
- .order_by(descendant_ids.c[root_rowid_label])
79
+
80
+ # Final query to select and order all descendants.
81
+ # Ordering ensures breadth-first traversal and consistent results.
82
+ stmt = select(
83
+ descendants.c.id,
84
+ descendants.c.root_rowid,
85
+ descendants.c.max_depth,
86
+ ).order_by(
87
+ descendants.c.root_rowid,
88
+ descendants.c.max_depth,
89
+ descendants.c.depth, # Order by depth for BFS traversal
90
+ descendants.c.start_time,
91
+ descendants.c.id,
60
92
  )
61
- results: dict[Key, Result] = {key: [] for key in keys}
93
+
94
+ results: defaultdict[Key, Result] = defaultdict(list)
62
95
  async with self._db() as session:
63
96
  data = await session.stream(stmt)
64
- async for key, group in groupby(data, key=lambda d: d[0]):
65
- results[key].extend(span_rowid for _, span_rowid in group)
97
+ # Group results by root_rowid and max_depth (the Key tuple)
98
+ async for key, group in groupby(data, key=lambda d: tuple(d[1:])):
99
+ # Extract span IDs (the database row IDs) and add them to the result list.
100
+ # The first column (index 0) from our query is Span.id.
101
+ results[key].extend(id_ for id_, *_ in group)
102
+
66
103
  return [results[key].copy() for key in keys]
@@ -30,7 +30,7 @@ class SpanColumn(Enum):
30
30
 
31
31
  @property
32
32
  def column_name(self) -> str:
33
- return "f{self.name}_span_sort_column"
33
+ return f"{self.name}_span_sort_column"
34
34
 
35
35
  @property
36
36
  def orm_expression(self) -> Any:
@@ -86,7 +86,7 @@ class ModelsInput:
86
86
  @strawberry.type
87
87
  class DbTableStats:
88
88
  table_name: str
89
- num_bytes: int
89
+ num_bytes: float
90
90
 
91
91
 
92
92
  @strawberry.type
@@ -796,9 +796,13 @@ class Query:
796
796
  ) -> list[DbTableStats]:
797
797
  if info.context.db.dialect is SupportedSQLDialect.SQLITE:
798
798
  stmt = text("SELECT name, sum(pgsize) FROM dbstat group by name;")
799
- async with info.context.db() as session:
800
- stats = cast(Iterable[tuple[str, int]], await session.execute(stmt))
801
- stats = _consolidate_sqlite_db_table_stats(stats)
799
+ try:
800
+ async with info.context.db() as session:
801
+ stats = cast(Iterable[tuple[str, int]], await session.execute(stmt))
802
+ stats = _consolidate_sqlite_db_table_stats(stats)
803
+ except Exception:
804
+ # TODO: temporary workaround until we can reproduce the error
805
+ return []
802
806
  elif info.context.db.dialect is SupportedSQLDialect.POSTGRESQL:
803
807
  stmt = text(f"""\
804
808
  SELECT c.relname, pg_total_relation_size(c.oid)
@@ -807,8 +811,12 @@ class Query:
807
811
  WHERE c.relkind = 'r'
808
812
  AND n.nspname = '{getenv(ENV_PHOENIX_SQL_DATABASE_SCHEMA) or "public"}';
809
813
  """)
810
- async with info.context.db() as session:
811
- stats = cast(Iterable[tuple[str, int]], await session.execute(stmt))
814
+ try:
815
+ async with info.context.db() as session:
816
+ stats = cast(Iterable[tuple[str, int]], await session.execute(stmt))
817
+ except Exception:
818
+ # TODO: temporary workaround until we can reproduce the error
819
+ return []
812
820
  else:
813
821
  assert_never(info.context.db.dialect)
814
822
  return [
@@ -9,7 +9,7 @@ import numpy as np
9
9
  import strawberry
10
10
  from openinference.semconv.trace import SpanAttributes
11
11
  from strawberry import ID, UNSET
12
- from strawberry.relay import Node, NodeID
12
+ from strawberry.relay import Connection, Node, NodeID
13
13
  from strawberry.types import Info
14
14
  from typing_extensions import Annotated, TypeAlias
15
15
 
@@ -30,6 +30,7 @@ from phoenix.server.api.types.Evaluation import DocumentEvaluation
30
30
  from phoenix.server.api.types.ExampleRevisionInterface import ExampleRevision
31
31
  from phoenix.server.api.types.GenerativeProvider import GenerativeProvider
32
32
  from phoenix.server.api.types.MimeType import MimeType
33
+ from phoenix.server.api.types.pagination import ConnectionArgs, CursorString, connection_from_list
33
34
  from phoenix.server.api.types.SortDir import SortDir
34
35
  from phoenix.server.api.types.SpanAnnotation import SpanAnnotation, to_gql_span_annotation
35
36
  from phoenix.server.api.types.SpanIOValue import SpanIOValue, truncate_value
@@ -547,9 +548,31 @@ class Span(Node):
547
548
  async def descendants(
548
549
  self,
549
550
  info: Info[Context, None],
550
- ) -> list["Span"]:
551
- ids: Iterable[int] = await info.context.data_loaders.span_descendants.load(self.span_rowid)
552
- return [Span(span_rowid=id_) for id_ in ids]
551
+ max_depth: Annotated[
552
+ Optional[int],
553
+ strawberry.argument(
554
+ description="Maximum depth of breadth first search. For example, "
555
+ "maxDepth=1 searches for only the immediate child spans (if any); "
556
+ "maxDepth=2 searches for the immediate child spans plus their children. "
557
+ "maxDepth=0 (or None) means no limit."
558
+ ),
559
+ ] = 3,
560
+ first: Optional[int] = 50,
561
+ last: Optional[int] = UNSET,
562
+ after: Optional[CursorString] = UNSET,
563
+ before: Optional[CursorString] = UNSET,
564
+ ) -> Connection["Span"]:
565
+ args = ConnectionArgs(
566
+ first=first,
567
+ after=after if isinstance(after, CursorString) else None,
568
+ last=last,
569
+ before=before if isinstance(before, CursorString) else None,
570
+ )
571
+ span_rowids: Iterable[int] = await info.context.data_loaders.span_descendants.load(
572
+ (self.span_rowid, max_depth or None),
573
+ )
574
+ data = [Span(span_rowid=span_rowid) for span_rowid in span_rowids]
575
+ return connection_from_list(data=data, args=args)
553
576
 
554
577
  @strawberry.field(
555
578
  description="The span's attributes translated into an example revision for a dataset",
@@ -171,6 +171,13 @@ class Trace(Node):
171
171
  return None
172
172
  return Span(span_rowid=span_rowid)
173
173
 
174
+ @strawberry.field
175
+ async def num_spans(
176
+ self,
177
+ info: Info[Context, None],
178
+ ) -> int:
179
+ return await info.context.data_loaders.num_spans_per_trace.load(self.trace_rowid)
180
+
174
181
  @strawberry.field
175
182
  async def spans(
176
183
  self,
phoenix/server/app.py CHANGED
@@ -86,6 +86,7 @@ from phoenix.server.api.dataloaders import (
86
86
  LatencyMsQuantileDataLoader,
87
87
  MinStartOrMaxEndTimeDataLoader,
88
88
  NumChildSpansDataLoader,
89
+ NumSpansPerTraceDataLoader,
89
90
  ProjectByNameDataLoader,
90
91
  PromptVersionSequenceNumberDataLoader,
91
92
  RecordCountDataLoader,
@@ -616,6 +617,7 @@ def create_graphql_router(
616
617
  ),
617
618
  ),
618
619
  num_child_spans=NumChildSpansDataLoader(db),
620
+ num_spans_per_trace=NumSpansPerTraceDataLoader(db),
619
621
  project_fields=TableFieldsDataLoader(db, models.Project),
620
622
  prompt_version_sequence_number=PromptVersionSequenceNumberDataLoader(db),
621
623
  record_counts=RecordCountDataLoader(
@@ -1,22 +1,22 @@
1
1
  {
2
- "_components-BgFPI6sn.js": {
3
- "file": "assets/components-BgFPI6sn.js",
2
+ "_components-BrNPaYzp.js": {
3
+ "file": "assets/components-BrNPaYzp.js",
4
4
  "name": "components",
5
5
  "imports": [
6
6
  "_vendor-CRRq3WgM.js",
7
- "_pages-CmDiPH1A.js",
7
+ "_pages-B8pBNWCb.js",
8
8
  "_vendor-arizeai-Dq64X_0o.js",
9
9
  "_vendor-codemirror-C1oevlym.js",
10
10
  "_vendor-three-C-AGeJYv.js"
11
11
  ]
12
12
  },
13
- "_pages-CmDiPH1A.js": {
14
- "file": "assets/pages-CmDiPH1A.js",
13
+ "_pages-B8pBNWCb.js": {
14
+ "file": "assets/pages-B8pBNWCb.js",
15
15
  "name": "pages",
16
16
  "imports": [
17
17
  "_vendor-CRRq3WgM.js",
18
18
  "_vendor-arizeai-Dq64X_0o.js",
19
- "_components-BgFPI6sn.js",
19
+ "_components-BrNPaYzp.js",
20
20
  "_vendor-codemirror-C1oevlym.js",
21
21
  "_vendor-recharts-CPj01S89.js"
22
22
  ]
@@ -69,15 +69,15 @@
69
69
  "name": "vendor-three"
70
70
  },
71
71
  "index.tsx": {
72
- "file": "assets/index-CIkk8uHr.js",
72
+ "file": "assets/index-CRMcwhZY.js",
73
73
  "name": "index",
74
74
  "src": "index.tsx",
75
75
  "isEntry": true,
76
76
  "imports": [
77
77
  "_vendor-CRRq3WgM.js",
78
78
  "_vendor-arizeai-Dq64X_0o.js",
79
- "_pages-CmDiPH1A.js",
80
- "_components-BgFPI6sn.js",
79
+ "_pages-B8pBNWCb.js",
80
+ "_components-BrNPaYzp.js",
81
81
  "_vendor-three-C-AGeJYv.js",
82
82
  "_vendor-codemirror-C1oevlym.js",
83
83
  "_vendor-shiki-aY7rz1pm.js",
@@ -1,4 +1,4 @@
1
- import{r as g,R as j,j as e,u as ba,a as Me,e as a1,s as V1,b as D1,c as $e,d as Q1,f as gi,g as fe,h as hi,i as fi,k as q1,l,m as Ci,n as Te,C as o1,o as We,p as Qe,q as bi,t as vi,v as R,w as ln,L as va,x as ya,y as La,z as ce,A as v,B as g1,D as sn,E as p,F as wa,$ as yi,G as xa,H as ka,I as xe,J as Li,K as cn,M as wi,N as xi,O as q,P as X1,Q as O,S as K,T as N,U as Sa,V as Ma,W as ki,X as h1,Y as Ta,Z as Si,_ as Mi,a0 as Ti,a1 as Ii,a2 as Ai,a3 as zi,a4 as Ei,a5 as Vi,a6 as f1,a7 as Di,a8 as Pi,a9 as Oi,aa as _i,ab as ke,ac as Y1,ad as J1,ae as en,af as F,ag as Oe,ah as _n,ai as Fi,aj as Ri,ak as Ni,al as Ia,am as Hi,an as _,ao as Aa,ap as Ki,aq as ze,ar as dn,as as $i,at as un,au as Bi,av as Zi,aw as Gi,ax as ji,ay as Ui,az as Wi,aA as Fn,aB as Qi,aC as qi,aD as Xi,aE as Rn,aF as Yi,aG as Ji,aH as er,aI as P1,aJ as nr,aK as ar,aL as tr,aM as ir,aN as rr,aO as or,aP as lr,aQ as sr,aR as cr,aS as dr}from"./vendor-CRRq3WgM.js";import{a as Nn,R as ur,b as mr,c as pr,m as gr,T as hr,u as fr}from"./pages-CmDiPH1A.js";import{u as Cr,_ as za,a as re,T as X,E as Ea,b as br,c as vr,d as Se,D as C1,e as ye,f as yr,g as _e,A as qe,C as b1,P as mn,F as Lr,L as ve,h as Va,i as l1,j as v1,I as pn,k as gn,l as Da,m as wr,n as xr,o as Pa,p as kr,q as Sr,r as Mr,s as Oa,t as _a,v as Tr,w as Ir,x as Hn,y as Ar}from"./vendor-arizeai-Dq64X_0o.js";import{L as Fa,a as Ra,j as Na,E as hn,k as Ha,d as Ka,l as nn,b as $a,h as zr,c as Er,e as Vr,f as Dr,g as Pr,i as Or,s as _r,m as Ba,n as Xe,R as Ye,p as Fr,o as Rr}from"./vendor-codemirror-C1oevlym.js";import{V as Nr}from"./vendor-three-C-AGeJYv.js";const Za=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}],s=[{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:s,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,t,a,i,r],kind:"Operation",name:"pointCloudStore_clusterMetricsQuery",selections:s},params:{cacheID:"86666967012812887ac0a0149d2d2535",id:null,metadata:{},name:"pointCloudStore_clusterMetricsQuery",operationKind:"query",text:`query pointCloudStore_clusterMetricsQuery(
1
+ import{r as g,R as j,j as e,u as ba,a as Me,e as a1,s as V1,b as D1,c as $e,d as Q1,f as gi,g as fe,h as hi,i as fi,k as q1,l,m as Ci,n as Te,C as o1,o as We,p as Qe,q as bi,t as vi,v as R,w as ln,L as va,x as ya,y as La,z as ce,A as v,B as g1,D as sn,E as p,F as wa,$ as yi,G as xa,H as ka,I as xe,J as Li,K as cn,M as wi,N as xi,O as q,P as X1,Q as O,S as K,T as N,U as Sa,V as Ma,W as ki,X as h1,Y as Ta,Z as Si,_ as Mi,a0 as Ti,a1 as Ii,a2 as Ai,a3 as zi,a4 as Ei,a5 as Vi,a6 as f1,a7 as Di,a8 as Pi,a9 as Oi,aa as _i,ab as ke,ac as Y1,ad as J1,ae as en,af as F,ag as Oe,ah as _n,ai as Fi,aj as Ri,ak as Ni,al as Ia,am as Hi,an as _,ao as Aa,ap as Ki,aq as ze,ar as dn,as as $i,at as un,au as Bi,av as Zi,aw as Gi,ax as ji,ay as Ui,az as Wi,aA as Fn,aB as Qi,aC as qi,aD as Xi,aE as Rn,aF as Yi,aG as Ji,aH as er,aI as P1,aJ as nr,aK as ar,aL as tr,aM as ir,aN as rr,aO as or,aP as lr,aQ as sr,aR as cr,aS as dr}from"./vendor-CRRq3WgM.js";import{a as Nn,R as ur,b as mr,c as pr,m as gr,T as hr,u as fr}from"./pages-B8pBNWCb.js";import{u as Cr,_ as za,a as re,T as X,E as Ea,b as br,c as vr,d as Se,D as C1,e as ye,f as yr,g as _e,A as qe,C as b1,P as mn,F as Lr,L as ve,h as Va,i as l1,j as v1,I as pn,k as gn,l as Da,m as wr,n as xr,o as Pa,p as kr,q as Sr,r as Mr,s as Oa,t as _a,v as Tr,w as Ir,x as Hn,y as Ar}from"./vendor-arizeai-Dq64X_0o.js";import{L as Fa,a as Ra,j as Na,E as hn,k as Ha,d as Ka,l as nn,b as $a,h as zr,c as Er,e as Vr,f as Dr,g as Pr,i as Or,s as _r,m as Ba,n as Xe,R as Ye,p as Fr,o as Rr}from"./vendor-codemirror-C1oevlym.js";import{V as Nr}from"./vendor-three-C-AGeJYv.js";const Za=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}],s=[{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:s,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,t,a,i,r],kind:"Operation",name:"pointCloudStore_clusterMetricsQuery",selections:s},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