arize-phoenix 2.6.0__py3-none-any.whl → 2.7.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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: arize-phoenix
3
- Version: 2.6.0
3
+ Version: 2.7.0
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
@@ -1,10 +1,10 @@
1
1
  phoenix/__init__.py,sha256=EEh0vZGRQS8686h34GQ64OjQoZ7neKYO_iO5j6Oa9Jw,1402
2
- phoenix/config.py,sha256=wYmvT1I3wad8YIunbsiJ0nBu4-W8pUZwwbs5CxJKRs8,2442
2
+ phoenix/config.py,sha256=RbQw8AkVyI4SSo5CD520AjUNcwkDNOGZA6_ErE48R7A,3454
3
3
  phoenix/datetime_utils.py,sha256=D955QLrkgrrSdUM6NyqbCeAu2SMsjhR5rHVQEsVUdng,2773
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=OEib63e0yPEGlhEXyrWE1OwRnleR0cHI7KSX7oZEQLs,22
7
+ phoenix/version.py,sha256=EtKWW0Hnl5oWglRNH0HZigvcDT2FEs58ek8buJdwW1E,22
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=gJyqQzpud5YjtoY8h4pgXvHDsdubGfqmEewLuZHPPmQ,10224
@@ -37,7 +37,7 @@ phoenix/experimental/evals/models/rate_limiters.py,sha256=5GVN0RQKt36Przg3-9jLgo
37
37
  phoenix/experimental/evals/models/vertex.py,sha256=52A1g8j54_VkahjQmLj0eguPKJdQj0xtI4dAlrLsgtY,6592
38
38
  phoenix/experimental/evals/models/vertexai.py,sha256=NfBpQq0l7XzP-wDEDsK27IRiQBzA1GXEdfwlAf8leX4,5609
39
39
  phoenix/experimental/evals/templates/__init__.py,sha256=GSJSoWJ4jwyoUANniidmWMUtXQhNQYbTJbfFqCvuYuo,1470
40
- phoenix/experimental/evals/templates/default_templates.py,sha256=QzPhILbgpOd8NJquSep60nWNMWVXqsDTGDmf3nYlvjc,21201
40
+ phoenix/experimental/evals/templates/default_templates.py,sha256=dVKmoLwqgAyGcRuezz9WKnXSHhw7-qk1R8j6wSmqh0s,20722
41
41
  phoenix/experimental/evals/templates/template.py,sha256=ImFSaTPo9oalPNwq7cNdOCndrvuwLuIyIFKsgDVcoJE,6715
42
42
  phoenix/experimental/evals/utils/__init__.py,sha256=608EX7sG0f5oDG__II16J8xnFJiNpY9dI9AC8vXwR00,5601
43
43
  phoenix/experimental/evals/utils/threads.py,sha256=ksI-egarPnlxit0qKKjtjZ2L82qGLxqxZ6s92O0eBA4,1005
@@ -166,8 +166,8 @@ phoenix/trace/v1/evaluation_pb2.pyi,sha256=cCbbx06gwQmaH14s3J1X25TtaARh-k1abbxQd
166
166
  phoenix/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
167
167
  phoenix/utilities/error_handling.py,sha256=7b5rpGFj9EWZ8yrZK1IHvxB89suWk3lggDayUQcvZds,1946
168
168
  phoenix/utilities/logging.py,sha256=lDXd6EGaamBNcQxL4vP1au9-i_SXe0OraUDiJOcszSw,222
169
- arize_phoenix-2.6.0.dist-info/METADATA,sha256=zFZugCwMWGR3N5bvxl7UppXgpsWz0-6kUJ0sELnOwt8,26479
170
- arize_phoenix-2.6.0.dist-info/WHEEL,sha256=mRYSEL3Ih6g5a_CVMIcwiF__0Ae4_gLYh01YFNwiq1k,87
171
- arize_phoenix-2.6.0.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
172
- arize_phoenix-2.6.0.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
173
- arize_phoenix-2.6.0.dist-info/RECORD,,
169
+ arize_phoenix-2.7.0.dist-info/METADATA,sha256=G2XhPSpRh7gJHrTc5_MhOvrpFBTWv0_mjb_mZueDuWI,26479
170
+ arize_phoenix-2.7.0.dist-info/WHEEL,sha256=mRYSEL3Ih6g5a_CVMIcwiF__0Ae4_gLYh01YFNwiq1k,87
171
+ arize_phoenix-2.7.0.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
172
+ arize_phoenix-2.7.0.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
173
+ arize_phoenix-2.7.0.dist-info/RECORD,,
phoenix/config.py CHANGED
@@ -12,6 +12,11 @@ ENV_PHOENIX_COLLECTOR_ENDPOINT = "PHOENIX_COLLECTOR_ENDPOINT"
12
12
  The endpoint traces and evals are sent to. This must be set if the Phoenix
