arize-phoenix 2.4.1rc7__py3-none-any.whl → 2.4.1rc9__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.1
2
2
  Name: arize-phoenix
3
- Version: 2.4.1rc7
3
+ Version: 2.4.1rc9
4
4
  Summary: ML Observability in your notebook
5
5
  Project-URL: Documentation, https://docs.arize.com/phoenix/
6
6
  Project-URL: Issues, https://github.com/Arize-ai/phoenix/issues
@@ -4,7 +4,7 @@ phoenix/datetime_utils.py,sha256=D955QLrkgrrSdUM6NyqbCeAu2SMsjhR5rHVQEsVUdng,277
4
4
  phoenix/exceptions.py,sha256=igIWGAg3m8jm5YwQDeCY1p8ml_60A7zaGVXJ1yZhY9s,44
5
5
  phoenix/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
6
6
  phoenix/services.py,sha256=f6AeyKTuOpy9RCcTCjVH3gx5nYZhbTMFOuv1WSUOB5o,4992
7
- phoenix/version.py,sha256=6MTHjTynSYAE6HRt-H9tZfIrR0KFY9-QPoh2nbs-WnA,25
7
+ phoenix/version.py,sha256=cl8HhQP1c4TLftr0CGm7Pdu7eOjzwAfHNDqZJusK81k,25
8
8
  phoenix/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  phoenix/core/embedding_dimension.py,sha256=zKGbcvwOXgLf-yrJBpQyKtd-LEOPRKHnUToyAU8Owis,87
10
10
  phoenix/core/evals.py,sha256=OrHeYlh804rpcZIXTA6kan2mzSZMfgpphNNQdPMpNoM,7597
@@ -55,11 +55,11 @@ phoenix/pointcloud/pointcloud.py,sha256=ms-h1FLC0xXb3sk256zpSuZQDE2hdOAJzRNBklP0
55
55
  phoenix/pointcloud/projectors.py,sha256=zO_RrtDYSv2rqVOfIP2_9Cv11Dc8EmcZR94xhFcBYPU,1057
56
56
  phoenix/pointcloud/umap_parameters.py,sha256=lJsEOrbSuSiqI7g4Yt6xj7kgYxEqoep4ZHWLr6VWBqw,1760
57
57
  phoenix/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
58
- phoenix/server/app.py,sha256=moiXf69APCeN2NRU-JtXEBsCkF-iekfTOouh2oacTxo,7480
58
+ phoenix/server/app.py,sha256=8v1lBRZsLnmAat46xwmFLsxQjo_seObK1myukrnkXyE,6880
59
59
  phoenix/server/evaluation_handler.py,sha256=HzaoD8Cv9HbEdd0nYSTZoakKsE8Ic5lVjeuBh0vnhoA,1554
60
60
  phoenix/server/main.py,sha256=ZWV_UQOE2c5Gx4x_2UQiZIww3JMRWosza5BbzstTUsg,6814
61
61
  phoenix/server/span_handler.py,sha256=reYUDaN5bavSFjEiSfvYyAG_mpJs6S3iB-RNCkZrSUU,1295
62
- phoenix/server/thread_server.py,sha256=z6VwimjlHEsOavlybcQFVWubZvHDGYOH7p61nscC0lU,2164
62
+ phoenix/server/thread_server.py,sha256=dP6cm6Cf08jNhDA1TRlVZpziu1YgtPDmaeIJMm725eI,2154
63
63
  phoenix/server/trace_handler.py,sha256=pXanrp9L21Mh7MnyJbj202NJ-Rn4bCjG0oL4DtdKcls,2074
64
64
  phoenix/server/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
65
65
  phoenix/server/api/context.py,sha256=02vRgyLFpDCmh97QwsjWD5cdNZkoCUtDPPs1YItbdbI,583
@@ -130,10 +130,10 @@ phoenix/server/static/index.js,sha256=dJKCIzqIRBf_IKfXUbnSZnegpgnfMV3wsnFGXWV9Ie
130
130
  phoenix/server/static/index.js.map,sha256=Pe5FBAB7cKnRik9CrPFsP4AHe3MR3LUI7OShR2pA5ys,15465655
131
131
  phoenix/server/static/modernizr.js,sha256=mvK-XtkNqjOral-QvzoqsyOMECXIMu5BQwSVN_wcU9c,2564
132
132
  phoenix/server/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
133
- phoenix/server/templates/index.html,sha256=K6l-H24QcFpTF5uJkaL8HE9Ebtf6U9GFpYXd6ltxT38,1948
133
+ phoenix/server/templates/index.html,sha256=DlfcGoq1V5C2QkJWqP1j4Nu6_kPfsOzOrtzYF3ogghE,1900
134
134
  phoenix/session/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
135
135
  phoenix/session/evaluation.py,sha256=s5OivScAMSj8qfU4IexpmbyKvcGBj_nt-GP_13_o-iY,4843
