arize-phoenix 11.16.0__py3-none-any.whl → 11.16.1__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: 11.16.0
3
+ Version: 11.16.1
4
4
  Summary: AI Observability and Evaluation
5
5
  Project-URL: Documentation, https://arize.com/docs/phoenix/
6
6
  Project-URL: Issues, https://github.com/Arize-ai/phoenix/issues
@@ -6,7 +6,7 @@ phoenix/exceptions.py,sha256=n2L2KKuecrdflB9MsCdAYCiSEvGJptIsfRkXMoJle7A,169
6
6
  phoenix/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
7
7
  phoenix/services.py,sha256=ngkyKGVatX3cO2WJdo2hKdaVKP-xJCMvqthvga6kJss,5196
8
8
  phoenix/settings.py,sha256=2kHfT3BNOVd4dAO1bq-syEQbHSG8oX2-7NhOwK2QREk,896
9
- phoenix/version.py,sha256=1jPwVRFknFjr1Z2-4KMQGv_ONw2Eybch5xZM1zNP1rg,24
9
+ phoenix/version.py,sha256=la5dgqPaLH76UOsPrzq3yXc1oRancntE_Rtl5KYWzoM,24
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
@@ -114,7 +114,7 @@ phoenix/server/api/exceptions.py,sha256=E2W0x63CBzc0CoQPptrLr9nZxPF9zIP8MCJ3RuJM
114
114
  phoenix/server/api/interceptor.py,sha256=ykDnoC_apUd-llVli3m1CW18kNSIgjz2qZ6m5JmPDu8,1294
115
115
  phoenix/server/api/queries.py,sha256=--ycVajCdDuN4Y-7bnD9py3BIXVWnZEwrpwDEW2Y8i4,46498
116
116
  phoenix/server/api/schema.py,sha256=fcs36xQwFF_Qe41_5cWR8wYpDvOrnbcyTeo5WNMbDsA,1702
117
- phoenix/server/api/subscriptions.py,sha256=ZOGNsLVr5TNjCWgbzO7Eq6Ls_NRdJH9AxC0cW_v0vhM,25332
117
+ phoenix/server/api/subscriptions.py,sha256=U7JZl-FGfsaIhRkIFdeSQLqR7xCS7CY1h-21BOAcaqY,25439
118
118
  phoenix/server/api/utils.py,sha256=quCBRcusc6PUq9tJq7M8PgwFZp7nXgVAxtbw8feribY,833
119
119
  phoenix/server/api/dataloaders/__init__.py,sha256=ddiX1BdbyGkPTzMZNo-hkF_2kqIquelBUFvQejnAJYk,6834
120
120
  phoenix/server/api/dataloaders/annotation_configs_by_project.py,sha256=_Nfiug9o01JimU3Z0LpZJ0uaMCjchXomyt_dYAxPFRY,1178
@@ -232,7 +232,7 @@ phoenix/server/api/input_types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
232
232
  phoenix/server/api/mutations/__init__.py,sha256=DlAwXDKQzOpY4vFiDUR9Cu2kmncFr4m-RPRyQABBPIE,1972
233
233
  phoenix/server/api/mutations/annotation_config_mutations.py,sha256=i7NsQhYICcQ-I-tnFjGtVAYc8WVmMBacmRaqHWJ25t4,15433
234
234
  phoenix/server/api/mutations/api_key_mutations.py,sha256=nfnRjALCaQMi_jIbEPW4G3Dn3tPnmZVU11tpBbBijGA,6242
235
- phoenix/server/api/mutations/chat_mutations.py,sha256=97g5OEpFklS2hI73ACCzpRBq5s_h9-nxzbUr82XmU-8,24373
235
+ phoenix/server/api/mutations/chat_mutations.py,sha256=KB9_39rcGWI8x687ktAiijgww-P8B9mVJKnyL8NCmKQ,24647
236
236
  phoenix/server/api/mutations/dataset_mutations.py,sha256=KRlF-Ag3twqaBpLR_6WYxf57DffaGuFBm-soaBPStbI,27787
237
237
  phoenix/server/api/mutations/experiment_mutations.py,sha256=p3CoLAa8nFPa3D759Y2A7De_PVJNGOL98mA3HoZBrRQ,3188
238
238
  phoenix/server/api/mutations/export_events_mutations.py,sha256=xoDnVWC7eA_8wNQP0-oyiHojyUZ0EhVVSrsAnztetC0,3993
@@ -261,7 +261,7 @@ phoenix/server/api/routers/v1/datasets.py,sha256=9iPORLmbOrPKgUUcRDMs6ZczSIz7hvc
261
261
  phoenix/server/api/routers/v1/evaluations.py,sha256=_I0X01J8EZmTlfAGkvMkZ05IB3x691xzUmHV05ov26Y,12914