13
13
  server is running on a remote instance.
14
14
  """
15
+ ENV_WORKING_DIR = "PHOENIX_WORKING_DIR"
16
+ """
17
+ The directory in which to save, load, and export datasets. This directory must
18
+ be accessible by both the Phoenix server and the notebook environment.
19
+ """
15
20
 
16
21
 
17
22
  def _get_temp_path() -> Path:
@@ -36,13 +41,16 @@ def get_running_pid() -> Optional[int]:
36
41
  return None
37
42
 
38
43
 
39
- for path in (
40
- ROOT_DIR := Path.home().resolve() / ".phoenix",
41
- EXPORT_DIR := ROOT_DIR / "exports",
42
- DATASET_DIR := ROOT_DIR / "datasets",
43
- TRACE_DATASET_DIR := ROOT_DIR / "trace_datasets",
44
- ):
45
- path.mkdir(parents=True, exist_ok=True)
44
+ def get_working_dir() -> Path:
45
+ """
46
+ Get the working directory for saving, loading, and exporting datasets.
47
+ """
48
+ working_dir_str = os.getenv(ENV_WORKING_DIR)
49
+ if working_dir_str is not None:
50
+ return Path(working_dir_str)
51
+ # Fall back to ~/.phoenix if PHOENIX_WORKING_DIR is not set
52
+ return Path.home().resolve() / ".phoenix"
53
+
46
54
 
47
55
  PHOENIX_DIR = Path(__file__).resolve().parent
48
56
  # Server config
@@ -53,6 +61,23 @@ HOST = "0.0.0.0"
53
61
  PORT = 6006
54
62
  # The prefix of datasets that are auto-assigned a name
55
63
  GENERATED_DATASET_NAME_PREFIX = "phoenix_dataset_"
64
+ # The work directory for saving, loading, and exporting datasets
65
+ WORKING_DIR = get_working_dir()
66
+
67
+ try:
68
+ for path in (
69
+ ROOT_DIR := WORKING_DIR,
70
+ EXPORT_DIR := ROOT_DIR / "exports",
71
+ DATASET_DIR := ROOT_DIR / "datasets",
72
+ TRACE_DATASET_DIR := ROOT_DIR / "trace_datasets",
73
+ ):
74
+ path.mkdir(parents=True, exist_ok=True)
75
+ except Exception as e:
76
+ print(
77
+ f"⚠️ Failed to initialize the working directory at {WORKING_DIR} due to an error: {str(e)}"
78
+ )
79
+ print("⚠️ While phoenix will still run, you will not be able to save, load, or export data")
80
+ print("ℹ️ To change, set the `{ENV_WORKING_DIR}` environment variable before importing phoenix.")
56
81
 
57
82
 
58
83
  def get_exported_files(directory: Path) -> List[Path]:
@@ -73,13 +73,6 @@ your response.
73
73
  [END DATA]
74
74
 
75
75
  Is the answer above factual or hallucinated based on the query and reference text?
76
-
77
- Your response should be a single word: either "factual" or "hallucinated", and
78
- it should not include any other text or characters. "hallucinated" indicates that the answer
79
- provides factually inaccurate information to the query based on the reference text. "factual"
80
- indicates that the answer to the question is correct relative to the reference text, and does not
81
- contain made up information. Please read the query and reference text carefully before determining
82
- your response.
83
76
  """
84
77
  HALLUCINATION_PROMPT_TEMPLATE_WITH_EXPLANATION = """
85
78
  In this task, you will be presented with a query, a reference text and an answer. The answer is
phoenix/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "2.6.0"
1
+ __version__ = "2.7.0"