arize-phoenix 7.9.1__py3-none-any.whl → 7.9.3__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.4
2
2
  Name: arize-phoenix
3
- Version: 7.9.1
3
+ Version: 7.9.3
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
@@ -52,8 +52,7 @@ Requires-Dist: tqdm
52
52
  Requires-Dist: typing-extensions>=4.6
53
53
  Requires-Dist: uvicorn
54
54
  Requires-Dist: websockets
55
- Requires-Dist: wrapt<1.17; sys_platform == 'darwin' and platform_machine == 'x86_64'
56
- Requires-Dist: wrapt>=1.17; sys_platform != 'darwin' or platform_machine != 'x86_64'
55
+ Requires-Dist: wrapt>=1.17.2
57
56
  Provides-Extra: container
58
57
  Requires-Dist: anthropic; extra == 'container'
59
58
  Requires-Dist: fast-hdbscan>=0.2.0; extra == 'container'
@@ -160,7 +159,7 @@ Phoenix is an open-source AI observability platform designed for experimentation
160
159
  - [**_Evaluation_**](https://docs.arize.com/phoenix/evaluation/llm-evals) - Leverage LLMs to benchmark your application's performance using response and retrieval evals.
161
160
  - [**_Datasets_**](https://docs.arize.com/phoenix/datasets-and-experiments/overview-datasets) - Create versioned datasets of examples for experimentation, evaluation, and fine-tuning.
162
161
  - [**_Experiments_**](https://docs.arize.com/phoenix/datasets-and-experiments/overview-datasets#experiments) - Track and evaluate changes to prompts, LLMs, and retrieval.
163
- - [**_Playground_**](https://docs.arize.com/phoenix/prompt-engineering/overview-prompts)- Optemize prompts, compare models, adjust parameters, and replay traced LLM calls.
162
+ - [**_Playground_**](https://docs.arize.com/phoenix/prompt-engineering/overview-prompts)- Optimize prompts, compare models, adjust parameters, and replay traced LLM calls.
164
163
 
165
164
  Phoenix is vendor and language agnostic with out-of-the-box support for popular frameworks (🦙[LlamaIndex](https://docs.arize.com/phoenix/tracing/integrations-tracing/llamaindex), 🦜⛓[LangChain](https://docs.arize.com/phoenix/tracing/integrations-tracing/langchain), [Haystack](https://docs.arize.com/phoenix/tracing/integrations-tracing/haystack), 🧩[DSPy](https://docs.arize.com/phoenix/tracing/integrations-tracing/dspy)) and LLM providers ([OpenAI](https://docs.arize.com/phoenix/tracing/integrations-tracing/openai), [Bedrock](https://docs.arize.com/phoenix/tracing/integrations-tracing/bedrock), [MistralAI](https://docs.arize.com/phoenix/tracing/integrations-tracing/mistralai), [VertexAI](https://docs.arize.com/phoenix/tracing/integrations-tracing/vertexai), [LiteLLM](https://docs.arize.com/phoenix/tracing/integrations-tracing/litellm), and more). For details on auto-instrumentation, check out the [OpenInference](https://github.com/Arize-ai/openinference) project.
166
165
 
@@ -1,12 +1,12 @@
1
1
  phoenix/__init__.py,sha256=X3eUEwd2rG8KKWWYVNNDJoqo08ihfjgHhlP29dcdNJE,5481
2
2
  phoenix/auth.py,sha256=VVMHrWN31tln3Zo4z6ofecrV4daiqJjLd8r85mqlxek,10939
3
- phoenix/config.py,sha256=CIm9WnLMu5PIh93ATlJYGSPJiXRej6Ij-VjH8Z__dJk,26337
3
+ phoenix/config.py,sha256=9cda9bRDiN3pwf7D8_erOmfbiW4Vs1jsR5Dy1ugsRV8,26466
4
4
  phoenix/datetime_utils.py,sha256=iJzNG6YJ6V7_u8B2iA7P2Z26FyxYbOPtx0dhJ7kNDHA,3398
5
5
  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=OCzzWcndzwbsTJckJwc3M6Ckz0RxG4bgI8z00zXB5dQ,22
9
+ phoenix/version.py,sha256=yRJP_AB1dq7AjLXpsb-eEZaYQclObXlrabA3yy05CqQ,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
@@ -43,7 +43,7 @@ phoenix/db/migrations/versions/4ded9e43755f_create_project_sessions_table.py,sha
43
43
  phoenix/db/migrations/versions/cd164e83824f_users_and_tokens.py,sha256=fkpmh5PgMZJiZpvLbZIaqlI2cucVpVbbNYpQ-Tznil8,5180
44
44
  phoenix/db/migrations/versions/cf03bd6bae1d_init.py,sha256=lorqWUcujC0fsYIOriGZlZw2LKjS3nF34KHxi1fp_Z8,8646
45
45
  phoenix/experiments/__init__.py,sha256=6JGwgUd7xCbGpuHqYZlsmErmYvVgv7N_j43bn3dUqsk,123
46
- phoenix/experiments/functions.py,sha256=sMVrs_YJt7UzT2OjfaZNr0mXQbu7YhiF0-m_Xjh6sVA,32437
46
+ phoenix/experiments/functions.py,sha256=QOwYNMO1qxG2bah4ZjJKMk7agFkZRWGvwyazLcwRCys,32573
47
47
  phoenix/experiments/tracing.py,sha256=seNh9rBH-rtQe8_FPI_VJj1rbo3ADcP6wDvERkMoxNc,2858
48
48
  phoenix/experiments/types.py,sha256=Vcks1zXuqrdu4Dy1TaNVcPHktgQY7WYin9yqaP2vrek,23390
49
49
  phoenix/experiments/utils.py,sha256=MZ1-OnTcavk_KUtbfGqt55Fk9TGtJpYG_K71WsN-zDk,785
@@ -328,18 +328,18 @@ phoenix/trace/v1/__init__.py,sha256=-IbAD0ruESMjvQLvGAg9CTfjBUATFDx1OXseDPis6-0,
328
328
  phoenix/trace/v1/evaluation_pb2.py,sha256=8sXvv2BW_vqD30MOMbmkeE2zpmm7ncik21kl3e-HzeQ,2254
329
329
  phoenix/trace/v1/evaluation_pb2.pyi,sha256=cCbbx06gwQmaH14s3J1X25TtaARh-k1abbxQdQCXGm8,4500
330
330
  phoenix/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
331
- phoenix/utilities/client.py,sha256=kr95EgpTJtCbb7CLoxC-KiyB2Wco03DZGIlcEmozHFs,5605
331
+ phoenix/utilities/client.py,sha256=o2Rb80zkesH0Vsf6AhgyROWN-tIDia4bJPOzosj4cfU,5478
332
332
  phoenix/utilities/deprecation.py,sha256=LL1LWfVqnYulceMQw2CggoIv8Uogrj7fAD_85devnoo,1067
333
333
  phoenix/utilities/error_handling.py,sha256=5_ggfwmd0xZPoI3qi1fwm0x1F0i7g5j-gr0ny1TFzPU,1967
334
334
  phoenix/utilities/json.py,sha256=UE8WHZU060NY_8ZKJ97gmtEC2mp60d8tJFXyRqIz51Y,3743
335
335
  phoenix/utilities/logging.py,sha256=NKvX43jWITgSTtHGCi6l5xp8jTjtQ8FQ_irEi9ybOxg,502
336
336
  phoenix/utilities/project.py,sha256=auVpARXkDb-JgeX5f2aStyFIkeKvGwN9l7qrFeJMVxI,445
337
- phoenix/utilities/re.py,sha256=x8Xbk-Wa6qDMAtUd_7JtZvKtrYEuMY-bchB0n163_5c,2006
337
+ phoenix/utilities/re.py,sha256=6YyUWIkv0zc2SigsxfOWIHzdpjKA_TZo2iqKq7zJKvw,2081
338
338
  phoenix/utilities/span_store.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
339
339
  phoenix/utilities/template_formatters.py,sha256=gh9PJD6WEGw7TEYXfSst1UR4pWWwmjxMLrDVQ_CkpkQ,2779
340
- arize_phoenix-7.9.1.dist-info/METADATA,sha256=uZ-830O5Z4WO4AYrns3ImDt3CL8QDb2L9QQJUXsvR6o,23522
341
- arize_phoenix-7.9.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
342
- arize_phoenix-7.9.1.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
343
- arize_phoenix-7.9.1.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
344
- arize_phoenix-7.9.1.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
345
- arize_phoenix-7.9.1.dist-info/RECORD,,
340
+ arize_phoenix-7.9.3.dist-info/METADATA,sha256=R60WEkf5wISZzqQEux-bTsDV4bUyXAbyj1TgibyvrqI,23381
341
+ arize_phoenix-7.9.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
342
+ arize_phoenix-7.9.3.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
343
+ arize_phoenix-7.9.3.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
344
+ arize_phoenix-7.9.3.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
345
+ arize_phoenix-7.9.3.dist-info/RECORD,,
phoenix/config.py CHANGED
@@ -625,10 +625,13 @@ def get_env_enable_prometheus() -> bool:
625
625
  )
626
626
 
627
627
 
628
- def get_env_client_headers() -> Optional[dict[str, str]]:
629
- if headers_str := os.getenv(ENV_PHOENIX_CLIENT_HEADERS):
630
- return parse_env_headers(headers_str)
631
- return None
628
+ def get_env_client_headers() -> dict[str, str]:
629
+ headers = parse_env_headers(os.getenv(ENV_PHOENIX_CLIENT_HEADERS))
630
+ if (api_key := get_env_phoenix_api_key()) and "authorization" not in [
631
+ k.lower() for k in headers
632
+ ]:
633
+ headers["Authorization"] = f"Bearer {api_key}"
634
+ return headers
632
635
 
633
636
 
634
637
  def get_base_url() -> str:
@@ -30,7 +30,7 @@ from opentelemetry.sdk.trace.export import SimpleSpanProcessor
30
30
  from opentelemetry.trace import Status, StatusCode, Tracer
31
31
  from typing_extensions import TypeAlias
32
32
 
33
- from phoenix.config import get_base_url
33
+ from phoenix.config import get_base_url, get_env_client_headers
34
34
  from phoenix.evals.executors import get_executor_on_sync_context
35
35
  from phoenix.evals.models.rate_limiters import RateLimiter
36
36
  from phoenix.evals.utils import get_tqdm_progress_bar_formatter
@@ -671,7 +671,12 @@ def _get_tracer(project_name: Optional[str] = None) -> tuple[Tracer, Resource]:
671
671
  resource = Resource({ResourceAttributes.PROJECT_NAME: project_name} if project_name else {})
672
672
  tracer_provider = trace_sdk.TracerProvider(resource=resource)
673
673
  span_processor = (
674
- SimpleSpanProcessor(OTLPSpanExporter(urljoin(f"{get_base_url()}", "v1/traces")))
674
+ SimpleSpanProcessor(
675
+ OTLPSpanExporter(
676
+ endpoint=urljoin(f"{get_base_url()}", "v1/traces"),
677
+ headers=get_env_client_headers(),
678
+ )
679
+ )
675
680
  if project_name
676
681
  else _NoOpProcessor()
677
682
  )
@@ -3,7 +3,7 @@ from typing import Any
3
3
 
4
4
  import httpx
5
5
 
6
- from phoenix.config import get_env_client_headers, get_env_phoenix_api_key
6
+ from phoenix.config import get_env_client_headers
7
7
 
8
8
  PHOENIX_SERVER_VERSION_HEADER = "x-phoenix-server-version"
9
9
 
@@ -18,11 +18,11 @@ class VersionedClient(httpx.Client):
18
18
 
19
19
  super().__init__(*args, **kwargs)
20
20
 
21
- if env_headers := get_env_client_headers():
22
- self.headers.update(env_headers)
23
- if "authorization" not in [k.lower() for k in self.headers]:
24
- if api_key := get_env_phoenix_api_key():
25
- self.headers["Authorization"] = f"Bearer {api_key}"
21
+ # Preserve headers set via instantiation, since
22
+ # they were explicitly entered by the user.
23
+ for k, v in get_env_client_headers().items():
24
+ if k not in self.headers:
25
+ self.headers[k] = v
26
26
 
27
27
  self._client_phoenix_version = phoenix_version
28
28
  self._warned_on_minor_version_mismatch = False
@@ -82,11 +82,11 @@ class VersionedAsyncClient(httpx.AsyncClient):
82
82
 
83
83
  super().__init__(*args, **kwargs)
84
84
 
85
- if env_headers := get_env_client_headers():
86
- self.headers.update(env_headers)
87
- if "authorization" not in [k.lower() for k in self.headers]:
88
- if api_key := get_env_phoenix_api_key():
89
- self.headers["Authorization"] = f"Bearer {api_key}"
85
+ # Preserve headers set via instantiation, since
86
+ # they were explicitly entered by the user.
87
+ for k, v in get_env_client_headers().items():
88
+ if k not in self.headers:
89
+ self.headers[k] = v
90
90
 
91
91
  self._client_phoenix_version = phoenix_version
92
92
  self._warned_on_minor_version_mismatch = False
phoenix/utilities/re.py CHANGED
@@ -1,5 +1,6 @@
1
1
  import logging
2
2
  from re import compile, split
3
+ from typing import Optional
3
4
  from urllib.parse import unquote
4
5
 
5
6
  logger = logging.getLogger(__name__)
@@ -18,7 +19,7 @@ _HEADER_PATTERN = compile(_KEY_VALUE_FORMAT)
18
19
  _DELIMITER_PATTERN = compile(r"[ \t]*,[ \t]*")
19
20
 
20
21
 
21
- def parse_env_headers(s: str) -> dict[str, str]:
22
+ def parse_env_headers(s: Optional[str]) -> dict[str, str]:
22
23
  """
23
24
  Parse ``s``, which is a ``str`` instance containing HTTP headers encoded
24
25
  for use in ENV variables per the W3C Baggage HTTP header format at
@@ -28,6 +29,8 @@ def parse_env_headers(s: str) -> dict[str, str]:
28
29
  src: https://github.com/open-telemetry/opentelemetry-python/blob/2d5cd58f33bd8a16f45f30be620a96699bc14297/opentelemetry-api/src/opentelemetry/util/re.py#L52
29
30
  """
30
31
  headers: dict[str, str] = {}
32
+ if not s:
33
+ return headers
31
34
  headers_list: list[str] = split(_DELIMITER_PATTERN, s)
32
35
  for header in headers_list:
33
36
  if not header: # empty string
phoenix/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "7.9.1"
1
+ __version__ = "7.9.3"