262
262
  phoenix/server/api/routers/v1/experiment_evaluations.py,sha256=_xnVqFCwZoOUPravdPixZLSQiU1H3sB5EzMknB7E1CI,4837
263
263
  phoenix/server/api/routers/v1/experiment_runs.py,sha256=LZeCQWQIEOZ9jK5Gp_C4JbiYY6AmnnWe85cVcvdkCLE,7107
264
- phoenix/server/api/routers/v1/experiments.py,sha256=osy0JG_iVSCkoRi__0tjldfS5zzBDvNfv-GimbP4ShA,20537
264
+ phoenix/server/api/routers/v1/experiments.py,sha256=wML-cad0NiflFGIysaJECFulXLqj5rjwMmNmKQVaGzw,20592
265
265
  phoenix/server/api/routers/v1/models.py,sha256=p3gJN-9SWiUYTUTft4bZMsZVCBNTb4nN1Foy68eRZzQ,1997
266
266
  phoenix/server/api/routers/v1/projects.py,sha256=32GwTLsaFgQLVNdjrlrGe90XT3pIX1N7-zX9D9_J_4w,12701
267
267
  phoenix/server/api/routers/v1/prompts.py,sha256=chRYcLkOYDJdJfVZVukVTUyIRnLPvsJCg41CuPxOIU8,26695
@@ -376,6 +376,8 @@ phoenix/server/email/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
376
376
  phoenix/server/email/templates/db_disk_usage_notification.html,sha256=Atv2XnKkC7HasTTCZYAWySr7VbupAGwbIiJ9eQ4r2l0,906
377
377
  phoenix/server/email/templates/password_reset.html,sha256=jv0Pe-06JloPZcubRWxPdAFHYEn9eDj_4SjmuoIwshI,441
378
378
  phoenix/server/email/templates/welcome.html,sha256=AyVsIOtpmyYwWmmkXjuEgXwkbsag4YHHKfkmOTiNo-M,316
379
+ phoenix/server/experiments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
380
+ phoenix/server/experiments/utils.py,sha256=I8OSkjLse7eVJasyiBwql7ihzOrMivsxOQVhD8aWi1E,356
379
381
  phoenix/server/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
380
382
  phoenix/server/middleware/gzip.py,sha256=hoznxxXdJlb6_XSyNXFz0OLd9FhtCHv6Tm0TWh0Zijk,1363
381
383
  phoenix/server/openapi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -389,9 +391,9 @@ phoenix/server/static/apple-touch-icon-76x76.png,sha256=CT_xT12I0u2i0WU8JzBZBuOQ
389
391
  phoenix/server/static/apple-touch-icon.png,sha256=fOfpjqGpWYbJ0eAurKsyoZP1EAs6ZVooBJ_SGk2ZkDs,3801
390
392
  phoenix/server/static/favicon.ico,sha256=bY0vvCKRftemZfPShwZtE93DiiQdaYaozkPGwNFr6H8,34494
391
393
  phoenix/server/static/modernizr.js,sha256=mvK-XtkNqjOral-QvzoqsyOMECXIMu5BQwSVN_wcU9c,2564
392
- phoenix/server/static/.vite/manifest.json,sha256=kdJluW5SaIjnZ4iseFuA4LCG0bVknsw1pSXJT2h3XLo,2165
394
+ phoenix/server/static/.vite/manifest.json,sha256=7tNByP86-7b3NZxsgZFyq4MpRPrPaeFlINZoRP8NRkE,2165
393
395
  phoenix/server/static/assets/components-CK8hwrPx.js,sha256=g1vGnQRiqgG1yDDRMSbiUES-P4kkwsUbl4BPl9EH3Ek,650224
394
- phoenix/server/static/assets/index-ByWTGseQ.js,sha256=S6_w9RczLWlZc2MxJ5_G_Z7O464nyUIQcns2SXhtAHU,63020
396
+ phoenix/server/static/assets/index-UY6kXBX7.js,sha256=N-wk2Jml93MqnFKzVtzlcb6G5kquwPu06_FWFLfQxXU,63064
395
397
  phoenix/server/static/assets/pages-D8Hgmz1V.js,sha256=zVZMTQw6vFjJPf9FjvfXpYwosimlWXCGtMnwxNBbMKs,1208677
396
398
  phoenix/server/static/assets/vendor-CqDb5u4o.css,sha256=zIyFiNJKxMaQk8AvtLgt1rR01oO10d1MFndSDKH9Clw,5517
397
399
  phoenix/server/static/assets/vendor-_6rG8OMg.js,sha256=stdw5w5Q5kJ0EkGpzu_f_IYaEEwKHkn3eNDZSxBRQUE,2682340