136
- phoenix/session/session.py,sha256=McMcxqEabSK3-U3aT9AX6kC-mMx36RofhhYT9t4y2zA,20187
136
+ phoenix/session/session.py,sha256=2em59avmwV3lv37qMcOUg32P85de-vr0Mv8v12iAMM8,20023
137
137
  phoenix/trace/__init__.py,sha256=4d_MqzUIFmlY9WWcFeTONJ4xL5mPGoWZaPM2TJ0ZDBQ,266
138
138
  phoenix/trace/evaluation_conventions.py,sha256=t8jydM3U0-T5YpiQKRJ3tWdWGlHtzKyttYdw-ddvPOk,1048
139
139
  phoenix/trace/exporter.py,sha256=z3xrGJhIRh7XMy4Q1FkR3KmFZym-GX0XxLTZ6eSnN0Q,4347
@@ -167,8 +167,8 @@ phoenix/trace/v1/evaluation_pb2.pyi,sha256=cCbbx06gwQmaH14s3J1X25TtaARh-k1abbxQd
167
167
  phoenix/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
168
168
  phoenix/utilities/error_handling.py,sha256=7b5rpGFj9EWZ8yrZK1IHvxB89suWk3lggDayUQcvZds,1946
169
169
  phoenix/utilities/logging.py,sha256=lDXd6EGaamBNcQxL4vP1au9-i_SXe0OraUDiJOcszSw,222
170
- arize_phoenix-2.4.1rc7.dist-info/METADATA,sha256=idhujLgZiUC8-ChFcyXlhmYRTz3_EvlHXjpDZoxn-Ms,26482
171
- arize_phoenix-2.4.1rc7.dist-info/WHEEL,sha256=9QBuHhg6FNW7lppboF2vKVbCGTVzsFykgRQjjlajrhA,87
172
- arize_phoenix-2.4.1rc7.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
173
- arize_phoenix-2.4.1rc7.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
174
- arize_phoenix-2.4.1rc7.dist-info/RECORD,,
170
+ arize_phoenix-2.4.1rc9.dist-info/METADATA,sha256=XHhMD329fsB0kidIeZci3KdlhdlZp2ofMqXt5MQU7B8,26482
171
+ arize_phoenix-2.4.1rc9.dist-info/WHEEL,sha256=9QBuHhg6FNW7lppboF2vKVbCGTVzsFykgRQjjlajrhA,87
172
+ arize_phoenix-2.4.1rc9.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
173
+ arize_phoenix-2.4.1rc9.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
174
+ arize_phoenix-2.4.1rc9.dist-info/RECORD,,
phoenix/server/app.py CHANGED
@@ -1,10 +1,9 @@
1
1
  import logging
2
- import re
3
2
  from pathlib import Path
4
3
  from typing import Any, NamedTuple, Optional, Union
5
4
 
6
5
  from starlette.applications import Starlette
7
- from starlette.datastructures import Headers, QueryParams
6
+ from starlette.datastructures import QueryParams
8
7
  from starlette.endpoints import HTTPEndpoint
9
8
  from starlette.exceptions import HTTPException
10
9
  from starlette.middleware import Middleware
@@ -51,21 +50,6 @@ def _is_databricks(url: str) -> bool:
51
50
  return "databricks" in url
52
51
 
53
52
 
54
- def _get_basename(request: Request) -> str:
55
- """
56
- Determine the basename for the API and static content.
57
- If the server is running in a hosted notebook, the base URL
58
- must be configured to point to the hosted notebook's proxy.
59
- """
60
- # TODO(mikeldking): convert sagemaker to use root_path
61
- if _is_sagemaker(str(request.url)):
62
- # Sagemaker sets up a proxy at /proxy/6006
63
- # NB: this is the only port that is open
64
- return "/proxy/6006"
65
-
66
- return request.scope.get("root_path", "")
67
-
68
-
69
53
  class Static(StaticFiles):
70
54
  "Static file serving with a fallback to index.html"
71
55
 
@@ -92,9 +76,8 @@ class Static(StaticFiles):
92
76
  "min_dist": self._app_config.min_dist,
93
77
  "n_neighbors": self._app_config.n_neighbors,
94
78
  "n_samples": self._app_config.n_samples,
95
- "basename": _get_basename(request),
79
+ "basename": request.scope.get("root_path", ""),
96
80
  "request": request,
97
- "root_path": request.scope.get("root_path", ""),
98
81
  },
99
82
  )
100
83
  except Exception as e:
@@ -20,13 +20,11 @@
20
20
  </head>
21
21
  <body>
22
22
  <div id="root"></div>
