arize-phoenix 5.2.0__py3-none-any.whl → 5.2.2__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: arize-phoenix
3
- Version: 5.2.0
3
+ Version: 5.2.2
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
@@ -38,7 +38,7 @@ Requires-Dist: opentelemetry-proto>=1.12.0
38
38
  Requires-Dist: opentelemetry-sdk
39
39
  Requires-Dist: opentelemetry-semantic-conventions
40
40
  Requires-Dist: pandas>=1.0
41
- Requires-Dist: protobuf<6.0,>=3.20
41
+ Requires-Dist: protobuf<6.0,>=3.20.2
42
42
  Requires-Dist: psutil
43
43
  Requires-Dist: pyarrow
44
44
  Requires-Dist: pydantic!=2.0.*,<3,>=1.0
@@ -96,7 +96,7 @@ Requires-Dist: pytest-cov; extra == 'dev'
96
96
  Requires-Dist: pytest-postgresql; extra == 'dev'
97
97
  Requires-Dist: pytest-xdist; extra == 'dev'
98
98
  Requires-Dist: pytest==8.3.3; extra == 'dev'
99
- Requires-Dist: ruff==0.6.8; extra == 'dev'
99
+ Requires-Dist: ruff==0.6.9; extra == 'dev'
100
100
  Requires-Dist: strawberry-graphql[debug-server,opentelemetry]==0.243.1; extra == 'dev'
101
101
  Requires-Dist: tabulate; extra == 'dev'
102
102
  Requires-Dist: tox-uv==1.11.3; extra == 'dev'
@@ -1,12 +1,12 @@
1
1
  phoenix/__init__.py,sha256=X3eUEwd2rG8KKWWYVNNDJoqo08ihfjgHhlP29dcdNJE,5481
2
2
  phoenix/auth.py,sha256=JpkwJbis2INlIXWcQ-M_Nk5Ln9LBgHMdWNnaAQp0D2w,10940
3
- phoenix/config.py,sha256=J33eSSEMEnHGUhYhPN4c1Psoq0-7C7rloO0PiEssIsU,21703
3
+ phoenix/config.py,sha256=LApKCyQYj8qXKXPcbXK_l1uWrcaD-m_Gg9R0US05OZg,22790
4
4
  phoenix/datetime_utils.py,sha256=yDKjwX2Vtqw9h5F_ProtP-TsXidM43uIvmJ_pOzYc9A,3405
5
5
  phoenix/exceptions.py,sha256=n2L2KKuecrdflB9MsCdAYCiSEvGJptIsfRkXMoJle7A,169
6
6
  phoenix/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
7
7
  phoenix/services.py,sha256=aTxhcOA1pZHB6U-B3TEcp6fqDF5oT0xCUvEUNMZVTUQ,5175
8
8
  phoenix/settings.py,sha256=ht-0oN-sMV6SPXrk7Tu1EZlngpAYkGNLYPhO8DyrdQI,661
9
- phoenix/version.py,sha256=VqMNAkt1E9Y42lSKxWJZRHYFFLxlGbjtTti_CRNjAv8,22
9
+ phoenix/version.py,sha256=upVnkczTW3RuoVoIte6QKrtd01BebChSm9nM9a9h554,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=km_a--PBHOuA337ClRw9xqhOHhrUT6Rl9pz_zV0JYkQ,4843
@@ -73,7 +73,7 @@ phoenix/pointcloud/pointcloud.py,sha256=4zAIkKs2xOUbchpj4XDAV-iPMXrfAJ15TG6rlIYG
73
73
  phoenix/pointcloud/projectors.py,sha256=TQgwc9cJDjJkin1WZyZzgl3HsYrLLiyWD7Czy4jNW3U,1088
74
74
  phoenix/pointcloud/umap_parameters.py,sha256=3UQSjrysVOvq2V4KNpTMqNqNiK0BsTZnPBHWZ4fyJtQ,1708
75
75
  phoenix/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
76
- phoenix/server/app.py,sha256=IilHYNvbUp-zJ9mF1HgTRS3QYkTR3MWgPu7wGe21Wcs,32063
76
+ phoenix/server/app.py,sha256=DpwnN2u0A2wE0NCYXMEr5lQmGi7rQsxNWxHB67N8G1o,33511
77
77
  phoenix/server/bearer_auth.py,sha256=hChZ2li9qqQAuXIFtD4bp7Z60gEZhVqfCCqLeiTvD2k,5513