@@ -439,9 +441,9 @@ phoenix/utilities/project.py,sha256=auVpARXkDb-JgeX5f2aStyFIkeKvGwN9l7qrFeJMVxI,
439
441
  phoenix/utilities/re.py,sha256=6YyUWIkv0zc2SigsxfOWIHzdpjKA_TZo2iqKq7zJKvw,2081
440
442
  phoenix/utilities/span_store.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
441
443
  phoenix/utilities/template_formatters.py,sha256=gh9PJD6WEGw7TEYXfSst1UR4pWWwmjxMLrDVQ_CkpkQ,2779
442
- arize_phoenix-11.16.0.dist-info/METADATA,sha256=Vhoaw8m0XPZKoPzmUJxOrEfcQ-UZhTdIGXceg5fEiuU,30851
443
- arize_phoenix-11.16.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
444
- arize_phoenix-11.16.0.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
445
- arize_phoenix-11.16.0.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
446
- arize_phoenix-11.16.0.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
447
- arize_phoenix-11.16.0.dist-info/RECORD,,
444
+ arize_phoenix-11.16.1.dist-info/METADATA,sha256=ueQTCyUpZNKsx4_LOt6KkqVkK__SbVbvYWX8ZjKgRVk,30851
445
+ arize_phoenix-11.16.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
446
+ arize_phoenix-11.16.1.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
447
+ arize_phoenix-11.16.1.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
448
+ arize_phoenix-11.16.1.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
449
+ arize_phoenix-11.16.1.dist-info/RECORD,,
@@ -23,6 +23,7 @@ from strawberry.relay import GlobalID
23
23
  from strawberry.types import Info
24
24
  from typing_extensions import assert_never
25
25
 
26
+ from phoenix.config import PLAYGROUND_PROJECT_NAME
26
27
  from phoenix.datetime_utils import local_now, normalize_datetime
27
28
  from phoenix.db import models
28
29
  from phoenix.db.helpers import get_dataset_example_revisions
@@ -64,6 +65,7 @@ from phoenix.server.api.types.DatasetVersion import DatasetVersion
64
65
  from phoenix.server.api.types.node import from_global_id_with_expected_type
65
66
  from phoenix.server.api.types.Span import Span
66
67
  from phoenix.server.dml_event import SpanInsertEvent
68
+ from phoenix.server.experiments.utils import generate_experiment_project_name
67
69
  from phoenix.trace.attributes import unflatten
68
70
  from phoenix.trace.schemas import SpanException
69
71
  from phoenix.utilities.json import jsonify
@@ -163,6 +165,7 @@ class ChatCompletionMutationMixin:
163
165
  if input.dataset_version_id
164
166
  else None
165
167
  )
168
+ project_name = generate_experiment_project_name()
166
169
  async with info.context.db() as session:
167
170
  dataset = await session.scalar(select(models.Dataset).filter_by(id=dataset_id))
168
171
  if dataset is None:
@@ -196,7 +199,7 @@ class ChatCompletionMutationMixin:
196
199
  description=input.experiment_description,
197
200
  repetitions=1,
198
201
  metadata_=input.experiment_metadata or dict(),
199
- project_name=PLAYGROUND_PROJECT_NAME,
202
+ project_name=project_name,
200
203
  )
201
204
  session.add(experiment)
202
205
  await session.flush()
@@ -222,6 +225,7 @@ class ChatCompletionMutationMixin:
222
225
  ),
223
226
  prompt_name=input.prompt_name,
224
227
  ),
228
+ project_name=project_name,
225
229
  )
226
230
  for revision in batch
227
231
  ),
@@ -320,6 +324,8 @@ class ChatCompletionMutationMixin:
320
324
  info: Info[Context, None],
321
325
  llm_client: PlaygroundStreamingClient,
322
326
  input: ChatCompletionInput,
327
+ project_name: str = PLAYGROUND_PROJECT_NAME,
328
+ project_description: str = "Traces from prompt playground",
323
329
  ) -> ChatCompletionMutationPayload:
324
330
  attributes: dict[str, Any] = {}
325
331
  attributes.update(dict(prompt_metadata(input.prompt_name)))
@@ -414,15 +420,15 @@ class ChatCompletionMutationMixin:
414
420
  # Get or create the project ID
415
421
  if (
416
422
  project_id := await session.scalar(
417
- select(models.Project.id).where(models.Project.name == PLAYGROUND_PROJECT_NAME)
423
+ select(models.Project.id).where(models.Project.name == project_name)
418
424
  )
419
425
  ) is None:
420
426
  project_id = await session.scalar(
421
427
  insert(models.Project)
422
428
  .returning(models.Project.id)
423
429
  .values(
424
- name=PLAYGROUND_PROJECT_NAME,
425
- description="Traces from prompt playground",
430
+ name=project_name,
431
+ description=project_description,
426
432
  )
427
433
  )