23
- // Request Info:
24
- // URL: {{request.url}}
25
- // Base URL: {{request.base_url}}
26
- // Headers: {{request.headers}}
27
- // Referer: {{referer}}
28
- // Root Path: {{root_path}}
29
23
  <script>(function() {
24
+ // Request Info:
25
+ // URL: {{request.url}}
26
+ // Base URL: {{request.base_url}}
27
+ // Root Path: {{root_path}}
30
28
  Object.defineProperty(window, "Config", {
31
29
  // Place any server-side injected config here
32
30
  // E.g. default UMAP parameters etc. that needs to be
@@ -2,7 +2,7 @@ import asyncio
2
2
  import logging
3
3
  from threading import Thread
4
4
  from time import sleep, time
5
- from typing import Generator, Optional
5
+ from typing import Generator
6
6
 
7
7
  from starlette.applications import Starlette
8
8
  from uvicorn import Config, Server
@@ -97,7 +97,6 @@ class Session(ABC):
97
97
  default_umap_parameters: Optional[Mapping[str, Any]] = None,
98
98
  host: Optional[str] = None,
99
99
  port: Optional[int] = None,
100
- root_path: Optional[str] = None,
101
100
  notebook_env: Optional[NotebookEnvironment] = None,
102
101
  ):
103
102
  self.primary_dataset = primary_dataset
@@ -127,12 +126,12 @@ class Session(ABC):
127
126
 
128
127
  self.host = host or get_env_host()
129
128
  self.port = port or get_env_port()
130
- self.root_path = root_path or ""
131
129
  self.temp_dir = TemporaryDirectory()
132
130
  self.export_path = Path(self.temp_dir.name) / "exports"
133
131
  self.export_path.mkdir(parents=True, exist_ok=True)
134
132
  self.exported_data = ExportedData()
135
133
  self.notebook_env = notebook_env or _get_notebook_environment()
134
+ self.root_path = _get_root_path(self.notebook_env, self.port)
136
135
 
137
136
  @abstractmethod
138
137
  def end(self) -> None:
@@ -239,7 +238,6 @@ class ProcessSession(Session):
239
238
  default_umap_parameters=default_umap_parameters,
240
239
  host=host,
241
240
  port=port,
242
- root_path=root_path,
243
241
  notebook_env=notebook_env,
244
242
  )
245
243
  primary_dataset.to_disc()
@@ -303,7 +301,6 @@ class ThreadSession(Session):
303
301
  default_umap_parameters=default_umap_parameters,
304
302
  host=host,
305
303
  port=port,
306
- root_path=root_path,
307
304
  notebook_env=notebook_env,
308
305
  )
309
306
  # Initialize an app service that keeps the server running
@@ -410,7 +407,6 @@ def launch_app(
410
407
 
411
408
  host = host or get_env_host()
412
409
  port = port or get_env_port()
413
- root_path = _get_root_path(nb_env, port)
414
410
 
415
411
  if run_in_thread:
416
412
  _session = ThreadSession(
@@ -421,7 +417,6 @@ def launch_app(
421
417
  default_umap_parameters,
422
418
  host=host,
423
419
  port=port,
424
- root_path=root_path,
425
420
  notebook_env=nb_env,
426
421
  )
427
422
  # TODO: catch exceptions from thread
@@ -434,7 +429,6 @@ def launch_app(
434
429
  default_umap_parameters,
435
430
  host=host,
436
431
  port=port,
437
- root_path=root_path,
438
432
  notebook_env=nb_env,
439
433
  )
440
434
 
@@ -565,11 +559,12 @@ def _get_sagemaker_notebook_base_url() -> str:
565
559
  return f"https://{notebook_instance_name}.notebook.{region}.sagemaker.aws"
566
560
 
567
561
 
568
- def _get_root_path(environment: Optional[NotebookEnvironment], port: int) -> str:
562
+ def _get_root_path(environment: NotebookEnvironment, port: int) -> str:
569
563
  """
570
564
  Returns the base path for the app if the app is running behind a proxy
571
565
  """
572
- print(f"getting root path for {environment}")
566
+ if environment == NotebookEnvironment.SAGEMAKER:
567
+ return f"/proxy/{port}/"
573
568
  if environment == NotebookEnvironment.DATABRICKS:
574
569
  context = _get_databricks_context()
575
570
  return f"/driver-proxy/o/{context.org_id}/{context.cluster_id}/{port}/"
@@ -585,7 +580,7 @@ class DatabricksContext(NamedTuple):
585
580
  def _get_databricks_context() -> DatabricksContext:
586
581
  """
587
582
  Returns the databricks context for constructing the base url
588
- and the base_path for the app
583
+ and the root_path for the app
589
584
  """
590
585
  import IPython
591
586
 
@@ -606,4 +601,4 @@ def _get_databricks_notebook_base_url(context: DatabricksContext) -> str:
606
601
  """
607
602
  Returns base url of the databricks notebook by parsing the tags
608
603
  """
609
- return f"https://{context.host}/driver-proxy/o/{context.org_id}/{context.cluster_id}/"
604
+ return f"https://{context.host}/driver-proxy/o/{context.org_id}/{context.cluster_id}"
phoenix/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "2.4.1rc7"
1
+ __version__ = "2.4.1rc9"