78
78
  phoenix/server/dml_event.py,sha256=MpjCFqljxvgb9OB5Cez9vJesb3oHb3XxXictynBfcis,2851
79
79
  phoenix/server/dml_event_handler.py,sha256=yU23-DDwXcL35p5EPwFW0oZh6mxQxJrJAQPKcYZYJz4,8310
@@ -258,15 +258,15 @@ phoenix/server/static/apple-touch-icon-76x76.png,sha256=CT_xT12I0u2i0WU8JzBZBuOQ
258
258
  phoenix/server/static/apple-touch-icon.png,sha256=fOfpjqGpWYbJ0eAurKsyoZP1EAs6ZVooBJ_SGk2ZkDs,3801
259
259
  phoenix/server/static/favicon.ico,sha256=bY0vvCKRftemZfPShwZtE93DiiQdaYaozkPGwNFr6H8,34494
260
260
  phoenix/server/static/modernizr.js,sha256=mvK-XtkNqjOral-QvzoqsyOMECXIMu5BQwSVN_wcU9c,2564
261
- phoenix/server/static/.vite/manifest.json,sha256=tQOBj8Iziu2DVq_Qj9IU_om1c2kmc0GLIfXZavtRRtc,1929
262
- phoenix/server/static/assets/components-4ANbS7sG.js,sha256=f_MB3rIgNxVf7Hd-EfJ0EmOUuO5YMlvY05YAgOESh0o,260281
263
- phoenix/server/static/assets/index-CwRlD2_T.js,sha256=KD4j4pJgjb5mJSxUlHk8bclgDIFLK6cRWvyLnHAAmHY,6947
264
- phoenix/server/static/assets/pages-IkQNKgib.js,sha256=I3jikb9Up6d6DSZXu6hDOUnJSMW_0PmRYfW-dduHTZo,557886
265
- phoenix/server/static/assets/vendor-CQYk2bLC.js,sha256=phmdcDjuBvBjCYwSZ3KGj4OSxxvxNsUUZ45mBPZngEI,1435307
261
+ phoenix/server/static/.vite/manifest.json,sha256=gCTROgV8rC_a8Uy_Bl3gnCYu9tyWJ28jaDzaLl3jbmI,1929
262
+ phoenix/server/static/assets/components-CPkaHQZs.js,sha256=Ulrdh1WR4aJ-Bwp_dGmJ_QN9yeGWT9AK_j-nOJBebLU,260281
263
+ phoenix/server/static/assets/index-D4G-kYL9.js,sha256=CDjQWCaXN0jslJhKPL2MJbTIvj6Q9y6zkxCdzC_G5qc,6947
264
+ phoenix/server/static/assets/pages-B3HCyYqg.js,sha256=oatFBp_LnmN8ZDfbIlYgZvFMnXhYM7D53NnA--ZnOV4,558077
266
265
  phoenix/server/static/assets/vendor-DxkFTwjz.css,sha256=nZrkr0u6NNElFGvpWHk9GTHeGoibCXCli1bE7mXZGZg,1816
267
- phoenix/server/static/assets/vendor-arizeai-DgvoPlCK.js,sha256=YZon_DqnY1fuUu3pFamINewm0-yP6_KB3wRcb9b-XkE,304401
268
- phoenix/server/static/assets/vendor-codemirror-DcWFlULW.js,sha256=JTd-0Dlowm520AVf7lImq_lhDoBlVjcAK9Vy4K8mSVs,516470
269
- phoenix/server/static/assets/vendor-recharts-BaQGdoah.js,sha256=yCS2cZ7HRKLxB9yx-WZyhBtGmtbcJ-AAhoww-p7lAt4,282859
266
+ phoenix/server/static/assets/vendor-arizeai-D0FocbYu.js,sha256=LBSQfCGoMfpBM4z07dBmtkz6X4eDwkexjBquRb0Bryk,304401
267
+ phoenix/server/static/assets/vendor-c0HJYYGN.js,sha256=z77lnhNE72Xtm8TRlnFun3rTvTZzZhKsdEqFjPUUXU8,1439814
268
+ phoenix/server/static/assets/vendor-codemirror-BbCMI-_D.js,sha256=FGcnEPHs5YUImRpxqqEhR4aMLQfkhCbJj74B33L_4_k,660329
269
+ phoenix/server/static/assets/vendor-recharts-JMOLUxWG.js,sha256=UAJkbccDXd2i7Fx3CJpuOtPeb1ty9rjrI0Vx2-NteAE,282859
270
270
  phoenix/server/static/assets/vendor-three-DwGkEfCM.js,sha256=0D12ZgKzfKCTSdSTKJBFR2RZO_xxeMXrqDp0AszZqHY,620972