428
434
  trace = models.Trace(
@@ -622,5 +628,3 @@ TOOL_JSON_SCHEMA = ToolAttributes.TOOL_JSON_SCHEMA
622
628
  PROMPT_TEMPLATE_VARIABLES = SpanAttributes.LLM_PROMPT_TEMPLATE_VARIABLES
623
629
 
624
630
  LLM_PROVIDER = SpanAttributes.LLM_PROVIDER
625
-
626
- PLAYGROUND_PROJECT_NAME = "playground"
@@ -20,6 +20,7 @@ from phoenix.db.insertion.helpers import insert_on_conflict
20
20
  from phoenix.server.api.types.node import from_global_id_with_expected_type
21
21
  from phoenix.server.authorization import is_not_locked
22
22
  from phoenix.server.dml_event import ExperimentInsertEvent
23
+ from phoenix.server.experiments.utils import generate_experiment_project_name
23
24
 
24
25
  from .models import V1RoutesBaseModel
25
26
  from .utils import ResponseBody, add_errors_to_responses, add_text_csv_content_to_responses
@@ -159,7 +160,7 @@ async def create_experiment(
159
160
 
160
161
  # generate a semi-unique name for the experiment
161
162
  experiment_name = request_body.name or _generate_experiment_name(dataset_name)
162
- project_name = f"Experiment-{getrandbits(96).to_bytes(12, 'big').hex()}"
163
+ project_name = generate_experiment_project_name()
163
164
  project_description = (
164
165
  f"dataset_id: {dataset_globalid}\ndataset_version_id: {dataset_version_globalid}"
165
166
  )
@@ -64,6 +64,7 @@ from phoenix.server.api.types.node import from_global_id_with_expected_type
64
64
  from phoenix.server.api.types.Span import Span
65
65
  from phoenix.server.daemons.span_cost_calculator import SpanCostCalculator
66
66
  from phoenix.server.dml_event import SpanInsertEvent
67
+ from phoenix.server.experiments.utils import generate_experiment_project_name
67
68
  from phoenix.server.types import DbSessionFactory
68
69
  from phoenix.utilities.template_formatters import (
69
70
  FStringTemplateFormatter,
@@ -287,16 +288,17 @@ class Subscription:
287
288
  ]
288
289
  ):
289
290
  raise NotFound("No examples found for the given dataset and version")
291
+ project_name = generate_experiment_project_name()
290
292
  if (
291
293
  playground_project_id := await session.scalar(
292
- select(models.Project.id).where(models.Project.name == PLAYGROUND_PROJECT_NAME)
294
+ select(models.Project.id).where(models.Project.name == project_name)
293
295
  )
294
296
  ) is None:
295
297
  playground_project_id = await session.scalar(
296
298
  insert(models.Project)
297
299
  .returning(models.Project.id)
298
300
  .values(
299
- name=PLAYGROUND_PROJECT_NAME,
301
+ name=project_name,
300
302
  description="Traces from prompt playground",
301
303
  )
302
304
  )
@@ -308,7 +310,7 @@ class Subscription:
308
310
  description=input.experiment_description,
309
311
  repetitions=1,
310
312
  metadata_=input.experiment_metadata or dict(),
311
- project_name=PLAYGROUND_PROJECT_NAME,
313
+ project_name=project_name,
312
314
  )
313
315
  session.add(experiment)
314
316
  await session.flush()
File without changes
@@ -0,0 +1,14 @@
1
+ from __future__ import annotations
2
+
3
+ import re
4
+ from secrets import token_hex
5
+
6
+ EXPERIMENT_PROJECT_NAME_PATTERN = re.compile(r"^Experiment-[0-9a-f]{24}$")
7
+
8
+
9
+ def generate_experiment_project_name() -> str:
10
+ return f"Experiment-{token_hex(12)}"
11
+
12
+
13
+ def is_experiment_project_name(name: str) -> bool:
14
+ return bool(EXPERIMENT_PROJECT_NAME_PATTERN.match(name))
@@ -69,7 +69,7 @@
69
69
  "name": "vendor-three"
70
70
  },
71
71
  "index.tsx": {
72
- "file": "assets/index-ByWTGseQ.js",
72
+ "file": "assets/index-UY6kXBX7.js",
73
73
  "name": "index",
74
74
  "src": "index.tsx",
75
75
  "isEntry": true,
@@ -1084,6 +1084,7 @@ import{G as g,j as o,cL as h,eo as v,ep as y,eq as x,l as r,c7 as z,er as a,r as
1084
1084
  font-optical-sizing: auto;
1085
1085
  font-weight: 400;
1086
1086
  font-style: normal;
1087
+ color: var(--ac-global-text-color-900);
1087
1088
  }
1088
1089
  .ac-theme {
1089
1090
  color: var(--ac-global-text-color-900);
phoenix/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "11.16.0"
1
+ __version__ = "11.16.1"