arize-phoenix 4.0.2__py3-none-any.whl → 4.0.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.3
2
2
  Name: arize-phoenix
3
- Version: 4.0.2
3
+ Version: 4.0.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
@@ -5,7 +5,7 @@ phoenix/exceptions.py,sha256=n2L2KKuecrdflB9MsCdAYCiSEvGJptIsfRkXMoJle7A,169
5
5
  phoenix/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
6
6
  phoenix/services.py,sha256=haZUWKuxfI5lm0o61HgW_4B6RTBg9CUbXC8y92ZMsw4,5121
7
7
  phoenix/settings.py,sha256=cO-qgis_S27nHirTobYI9hHPfZH18R--WMmxNdsVUwc,273
8
- phoenix/version.py,sha256=1UD6TKg1K_f5rIzHLYHv3Su3o2nPpbEj1lo55M4pjtM,22
8
+ phoenix/version.py,sha256=5zeiuQJN6kh6ruLu8rUR2scjLw-LXunQn0VwgH2RhjE,22
9
9
  phoenix/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  phoenix/core/embedding_dimension.py,sha256=zKGbcvwOXgLf-yrJBpQyKtd-LEOPRKHnUToyAU8Owis,87
11
11
  phoenix/core/model.py,sha256=SBO8BZg_CeQuH5LrSgzlQfqMModzirkQePdhnbLw7dE,4756
@@ -14,7 +14,7 @@ phoenix/core/model_schema_adapter.py,sha256=aFvNtpI01sdaLoKvEvcsx51vP5_6anP0_g9i
14
14
  phoenix/db/README.md,sha256=yM2HQcKBkhnAfbRMmMN5CyTIJs8Vj1Iiw4AENz2Ldz8,592
15
15
  phoenix/db/__init__.py,sha256=pDjEFXukHmJBM-1D8RjmXkvLsz85YWNxMQczt81ec3A,118
16
16
  phoenix/db/alembic.ini,sha256=p8DjVqGUs_tTx8oU56JP7qj-rMUebNFizItUSv_hPhs,3763
17
- phoenix/db/bulk_inserter.py,sha256=mbu1n937Ozg2Lyl3DCk4cxSA3O6V1K-37fJhctp_SL4,9908
17
+ phoenix/db/bulk_inserter.py,sha256=jubepj2a40jFy95NB8UFznpkFnlRRwB-iOXZ6DS0au8,9493
18
18
  phoenix/db/engines.py,sha256=vLWaZlToMtDI7rJDxSidYkfOoojamxaZxaz8ND3zTus,4770
19
19
  phoenix/db/helpers.py,sha256=L2_jP1iIWpUREhKLYYb4_vf_6v_BiU1E73Z2PczGm6s,1589
20
20
  phoenix/db/migrate.py,sha256=Rd7rnmYLFlSGO3R3rSzXCCvDkYkhxguqDbQNhI6rm5o,2251
@@ -183,8 +183,8 @@ phoenix/utilities/error_handling.py,sha256=7b5rpGFj9EWZ8yrZK1IHvxB89suWk3lggDayU
183
183
  phoenix/utilities/logging.py,sha256=lDXd6EGaamBNcQxL4vP1au9-i_SXe0OraUDiJOcszSw,222
184
184
  phoenix/utilities/project.py,sha256=qWsvKnG1oKhOFUowXf9qiOL2ia7jaFe_ijFFHEt8GJo,431
185
185
  phoenix/utilities/span_store.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
186
- arize_phoenix-4.0.2.dist-info/METADATA,sha256=31HzTL6J7wFPFDRcfhFbNZIqCkFLIM4C515BlGpnC08,30464
187
- arize_phoenix-4.0.2.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
188
- arize_phoenix-4.0.2.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
189
- arize_phoenix-4.0.2.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
190
- arize_phoenix-4.0.2.dist-info/RECORD,,
186
+ arize_phoenix-4.0.3.dist-info/METADATA,sha256=iwmTF1Om7qivbRvMNDbQjf13vMMk5MfJTXfY6ODmWn8,30464
187
+ arize_phoenix-4.0.3.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
188
+ arize_phoenix-4.0.3.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
189
+ arize_phoenix-4.0.3.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
190
+ arize_phoenix-4.0.3.dist-info/RECORD,,
@@ -3,7 +3,7 @@ import logging
3
3
  from dataclasses import dataclass, field
4
4
  from datetime import datetime, timezone
5
5
  from itertools import islice
6
- from time import perf_counter, time
6
+ from time import perf_counter
7
7
  from typing import (
8
8
  Any,
9
9
  AsyncContextManager,
@@ -48,25 +48,20 @@ class BulkInserter:
48
48
  cache_for_dataloaders: Optional[CacheForDataLoaders] = None,
49
49
  initial_batch_of_spans: Optional[Iterable[Tuple[Span, str]]] = None,
50
50
  initial_batch_of_evaluations: Optional[Iterable[pb.Evaluation]] = None,
51
- run_interval_in_seconds: float = 2,
51
+ sleep: float = 0.1,
52
52
  max_num_per_transaction: int = 1000,
53
53
  enable_prometheus: bool = False,
54
54
  ) -> None:
55
55
  """
56
56
  :param db: A function to initiate a new database session.
57
57
  :param initial_batch_of_spans: Initial batch of spans to insert.
58
- :param run_interval_in_seconds: The time interval between the starts of each
59
- bulk insert. If there's nothing to insert, the inserter goes back to sleep.
58
+ :param sleep: The time to sleep between bulk insertions
60
59
  :param max_num_per_transaction: The maximum number of items to insert in a single
61
60
  transaction. Multiple transactions will be used if there are more items in the batch.
62
61
  """
63
62
  self._db = db
64
63
  self._running = False
65
- self._run_interval_seconds = run_interval_in_seconds
66
-
67
- # tracks time between insertions to improve responsiveness for small batches
68
- self._last_insertion_time = time() - self._run_interval_seconds
69
-
64
+ self._sleep = sleep
70
65
  self._max_num_per_transaction = max_num_per_transaction
71
66
  self._spans: List[Tuple[Span, str]] = (
72
67
  [] if initial_batch_of_spans is None else list(initial_batch_of_spans)
@@ -104,9 +99,8 @@ class BulkInserter:
104
99
  spans_buffer, evaluations_buffer = None, None
105
100
  # start first insert immediately if the inserter has not run recently
106
101
  while self._spans or self._evaluations or self._running:
107
- next_run_at = self._last_insertion_time + self._run_interval_seconds
108
- await asyncio.sleep(max(next_run_at - time(), 0))
109
102
  if not (self._spans or self._evaluations):
103
+ await asyncio.sleep(self._sleep)
110
104
  continue
111
105
  # It's important to grab the buffers at the same time so there's
112
106
  # no race condition, since an eval insertion will fail if the span
@@ -132,7 +126,7 @@ class BulkInserter:
132
126
  evaluations_buffer = None
133
127
  for project_rowid in transaction_result.updated_project_rowids:
134
128
  self._last_updated_at_by_project[project_rowid] = datetime.now(timezone.utc)
135
- self._last_insertion_time = time()
129
+ await asyncio.sleep(self._sleep)
136
130
 
137
131
  async def _insert_spans(self, spans: List[Tuple[Span, str]]) -> TransactionResult:
138
132
  transaction_result = TransactionResult()
phoenix/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "4.0.2"
1
+ __version__ = "4.0.3"