271
271
  phoenix/server/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
272
272
  phoenix/server/templates/index.html,sha256=ULNlp0-agU8pH4wCIapE1goqnwkbctAoQRgrfwH_irg,4379
@@ -306,9 +306,9 @@ phoenix/utilities/logging.py,sha256=B8t2WPULOwVyuGLRLbwKsw5N41N26vtgF-lCAYgWTEk,
306
306
  phoenix/utilities/project.py,sha256=8IJuMM4yUMoooPi37sictGj8Etu9rGmq6RFtc9848cQ,436
307
307
  phoenix/utilities/re.py,sha256=nr_B0txj_7CXc45953X6vr2KCRSWMuaXJSEkL8s8Sjc,2036
308
308
  phoenix/utilities/span_store.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
309
- arize_phoenix-5.2.0.dist-info/METADATA,sha256=nVtj-KDh3ofDUhefKI_lOJ6Afnbmz6kFsia44aTPSfo,11973
310
- arize_phoenix-5.2.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
311
- arize_phoenix-5.2.0.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
312
- arize_phoenix-5.2.0.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
313
- arize_phoenix-5.2.0.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
314
- arize_phoenix-5.2.0.dist-info/RECORD,,
309
+ arize_phoenix-5.2.2.dist-info/METADATA,sha256=20OXGO9_QSqH44k1sYd1vBy3Hy3_4_3QQ5wFe3wlmMg,11975
310
+ arize_phoenix-5.2.2.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
311
+ arize_phoenix-5.2.2.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
312
+ arize_phoenix-5.2.2.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
313
+ arize_phoenix-5.2.2.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
314
+ arize_phoenix-5.2.2.dist-info/RECORD,,
phoenix/config.py CHANGED
@@ -107,6 +107,14 @@ ENV_PHOENIX_PASSWORD_RESET_TOKEN_EXPIRY_MINUTES = "PHOENIX_PASSWORD_RESET_TOKEN_
107
107
  """
108
108
  The duration, in minutes, before password reset tokens expire.
109
109
  """
110
+ ENV_PHOENIX_CSRF_TRUSTED_ORIGINS = "PHOENIX_CSRF_TRUSTED_ORIGINS"
111
+ """
112
+ A comma-separated list of origins allowed to bypass Cross-Site Request Forgery (CSRF)
113
+ protection. This setting is recommended when configuring OAuth2 clients or sending
114
+ password reset emails. If this variable is left unspecified or contains no origins, CSRF
115
+ protection will not be enabled. In such cases, when a request includes `origin` or `referer`
116
+ headers, those values will not be validated.
117
+ """
110
118
 
111
119
  # SMTP settings
112
120
  ENV_PHOENIX_SMTP_HOSTNAME = "PHOENIX_SMTP_HOSTNAME"
@@ -321,6 +329,22 @@ def get_env_refresh_token_expiry() -> timedelta:
321
329
  return timedelta(minutes=minutes)
322
330
 
323
331
 
332
+ def get_env_csrf_trusted_origins() -> List[str]:
333
+ origins: List[str] = []
334
+ if not (csrf_trusted_origins := os.getenv(ENV_PHOENIX_CSRF_TRUSTED_ORIGINS)):
335
+ return origins
336
+ for origin in csrf_trusted_origins.split(","):
337
+ if not origin:
338
+ continue
339
+ if not urlparse(origin).hostname:
340
+ raise ValueError(
341
+ f"The environment variable `{ENV_PHOENIX_CSRF_TRUSTED_ORIGINS}` contains a url "
342
+ f"with missing hostname. Please ensure that each url has a valid hostname."
343
+ )
344
+ origins.append(origin)
345
+ return sorted(set(origins))
346
+
347
+
324
348
  def get_env_smtp_username() -> str:
325
349
  return os.getenv(ENV_PHOENIX_SMTP_USERNAME) or ""
326
350
 
phoenix/server/app.py CHANGED
@@ -27,6 +27,7 @@ from typing import (
27
27
  Union,
28
28
  cast,
29
29
  )
30
+ from urllib.parse import urlparse
30
31
 
31
32
  import strawberry
32
33
  from fastapi import APIRouter, Depends, FastAPI
@@ -42,6 +43,7 @@ from starlette.middleware.base import BaseHTTPMiddleware, RequestResponseEndpoin
42
43
  from starlette.requests import Request
43
44
  from starlette.responses import PlainTextResponse, Response
44
45
  from starlette.staticfiles import StaticFiles
46
+ from starlette.status import HTTP_401_UNAUTHORIZED
45
47
  from starlette.templating import Jinja2Templates
46
48
  from starlette.types import Scope, StatefulLifespan
47
49
  from strawberry.extensions import SchemaExtension
@@ -53,8 +55,10 @@ import phoenix
53
55
  import phoenix.trace.v1 as pb
54
56
  from phoenix.config import (
55
57
  DEFAULT_PROJECT_NAME,
58
+ ENV_PHOENIX_CSRF_TRUSTED_ORIGINS,
56
59
  SERVER_DIR,
57
60
  OAuth2ClientConfig,
61
+ get_env_csrf_trusted_origins,
58
62
  get_env_host,
59
63
  get_env_port,
60
64
  server_instrumentation_is_enabled,
@@ -226,6 +230,25 @@ class Static(StaticFiles):
226
230
  return response
227
231
 
228
232
 
233
+ class RequestOriginHostnameValidator(BaseHTTPMiddleware):
234
+ def __init__(self, trusted_hostnames: List[str], *args: Any, **kwargs: Any) -> None:
235
+ super().__init__(*args, **kwargs)
236
+ self._trusted_hostnames = trusted_hostnames
237
+
238
+ async def dispatch(
239
+ self,
240
+ request: Request,
241
+ call_next: RequestResponseEndpoint,
242
+ ) -> Response:
243
+ headers = request.headers
244
+ for key in "origin", "referer":
245
+ if not (url := headers.get(key)):
246
+ continue
247
+ if urlparse(url).hostname not in self._trusted_hostnames:
248
+ return Response(f"untrusted {key}", status_code=HTTP_401_UNAUTHORIZED)
249
+ return await call_next(request)
250
+
251
+
229
252
  class HeadersMiddleware(BaseHTTPMiddleware):
230
253
  async def dispatch(
231
254
  self,
@@ -660,6 +683,16 @@ def create_app(
660
683
  )
661
684
  last_updated_at = LastUpdatedAt()
662
685
  middlewares: List[Middleware] = [Middleware(HeadersMiddleware)]
686
+ if origins := get_env_csrf_trusted_origins():
687
+ trusted_hostnames = [h for o in origins if o and (h := urlparse(o).hostname)]
688
+ middlewares.append(Middleware(RequestOriginHostnameValidator, trusted_hostnames))
689
+ elif email_sender or oauth2_client_configs:
690
+ logger.warning(
691
+ "CSRF protection can be enabled by listing trusted origins via "
692
+ f"the `{ENV_PHOENIX_CSRF_TRUSTED_ORIGINS}` environment variable. "
693
+ "This is recommended when setting up OAuth2 clients or sending "
694
+ "password reset emails."
695
+ )
663
696
  if authentication_enabled and secret:
664
697
  token_store = JwtStore(db, secret)
665
698
  middlewares.append(
@@ -1,32 +1,39 @@
1
1
  {
2
- "_components-4ANbS7sG.js": {
3
- "file": "assets/components-4ANbS7sG.js",
2
+ "_components-CPkaHQZs.js": {
3
+ "file": "assets/components-CPkaHQZs.js",
4
4
  "name": "components",
5
5
  "imports": [
6
- "_vendor-CQYk2bLC.js",
7
- "_vendor-arizeai-DgvoPlCK.js",
8
- "_pages-IkQNKgib.js",
6
+ "_vendor-c0HJYYGN.js",
7
+ "_vendor-arizeai-D0FocbYu.js",
8
+ "_pages-B3HCyYqg.js",
9
9
  "_vendor-three-DwGkEfCM.js",
10
- "_vendor-codemirror-DcWFlULW.js"
10
+ "_vendor-codemirror-BbCMI-_D.js"
11
11
  ]
12
12
  },
13
- "_pages-IkQNKgib.js": {
14
- "file": "assets/pages-IkQNKgib.js",
13
+ "_pages-B3HCyYqg.js": {
14
+ "file": "assets/pages-B3HCyYqg.js",
15
15
  "name": "pages",
16
16
  "imports": [
17
- "_vendor-CQYk2bLC.js",
18
- "_vendor-arizeai-DgvoPlCK.js",
19
- "_components-4ANbS7sG.js",
20
- "_vendor-recharts-BaQGdoah.js",
21
- "_vendor-codemirror-DcWFlULW.js"
17
+ "_vendor-c0HJYYGN.js",
18
+ "_vendor-arizeai-D0FocbYu.js",
19
+ "_components-CPkaHQZs.js",
20
+ "_vendor-recharts-JMOLUxWG.js",
21
+ "_vendor-codemirror-BbCMI-_D.js"
22
22
  ]
23
23
  },
24
24
  "_vendor-!~{003}~.js": {
25
25
  "file": "assets/vendor-DxkFTwjz.css",
26
26
  "src": "_vendor-!~{003}~.js"
27
27
  },
28
- "_vendor-CQYk2bLC.js": {
29
- "file": "assets/vendor-CQYk2bLC.js",
28
+ "_vendor-arizeai-D0FocbYu.js": {
29
+ "file": "assets/vendor-arizeai-D0FocbYu.js",
30
+ "name": "vendor-arizeai",
31
+ "imports": [
32
+ "_vendor-c0HJYYGN.js"
33
+ ]
34
+ },
35
+ "_vendor-c0HJYYGN.js": {
36
+ "file": "assets/vendor-c0HJYYGN.js",
30
37
  "name": "vendor",
31
38
  "imports": [
32
39
  "_vendor-three-DwGkEfCM.js"
@@ -35,25 +42,18 @@
35
42
  "assets/vendor-DxkFTwjz.css"
36
43
  ]
37
44
  },
38
- "_vendor-arizeai-DgvoPlCK.js": {
39
- "file": "assets/vendor-arizeai-DgvoPlCK.js",
40
- "name": "vendor-arizeai",
41
- "imports": [
42
- "_vendor-CQYk2bLC.js"
43
- ]
44
- },
45
- "_vendor-codemirror-DcWFlULW.js": {
46
- "file": "assets/vendor-codemirror-DcWFlULW.js",
45
+ "_vendor-codemirror-BbCMI-_D.js": {
46
+ "file": "assets/vendor-codemirror-BbCMI-_D.js",
47
47
  "name": "vendor-codemirror",
48
48
  "imports": [
49
- "_vendor-CQYk2bLC.js"
49
+ "_vendor-c0HJYYGN.js"
50
50
  ]
51
51
  },
52
- "_vendor-recharts-BaQGdoah.js": {
53
- "file": "assets/vendor-recharts-BaQGdoah.js",
52
+ "_vendor-recharts-JMOLUxWG.js": {
53
+ "file": "assets/vendor-recharts-JMOLUxWG.js",
54
54
  "name": "vendor-recharts",
55
55
  "imports": [
56
- "_vendor-CQYk2bLC.js"
56
+ "_vendor-c0HJYYGN.js"
57
57
  ]
58
58
  },
59
59
  "_vendor-three-DwGkEfCM.js": {
@@ -61,18 +61,18 @@
61
61
  "name": "vendor-three"
62
62
  },
63
63
  "index.tsx": {
64
- "file": "assets/index-CwRlD2_T.js",
64
+ "file": "assets/index-D4G-kYL9.js",
65
65
  "name": "index",
66
66
  "src": "index.tsx",
67
67
  "isEntry": true,
68
68
  "imports": [
69
- "_vendor-CQYk2bLC.js",
70
- "_vendor-arizeai-DgvoPlCK.js",
71
- "_pages-IkQNKgib.js",
72
- "_components-4ANbS7sG.js",
69
+ "_vendor-c0HJYYGN.js",
70
+ "_vendor-arizeai-D0FocbYu.js",
71
+ "_pages-B3HCyYqg.js",
72
+ "_components-CPkaHQZs.js",
73
73
  "_vendor-three-DwGkEfCM.js",
74
- "_vendor-recharts-BaQGdoah.js",
75
- "_vendor-codemirror-DcWFlULW.js"
74
+ "_vendor-recharts-JMOLUxWG.js",
75
+ "_vendor-codemirror-BbCMI-_D.js"
76
76
  ]
77
77
  }
78
78
  }
@@ -1,4 +1,4 @@
1
- import{c as Be,p as at,d as $e,r as g,j as e,R as W,n as U1,a as Pe,C as Oe,b as X,s as it,e as rt,f as de,g as _e,h as Xe,i as ze,k as ue,l as r1,m as lt,o as le,q as ot,t as st,u as l1,v as o,w as m,L as Q1,x as ct,N as dt,y as ut,z as mt,$ as N,A as Ze,B as pt,D as ht,E as gt,F as ft,G as w1,H as ce,I as he,J as Lt,K as j1,S as Ct,M as yt,Q as x1,O as vt,P as bt,T as kt,U as Je,V as q1,W as wt,X as xt,Y as St,Z as Mt,_ as Tt,a0 as It,a1 as Et,a2 as Dt,a3 as Vt,a4 as Te,a5 as P,a6 as W1,a7 as Ft,a8 as Pt,a9 as _t,aa as At,ab as Nt,ac as zt,ad as Rt}from"./vendor-CQYk2bLC.js";import{u as Ot,A as Kt,I,a as x,_ as X1,b as v,c as D,d as b,e as K,f as q,T as B,g as Ht,h as Y,i as Ie,j as V,F as J1,k as z,l as Bt,m as $t,P as Zt,R as U,n as Ee,o as Gt,p as Ut,L as c1,q as ee,r as ne,s as De,t as Y1,v as en,E as nn,w as Qt,x as jt,y as qt,z as Wt,B as tn,C as d1,D as Xt,G as Jt,H as S1,J as Yt}from"./vendor-arizeai-DgvoPlCK.js";import{u as ea}from"./pages-IkQNKgib.js";import{V as na}from"./vendor-three-DwGkEfCM.js";import{j as an,E as rn,l as ln,a as on,R as Ge,n as Ue,p as ta,b as aa}from"./vendor-codemirror-DcWFlULW.js";const ia=n=>{const t=a=>({markdownDisplayMode:"text",setMarkdownDisplayMode:i=>{a({markdownDisplayMode:i})},traceStreamingEnabled:!0,setTraceStreamingEnabled:i=>{a({traceStreamingEnabled:i})},lastNTimeRangeKey:"7d",setLastNTimeRangeKey:i=>{a({lastNTimeRangeKey:i})},projectsAutoRefreshEnabled:!0,setProjectAutoRefreshEnabled:i=>{a({projectsAutoRefreshEnabled:i})},showSpanAside:!0,setShowSpanAside:i=>{a({showSpanAside:i})},showMetricsInTraceTree:!0,setShowMetricsInTraceTree:i=>{a({showMetricsInTraceTree:i})},...n});return Be()(at($e(t),{name:"arize-phoenix-preferences"}))},sn=g.createContext(null);function ol({children:n,...t}){const[a]=g.useState(()=>ia(t));return e(sn.Provider,{value:a,children:n})}function se(n,t){const a=W.useContext(sn);if(!a)throw new Error("Missing PreferencesContext.Provider in the tree");return U1(a,n,t)}var Q=(n=>(n.primary="primary",n.reference="reference",n.corpus="corpus",n))(Q||{});function R(n){throw new Error("Unreachable")}function u1(n){return typeof n=="number"||n===null}function ra(n){return typeof n=="string"||n===null}function sl(n){return Array.isArray(n)?n.every(t=>typeof t=="string"):!1}function la(n){return typeof n=="object"&&n!==null}const m1=g.createContext(null);function Qe(){const n=W.useContext(m1);if(n===null)throw new Error("useInferences must be used within a InferencesProvider");return n}function cl(n){return e(m1.Provider,{value:{primaryInferences:n.primaryInferences,referenceInferences:n.referenceInferences,corpusInferences:n.corpusInferences,getInferencesNameByRole:t=>{var a,i;switch(t){case Q.primary:return n.primaryInferences.name;case Q.reference:return((a=n.referenceInferences)==null?void 0:a.name)??"reference";case Q.corpus:return((i=n.corpusInferences)==null?void 0:i.name)??"corpus";default:R()}}},children:n.children})}const cn=function(){var n={defaultValue:null,kind:"LocalArgument",name:"clusters"},t={defaultValue:null,kind:"LocalArgument",name:"dataQualityMetricColumnName"},a={defaultValue:null,kind:"LocalArgument",name:"fetchDataQualityMetric"},i={defaultValue:null,kind:"LocalArgument",name:"fetchPerformanceMetric"},r={defaultValue:null,kind:"LocalArgument",name:"performanceMetric"},l=[{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:l,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:l,storageKey:null}]}],storageKey:null}];return{fragment:{argumentDefinitions:[n,t,a,i,r],kind:"Fragment",metadata:null,name:"pointCloudStore_clusterMetricsQuery",selections:s,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,a,t,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{c as Be,p as at,d as $e,r as g,j as e,R as W,n as U1,a as Pe,C as Oe,b as X,s as it,e as rt,f as de,g as _e,h as Xe,i as ze,k as ue,l as r1,m as lt,o as le,q as ot,t as st,u as l1,v as o,w as m,L as Q1,x as ct,N as dt,y as ut,z as mt,$ as N,A as Ze,B as pt,D as ht,E as gt,F as ft,G as w1,H as ce,I as he,J as Lt,K as j1,S as Ct,M as yt,Q as x1,O as vt,P as bt,T as kt,U as Je,V as q1,W as wt,X as xt,Y as St,Z as Mt,_ as Tt,a0 as It,a1 as Et,a2 as Dt,a3 as Vt,a4 as Te,a5 as P,a6 as W1,a7 as Ft,a8 as Pt,a9 as _t,aa as At,ab as Nt,ac as zt,ad as Rt}from"./vendor-c0HJYYGN.js";import{u as Ot,A as Kt,I,a as x,_ as X1,b as v,c as D,d as b,e as K,f as q,T as B,g as Ht,h as Y,i as Ie,j as V,F as J1,k as z,l as Bt,m as $t,P as Zt,R as U,n as Ee,o as Gt,p as Ut,L as c1,q as ee,r as ne,s as De,t as Y1,v as en,E as nn,w as Qt,x as jt,y as qt,z as Wt,B as tn,C as d1,D as Xt,G as Jt,H as S1,J as Yt}from"./vendor-arizeai-D0FocbYu.js";import{u as ea}from"./pages-B3HCyYqg.js";import{V as na}from"./vendor-three-DwGkEfCM.js";import{j as an,E as rn,l as ln,a as on,R as Ge,n as Ue,p as ta,b as aa}from"./vendor-codemirror-BbCMI-_D.js";const ia=n=>{const t=a=>({markdownDisplayMode:"text",setMarkdownDisplayMode:i=>{a({markdownDisplayMode:i})},traceStreamingEnabled:!0,setTraceStreamingEnabled:i=>{a({traceStreamingEnabled:i})},lastNTimeRangeKey:"7d",setLastNTimeRangeKey:i=>{a({lastNTimeRangeKey:i})},projectsAutoRefreshEnabled:!0,setProjectAutoRefreshEnabled:i=>{a({projectsAutoRefreshEnabled:i})},showSpanAside:!0,setShowSpanAside:i=>{a({showSpanAside:i})},showMetricsInTraceTree:!0,setShowMetricsInTraceTree:i=>{a({showMetricsInTraceTree:i})},...n});return Be()(at($e(t),{name:"arize-phoenix-preferences"}))},sn=g.createContext(null);function ol({children:n,...t}){const[a]=g.useState(()=>ia(t));return e(sn.Provider,{value:a,children:n})}function se(n,t){const a=W.useContext(sn);if(!a)throw new Error("Missing PreferencesContext.Provider in the tree");return U1(a,n,t)}var Q=(n=>(n.primary="primary",n.reference="reference",n.corpus="corpus",n))(Q||{});function R(n){throw new Error("Unreachable")}function u1(n){return typeof n=="number"||n===null}function ra(n){return typeof n=="string"||n===null}function sl(n){return Array.isArray(n)?n.every(t=>typeof t=="string"):!1}function la(n){return typeof n=="object"&&n!==null}const m1=g.createContext(null);function Qe(){const n=W.useContext(m1);if(n===null)throw new Error("useInferences must be used within a InferencesProvider");return n}function cl(n){return e(m1.Provider,{value:{primaryInferences:n.primaryInferences,referenceInferences:n.referenceInferences,corpusInferences:n.corpusInferences,getInferencesNameByRole:t=>{var a,i;switch(t){case Q.primary:return n.primaryInferences.name;case Q.reference:return((a=n.referenceInferences)==null?void 0:a.name)??"reference";case Q.corpus:return((i=n.corpusInferences)==null?void 0:i.name)??"corpus";default:R()}}},children:n.children})}const cn=function(){var n={defaultValue:null,kind:"LocalArgument",name:"clusters"},t={defaultValue:null,kind:"LocalArgument",name:"dataQualityMetricColumnName"},a={defaultValue:null,kind:"LocalArgument",name:"fetchDataQualityMetric"},i={defaultValue:null,kind:"LocalArgument",name:"fetchPerformanceMetric"},r={defaultValue:null,kind:"LocalArgument",name:"performanceMetric"},l=[{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:l,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:l,storageKey:null}]}],storageKey:null}];return{fragment:{argumentDefinitions:[n,t,a,i,r],kind:"Fragment",metadata:null,name:"pointCloudStore_clusterMetricsQuery",selections:s,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,a,t,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
@@ -1,4 +1,4 @@
1
- import{j as e,w as h,aR as b,d6 as x,d7 as f,v as n,d8 as r,d9 as y,da as P,r as v,b as w,db as R}from"./vendor-CQYk2bLC.js";import{v as L,a4 as z}from"./vendor-arizeai-DgvoPlCK.js";import{E,L as k,R as $,r as j,a as S,F as A,A as I,b as F,c as T,P as C,h as O,M as D,d,D as B,e as M,f as N,g as q,i as G,j as W,T as K,p as H,k as c,l as J,m as Q,n as p,o as U,q as m,s as g,t as V,v as X,w as Y,x as Z,y as _,z as ee,B as re,S as ae,C as oe,G as te}from"./pages-IkQNKgib.js";import{bo as ne,i as se,R as le,bp as ie,bq as de}from"./components-4ANbS7sG.js";import"./vendor-three-DwGkEfCM.js";import"./vendor-recharts-BaQGdoah.js";import"./vendor-codemirror-DcWFlULW.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const t of o)if(t.type==="childList")for(const l of t.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function u(o){const t={};return o.integrity&&(t.integrity=o.integrity),o.referrerPolicy&&(t.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?t.credentials="include":o.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(o){if(o.ep)return;o.ep=!0;const t=u(o);fetch(o.href,t)}})();function ce(){return e(b,{styles:a=>h`
1
+ import{j as e,w as h,aR as b,d7 as x,d8 as f,v as n,d9 as r,da as y,db as P,r as v,b as w,dc as R}from"./vendor-c0HJYYGN.js";import{v as L,a4 as z}from"./vendor-arizeai-D0FocbYu.js";import{E,L as k,R as $,r as j,a as S,F as A,A as I,b as F,c as T,P as C,h as O,M as D,d,D as B,e as M,f as N,g as q,i as G,j as W,T as K,p as H,k as c,l as J,m as Q,n as p,o as U,q as m,s as g,t as V,v as X,w as Y,x as Z,y as _,z as ee,B as re,S as ae,C as oe,G as te}from"./pages-B3HCyYqg.js";import{bo as ne,i as se,R as le,bp as ie,bq as de}from"./components-CPkaHQZs.js";import"./vendor-three-DwGkEfCM.js";import"./vendor-recharts-JMOLUxWG.js";import"./vendor-codemirror-BbCMI-_D.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const t of o)if(t.type==="childList")for(const l of t.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function u(o){const t={};return o.integrity&&(t.integrity=o.integrity),o.referrerPolicy&&(t.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?t.credentials="include":o.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(o){if(o.ep)return;o.ep=!0;const t=u(o);fetch(o.href,t)}})();function ce(){return e(b,{styles:a=>h`
2
2
  body {
3
3
  background-color: var(--ac-global-color-grey-75);
4
4
  color: var(--ac-global-text-color-900);