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

Files changed (32) hide show
  1. {arize_phoenix-12.6.0.dist-info → arize_phoenix-12.7.0.dist-info}/METADATA +17 -11
  2. {arize_phoenix-12.6.0.dist-info → arize_phoenix-12.7.0.dist-info}/RECORD +30 -29
  3. phoenix/server/api/context.py +2 -0
  4. phoenix/server/api/dataloaders/__init__.py +2 -0
  5. phoenix/server/api/dataloaders/experiment_dataset_splits.py +43 -0
  6. phoenix/server/api/input_types/ChatCompletionInput.py +1 -0
  7. phoenix/server/api/input_types/DatasetFilter.py +5 -2
  8. phoenix/server/api/mutations/chat_mutations.py +17 -3
  9. phoenix/server/api/queries.py +53 -28
  10. phoenix/server/api/routers/v1/datasets.py +150 -1
  11. phoenix/server/api/routers/v1/experiments.py +19 -0
  12. phoenix/server/api/subscriptions.py +22 -19
  13. phoenix/server/api/types/Dataset.py +1 -1
  14. phoenix/server/api/types/Experiment.py +14 -0
  15. phoenix/server/app.py +2 -0
  16. phoenix/server/cost_tracking/model_cost_manifest.json +142 -0
  17. phoenix/server/static/.vite/manifest.json +43 -43
  18. phoenix/server/static/assets/{components-CboqzKQ9.js → components-X_GtZhnz.js} +777 -696
  19. phoenix/server/static/assets/{index-CYYGI5-x.js → index-BCtFqQdo.js} +2 -2
  20. phoenix/server/static/assets/{pages-DdlUeKi2.js → pages-Dl8TWyNq.js} +588 -595
  21. phoenix/server/static/assets/vendor-3BvTzoBp.js +920 -0
  22. phoenix/server/static/assets/{vendor-arizeai-Cb1ncvYH.js → vendor-arizeai-C6_oC0y8.js} +1 -1
  23. phoenix/server/static/assets/vendor-codemirror-DPnZGAZA.js +25 -0
  24. phoenix/server/static/assets/{vendor-recharts-BC1ysIKu.js → vendor-recharts-CjgSbsB0.js} +7 -7
  25. phoenix/server/static/assets/{vendor-shiki-B45T-YxN.js → vendor-shiki-CJyhDG0E.js} +1 -1
  26. phoenix/version.py +1 -1
  27. phoenix/server/static/assets/vendor-CQ4tN9P7.js +0 -918
  28. phoenix/server/static/assets/vendor-codemirror-CckmKopH.js +0 -25
  29. {arize_phoenix-12.6.0.dist-info → arize_phoenix-12.7.0.dist-info}/WHEEL +0 -0
  30. {arize_phoenix-12.6.0.dist-info → arize_phoenix-12.7.0.dist-info}/entry_points.txt +0 -0
  31. {arize_phoenix-12.6.0.dist-info → arize_phoenix-12.7.0.dist-info}/licenses/IP_NOTICE +0 -0
  32. {arize_phoenix-12.6.0.dist-info → arize_phoenix-12.7.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arize-phoenix
3
- Version: 12.6.0
3
+ Version: 12.7.0
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
@@ -58,7 +58,7 @@ Requires-Dist: strawberry-graphql==0.270.1
58
58
  Requires-Dist: tqdm
59
59
  Requires-Dist: typing-extensions>=4.6
60
60
  Requires-Dist: uvicorn
61
- Requires-Dist: wrapt>=1.17.2
61
+ Requires-Dist: wrapt<2,>=1.17.2
62
62
  Provides-Extra: container
63
63
  Requires-Dist: aiohttp; extra == 'container'
64
64
  Requires-Dist: anthropic>=0.49.0; extra == 'container'
@@ -194,16 +194,22 @@ Phoenix container images are available via [Docker Hub](https://hub.docker.com/r
194
194
 
195
195
  The `arize-phoenix` package includes the entire Phoenix platfom. However if you have deployed the Phoenix platform, there are light-weight Python sub-packages and TypeScript packages that can be used in conjunction with the platfrom.
196
196
 
197
- ### Subpackages
197
+ ### Python Subpackages
198
198
 
199
- | Package | Version & Docs | Description |
200
- | --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
201
- | [arize-phoenix-otel](https://github.com/Arize-ai/phoenix/tree/main/packages/phoenix-otel) | [![PyPI Version](https://img.shields.io/pypi/v/arize-phoenix-otel)](https://pypi.org/project/arize-phoenix-otel/) [![Docs](https://img.shields.io/badge/docs-blue?logo=readthedocs&logoColor=white)](https://arize-phoenix.readthedocs.io/projects/otel/en/latest/index.html) | Provides a lightweight wrapper around OpenTelemetry primitives with Phoenix-aware defaults |
202
- | [arize-phoenix-client](https://github.com/Arize-ai/phoenix/tree/main/packages/phoenix-client) | [![PyPI Version](https://img.shields.io/pypi/v/arize-phoenix-client)](https://pypi.org/project/arize-phoenix-client/) [![Docs](https://img.shields.io/badge/docs-blue?logo=readthedocs&logoColor=white)](https://arize-phoenix.readthedocs.io/projects/client/en/latest/index.html) | Lightweight client for interacting with the Phoenix server via its OpenAPI REST interface |
203
- | [arize-phoenix-evals](https://github.com/Arize-ai/phoenix/tree/main/packages/phoenix-evals) | [![PyPI Version](https://img.shields.io/pypi/v/arize-phoenix-evals)](https://pypi.org/project/arize-phoenix-evals/) [![Docs](https://img.shields.io/badge/docs-blue?logo=readthedocs&logoColor=white)](https://arize-phoenix.readthedocs.io/projects/evals/en/latest/index.html) | Tooling to evaluate LLM applications including RAG relevance, answer relevance, and more |
204
- | [@arizeai/phoenix-client](https://github.com/Arize-ai/phoenix/tree/main/js/packages/phoenix-client) | [![NPM Version](https://img.shields.io/npm/v/%40arizeai%2Fphoenix-client)](https://www.npmjs.com/package/@arizeai/phoenix-client) [![Docs](https://img.shields.io/badge/docs-blue?logo=typescript&logoColor=white)](https://arize-ai.github.io/phoenix/) | Client for the Arize Phoenix API |
205
- | [@arizeai/phoenix-evals](https://github.com/Arize-ai/phoenix/tree/main/js/packages/phoenix-evals) | [![NPM Version](https://img.shields.io/npm/v/%40arizeai%2Fphoenix-evals)](https://www.npmjs.com/package/@arizeai/phoenix-evals) [![Docs](https://img.shields.io/badge/docs-blue?logo=typescript&logoColor=white)](https://arize-ai.github.io/phoenix/) | TypeScript evaluation library for LLM applications (alpha release) |
206
- | [@arizeai/phoenix-mcp](https://github.com/Arize-ai/phoenix/tree/main/js/packages/phoenix-mcp) | [![NPM Version](https://img.shields.io/npm/v/%40arizeai%2Fphoenix-mcp)](https://www.npmjs.com/package/@arizeai/phoenix-mcp) [![Docs](https://img.shields.io/badge/docs-blue?logo=markdown&logoColor=white)](./js/packages/phoenix-mcp/README.md) | MCP server implementation for Arize Phoenix providing unified interface to Phoenix's capabilities |
199
+ | Package | Version & Docs | Description |
200
+ | --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
201
+ | [arize-phoenix-otel](https://github.com/Arize-ai/phoenix/tree/main/packages/phoenix-otel) | [![PyPI Version](https://img.shields.io/pypi/v/arize-phoenix-otel)](https://pypi.org/project/arize-phoenix-otel/) [![Docs](https://img.shields.io/badge/docs-blue?logo=readthedocs&logoColor=white)](https://arize-phoenix.readthedocs.io/projects/otel/en/latest/index.html) | Provides a lightweight wrapper around OpenTelemetry primitives with Phoenix-aware defaults |
202
+ | [arize-phoenix-client](https://github.com/Arize-ai/phoenix/tree/main/packages/phoenix-client) | [![PyPI Version](https://img.shields.io/pypi/v/arize-phoenix-client)](https://pypi.org/project/arize-phoenix-client/) [![Docs](https://img.shields.io/badge/docs-blue?logo=readthedocs&logoColor=white)](https://arize-phoenix.readthedocs.io/projects/client/en/latest/index.html) | Lightweight client for interacting with the Phoenix server via its OpenAPI REST interface |
203
+ | [arize-phoenix-evals](https://github.com/Arize-ai/phoenix/tree/main/packages/phoenix-evals) | [![PyPI Version](https://img.shields.io/pypi/v/arize-phoenix-evals)](https://pypi.org/project/arize-phoenix-evals/) [![Docs](https://img.shields.io/badge/docs-blue?logo=readthedocs&logoColor=white)](https://arize-phoenix.readthedocs.io/projects/evals/en/latest/index.html) | Tooling to evaluate LLM applications including RAG relevance, answer relevance, and more |
204
+
205
+ ### TypeScript Subpackages
206
+
207
+ | Package | Version & Docs | Description |
208
+ | --------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
209
+ | [@arizeai/phoenix-otel](https://github.com/Arize-ai/phoenix/tree/main/js/packages/phoenix-otel) | [![NPM Version](https://img.shields.io/npm/v/%40arizeai%2Fphoenix-otel)](https://www.npmjs.com/package/@arizeai/phoenix-otel) [![Docs](https://img.shields.io/badge/docs-blue?logo=typescript&logoColor=white)](https://arize-ai.github.io/phoenix/) | Provides a lightweight wrapper around OpenTelemetry primitives with Phoenix-aware defaults |
210
+ | [@arizeai/phoenix-client](https://github.com/Arize-ai/phoenix/tree/main/js/packages/phoenix-client) | [![NPM Version](https://img.shields.io/npm/v/%40arizeai%2Fphoenix-client)](https://www.npmjs.com/package/@arizeai/phoenix-client) [![Docs](https://img.shields.io/badge/docs-blue?logo=typescript&logoColor=white)](https://arize-ai.github.io/phoenix/) | Client for the Arize Phoenix API |
211
+ | [@arizeai/phoenix-evals](https://github.com/Arize-ai/phoenix/tree/main/js/packages/phoenix-evals) | [![NPM Version](https://img.shields.io/npm/v/%40arizeai%2Fphoenix-evals)](https://www.npmjs.com/package/@arizeai/phoenix-evals) [![Docs](https://img.shields.io/badge/docs-blue?logo=typescript&logoColor=white)](https://arize-ai.github.io/phoenix/) | TypeScript evaluation library for LLM applications (alpha release) |
212
+ | [@arizeai/phoenix-mcp](https://github.com/Arize-ai/phoenix/tree/main/js/packages/phoenix-mcp) | [![NPM Version](https://img.shields.io/npm/v/%40arizeai%2Fphoenix-mcp)](https://www.npmjs.com/package/@arizeai/phoenix-mcp) [![Docs](https://img.shields.io/badge/docs-blue?logo=markdown&logoColor=white)](./js/packages/phoenix-mcp/README.md) | MCP server implementation for Arize Phoenix providing unified interface to Phoenix's capabilities |
207
213
 
208
214
  ## Tracing Integrations
209
215
 
@@ -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=oxSKCFLBjhFlgZSaA2j_3urrHMkITGfFWBcpgSrk6mo,23
9
+ phoenix/version.py,sha256=chhKpeDUFDd7J4CcbTiKgYSFJlEwuOHPuRSBL5Ms-Yw,23
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
@@ -102,7 +102,7 @@ phoenix/pointcloud/pointcloud.py,sha256=SN_1wXZcwKrtSnHGZLDZGx71orqE1WyVF7E-D58d
102
102
  phoenix/pointcloud/projectors.py,sha256=TQgwc9cJDjJkin1WZyZzgl3HsYrLLiyWD7Czy4jNW3U,1088
103
103
  phoenix/pointcloud/umap_parameters.py,sha256=db_WEPoamuWtopZx7tQfAXPnoE0MS8FkAV0_ThjEx_Q,1735
104
104
  phoenix/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
105
- phoenix/server/app.py,sha256=6j8bSoAaH5rI4ByGXxFjMfzQYrVDOK4TpXcqYSEMprA,50910
105
+ phoenix/server/app.py,sha256=4WJNOu3IpPeyegC8VUMragANUpMPPn7Gsb4b2M1uAnc,51030
106
106
  phoenix/server/authorization.py,sha256=Ws1bNyWLlTeRODcT6zNy8C5SB5WMROXrMYqzCDxTxZo,3114
107
107
  phoenix/server/bearer_auth.py,sha256=IUL2b5O2J2oc593cy_S_SM0mCEL34r6Z9Zgia7CcS4k,6877
108
108
  phoenix/server/dml_event.py,sha256=HgUsIkzyXxCGasjnrqubegWbNaAcAgjrtWrKc3aRwxA,3245
@@ -123,14 +123,14 @@ phoenix/server/api/README.md,sha256=Pyq1PLPgTzXAswrfIhGXrjI3Skq8it2jTVnanT6Ba4Q,
123
123
  phoenix/server/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
124
124
  phoenix/server/api/auth.py,sha256=lDj289lNGY0-HqzlNyvWwPXjF3qHiSsOuvCJNIAbU0k,3072
125
125
  phoenix/server/api/auth_messages.py,sha256=15oqogBNS2BgJLLDecfXz62G9LdiOAEyzPv6jX9BxYE,1912
126
- phoenix/server/api/context.py,sha256=c5xVGdGAoysNOoAqGNUXtn2wOFcKbERPJ7-26HIxbpI,10545
126
+ phoenix/server/api/context.py,sha256=MmbVDZuniYDQ9Xw_g371n8_HtqlIUwt_n0Li7FkGZzs,10649
127
127
  phoenix/server/api/exceptions.py,sha256=9gB4nBRNX6k4_fsQZ12yxw6Tw53h_915l06DYK-qkPQ,1442
128
128
  phoenix/server/api/interceptor.py,sha256=ykDnoC_apUd-llVli3m1CW18kNSIgjz2qZ6m5JmPDu8,1294
129
- phoenix/server/api/queries.py,sha256=eZ12poXJ08Pla-DIW8v5dS9gWKdIbS-WO0Df-iGbLOg,67341
129
+ phoenix/server/api/queries.py,sha256=G8FG6xzQhtt6RqVEIX3p55PxHy2QRMSfAGeDjk0gBm8,68287
130
130
  phoenix/server/api/schema.py,sha256=fcs36xQwFF_Qe41_5cWR8wYpDvOrnbcyTeo5WNMbDsA,1702
131
- phoenix/server/api/subscriptions.py,sha256=qrLN2p0gYV7tluKSqOsHfWZTB9ZqhjviTqJPjZOHGko,26206
131
+ phoenix/server/api/subscriptions.py,sha256=f2o9L04BdMxh6jWHmhdokzu84mifh6u2IF4z6Pt_ZOs,26206
132
132
  phoenix/server/api/utils.py,sha256=quCBRcusc6PUq9tJq7M8PgwFZp7nXgVAxtbw8feribY,833
133
- phoenix/server/api/dataloaders/__init__.py,sha256=b2eVMs8ZALHmsu8oJLTIB2gAIRniWUQpZDc6lwketmE,8234
133
+ phoenix/server/api/dataloaders/__init__.py,sha256=G-EhWVbs0dMDPbTyEO1M3sCls-1UdHeB9_YS2tePQtk,8348
134
134
  phoenix/server/api/dataloaders/annotation_configs_by_project.py,sha256=_Nfiug9o01JimU3Z0LpZJ0uaMCjchXomyt_dYAxPFRY,1178
135
135
  phoenix/server/api/dataloaders/annotation_summaries.py,sha256=0b23-bucBKyL25RWb2QzCNJjQzrq403qMmHKUVD5W4M,14377
136
136
  phoenix/server/api/dataloaders/average_experiment_repeated_run_group_latency.py,sha256=BSNyrwuNadQ16-2g0nGixrB5LyDqlTLeM2bKikyIagY,1860
@@ -145,6 +145,7 @@ phoenix/server/api/dataloaders/document_evaluation_summaries.py,sha256=9fdROnzp-
145
145
  phoenix/server/api/dataloaders/document_evaluations.py,sha256=1bpBDydd-9YvhgkNoE5w-FGrjtnjUztcnjZTdMAazws,1072
146
146
  phoenix/server/api/dataloaders/document_retrieval_metrics.py,sha256=37EcAW7oYQuWYHMDHb0wcqbWj9lhSskvzDO7NJbT5Js,4136
147
147
  phoenix/server/api/dataloaders/experiment_annotation_summaries.py,sha256=CFVj7DwFYj330FLU5w3zEr12AGUX1e8ZX0X5buxMuEk,5643
148
+ phoenix/server/api/dataloaders/experiment_dataset_splits.py,sha256=9V2rH7oFxiKRi2BG5oE5PJBjyDh1weXf9YAddtASdFE,1580
148
149
  phoenix/server/api/dataloaders/experiment_error_rates.py,sha256=06IZF07qt2y167DBM49QkSNdnphPArhcsgYFcunaL-U,1992
149
150
  phoenix/server/api/dataloaders/experiment_repeated_run_group_annotation_summaries.py,sha256=ubOQ9_ilTRu_H_BwjwMp5lHLPKl7jYRoIYErCthsk6Y,2815
150
151
  phoenix/server/api/dataloaders/experiment_repeated_run_groups.py,sha256=3EAN8uKv4hx-ZoGCi6HlZ_7lyLD-k6TgUUSvW78if7k,2015
@@ -213,7 +214,7 @@ phoenix/server/api/helpers/prompts/conversions/openai.py,sha256=a43WAftFn_me6ePH
213
214
  phoenix/server/api/input_types/AddExamplesToDatasetInput.py,sha256=mIQz0S_z8YdrktKIY6RCvtNJ2yZF9pYvTGgasUsI-54,430
214
215
  phoenix/server/api/input_types/AddSpansToDatasetInput.py,sha256=-StSstyMAVrba3tG1U30b-srkKCtu_svflQuSM19iJA,362
215
216
  phoenix/server/api/input_types/AnnotationFilter.py,sha256=unjLQCWnpLy-hEAN1Ov1U6eJRxs433onRscHkfEFokE,2766
216
- phoenix/server/api/input_types/ChatCompletionInput.py,sha256=t0fHUl8MVMyYkEvqKsPtTk2J15cyNJQ010mqIk43vYs,1816
217
+ phoenix/server/api/input_types/ChatCompletionInput.py,sha256=zMfYdUsIbF9gFkO51gVJNJbki3pkH__JvaXFc31_-68,1863
217
218
  phoenix/server/api/input_types/ChatCompletionMessageInput.py,sha256=0_YQBcoOS3BBTluHIB68DSP8FGAn2D9ZAw-Ht-dkbAQ,822
218
219
  phoenix/server/api/input_types/ClearProjectInput.py,sha256=cpPFRyQ3ffy2dLbCZgYpway-mCzhdm4QqnUg8caOBfQ,382
219
220
  phoenix/server/api/input_types/ClusterInput.py,sha256=AfhuYYHlYgdMO6Ap8cLXqAp70S0Wutx-RTzZYetN62A,173
@@ -225,7 +226,7 @@ phoenix/server/api/input_types/CreateSpanAnnotationInput.py,sha256=BtPB8udqnpK7k
225
226
  phoenix/server/api/input_types/CreateTraceAnnotationInput.py,sha256=GBzOwRw_GNQq3RwS5kDp32j55VI1czOmvEmRESqCsRQ,625
226
227
  phoenix/server/api/input_types/DataQualityMetricInput.py,sha256=WPWRlqSejOnxlLqsbEwPCDgz8ocsyGSb-9SptdCjZEc,1361
227
228
  phoenix/server/api/input_types/DatasetExampleInput.py,sha256=9oJ6pCFxFd02IWJuK4YAUvz-jCgFGDUCDDb2--GAzCw,289
228
- phoenix/server/api/input_types/DatasetFilter.py,sha256=jPJ82ktyvflM7jFlhaMRrY2DjdyOcPBiTO8KMeFKgaE,233
229
+ phoenix/server/api/input_types/DatasetFilter.py,sha256=woCLSZB020eY6I189txk4UZNlOc4bGKN1-497z6TQbY,371
229
230
  phoenix/server/api/input_types/DatasetSort.py,sha256=KDKjx5L8WFNwx7O-g1pDzCMMwY-ErgDd1_HkkZBAvCY,333
230
231
  phoenix/server/api/input_types/DatasetVersionSort.py,sha256=w9HyP9rQKsZGiGc2f33ZNmiO9g7FN8r77T7GA85kb40,344
231
232
  phoenix/server/api/input_types/DeleteAnnotationsInput.py,sha256=nuTcbeRt54XCYc87URI1_ZTTnIBK25EwRJCgNLJqvAM,141
@@ -260,7 +261,7 @@ phoenix/server/api/input_types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
260
261
  phoenix/server/api/mutations/__init__.py,sha256=83V5Ia8ijsajSLo_gzAuHXo4hgDlUGLIUrerxzKKVn8,2385
261
262
  phoenix/server/api/mutations/annotation_config_mutations.py,sha256=ZcjWlJ88B_jevoESmOtmO0l-SUEbtAwxwP1KpWTmYqQ,15511
262
263
  phoenix/server/api/mutations/api_key_mutations.py,sha256=3djEPrVOwF7oN3C46WEROWqiBi0EZnue7dTQDAxwBKo,6526
263
- phoenix/server/api/mutations/chat_mutations.py,sha256=EQRSGpUdlfbW1pDdCFCtMOian_CpGhhd3ZMY1qsmAhA,25345
264
+ phoenix/server/api/mutations/chat_mutations.py,sha256=T9S6IMWVSoFVhkwyXGMg-LGKPcQcKtKb7Y4nsDbRr_0,26020
264
265
  phoenix/server/api/mutations/dataset_label_mutations.py,sha256=Paq1zsWyrAXTcfPvX5Bn53LDt1rIIrJtAo5XlRP-0Ts,11660
265
266
  phoenix/server/api/mutations/dataset_mutations.py,sha256=BsBW2epV3gtgnO2fn3lJP9uX2qOZEY6gy0UW1UEgpUA,28137
266
267
  phoenix/server/api/mutations/dataset_split_mutations.py,sha256=Mbmr6LyqqoaLfB4rwMrx2V0GICHlcJ34hyj6c1k7tvk,17415
@@ -288,12 +289,12 @@ phoenix/server/api/routers/utils.py,sha256=M41BoH-fl37izhRuN2aX7lWm7jOC20A_3uClv
288
289
  phoenix/server/api/routers/v1/__init__.py,sha256=C4T5F9gzb3cbaWWqR_0jysh2AhRVS_7qcceE6FD-Ojo,3320
289
290
  phoenix/server/api/routers/v1/annotation_configs.py,sha256=g4XpQAAF3rt_4p0MHPsdCBiJGKCIoAHAJUQrked-eHE,15779
290
291
  phoenix/server/api/routers/v1/annotations.py,sha256=ZZnh8hoOjq1rFnytivHwfIWbS1jmDZeHULPC4qV_gQM,23261
291
- phoenix/server/api/routers/v1/datasets.py,sha256=9SRQDt4KGVOjLI8gJvdwWBsYljbeymg6yIoKRXLpgCM,38615
292
+ phoenix/server/api/routers/v1/datasets.py,sha256=SxkjRaHQxVRKsMfe3-iV9BMJcbERn9l0pzDZFaY2nEU,43663
292
293
  phoenix/server/api/routers/v1/documents.py,sha256=J6fvKipprdJJoB7Pr8dU1f7z5Bym5Ehh_sH_vtTP3R0,5667
293
294
  phoenix/server/api/routers/v1/evaluations.py,sha256=BpY8vWBNAdBB3Qe_cHpkSHVfRjU0SUfOKdI46JicXJE,12578
294
295
  phoenix/server/api/routers/v1/experiment_evaluations.py,sha256=qd7r8q0GXWUV_j8vx1ca-5WCazPFAf8nrKHNBqy9irk,5171
295
296
  phoenix/server/api/routers/v1/experiment_runs.py,sha256=Z7pzvIms3_iSYUWELY7W-yz3dJnhN0AxJwdOb2JsCa0,8309
296
- phoenix/server/api/routers/v1/experiments.py,sha256=OvD1JCw1Mb82t4VXXedZZBTt3FjNGdToaXYcUIKGsFY,21733
297
+ phoenix/server/api/routers/v1/experiments.py,sha256=IGWOQ3JGFPorPiuqsz1iyAFSbvDQeTJpxa5ZiiqQlnk,22583
297
298
  phoenix/server/api/routers/v1/models.py,sha256=p3gJN-9SWiUYTUTft4bZMsZVCBNTb4nN1Foy68eRZzQ,1997
298
299
  phoenix/server/api/routers/v1/projects.py,sha256=E5yoL6KbjuHCqlfNc2-hkoG_7JKOI2c-xpbackS-Cys,11244
299
300
  phoenix/server/api/routers/v1/prompts.py,sha256=D4pg8SSuGDEHTwDzZU9UG0ymRNDnIuuFf4zp4EeTs5Q,25920
@@ -316,7 +317,7 @@ phoenix/server/api/types/CostBreakdown.py,sha256=yw9dlb0blGIB_dWNP8yEvDHJztHjpiV
316
317
  phoenix/server/api/types/CreateDatasetPayload.py,sha256=R-6zCmuD0f76RU9Giu78xwTHlASQs6Aq8yzvX1Kxc3g,140
317
318
  phoenix/server/api/types/CronExpression.py,sha256=R7oxuSSX_eTUHQWaoaSueQqWDmkkHr5dBKRN6q-6ROk,331
318
319
  phoenix/server/api/types/DataQualityMetric.py,sha256=Aieg3bHeBFaAf4mqeRcH1zT04sXAtQD8ATSHJt7FaBQ,1538
319
- phoenix/server/api/types/Dataset.py,sha256=9e3X4r0Z7GL7axi7JQk67eTCAZNMw_7UOja_JoaSmJo,16819
320
+ phoenix/server/api/types/Dataset.py,sha256=l-jFTn-DLVevOFvk8NDga6BqDn5rY12fO1y5smFECp4,16795
320
321
  phoenix/server/api/types/DatasetExample.py,sha256=9xEdDVj8rNK3LOs98Ekm67sz56yfpjj9Vn9CXIndW74,5650
321
322
  phoenix/server/api/types/DatasetExampleRevision.py,sha256=c-jWR6dTguEZTm54IMlFr0Ic84I3nefyDnZb7nF5hnI,874
322
323
  phoenix/server/api/types/DatasetExperimentAnnotationSummary.py,sha256=EVXz6zfbdYsU5SZ6FUrAA_VQqQCnBE_mbKgmAmFoDLI,195
@@ -338,7 +339,7 @@ phoenix/server/api/types/EvaluationSummary.py,sha256=vILYejnfPvMwWEXOwhQZsANvYe3
338
339
  phoenix/server/api/types/Event.py,sha256=iYt_Jx1Roioo0vZ0iPeJTHcTu6NSm4ilVMJ-IMUHAKk,3970
339
340
  phoenix/server/api/types/EventMetadata.py,sha256=-J0tYF9eZTHwCjwxQHY7Gckr2_MNW5OoWT1mydweZNM,635
340
341
  phoenix/server/api/types/ExampleRevisionInterface.py,sha256=gV3Gt9-3Oi5wjaVtepC6nOt3FzTzZFD1KebNnqiw56E,294
341
- phoenix/server/api/types/Experiment.py,sha256=ogE0Ks6MPIc5zeA77iyGNv5Y1pz_-NM1GU_de7-QSq8,9532
342
+ phoenix/server/api/types/Experiment.py,sha256=LvNUVyIpK164HmGJ8xmyCkFsZWHyW9dCAE1B2duKl8I,10095
342
343
  phoenix/server/api/types/ExperimentAnnotationSummary.py,sha256=Uk3JtxIrsMoZT5tqc4nJdUOM3XegVzjUyoV3pkjNotE,256
343
344
  phoenix/server/api/types/ExperimentComparison.py,sha256=fj4KoAPFNJvfrHBMloGkHz_-7Lf403IMe0OwDDJyZWk,383
344
345
  phoenix/server/api/types/ExperimentRepeatedRunGroup.py,sha256=a2-C6ZWyFm-THvus6n4WDYGtmapm-ZWFaDahW7A2i28,5434
@@ -401,7 +402,7 @@ phoenix/server/cost_tracking/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
401
402
  phoenix/server/cost_tracking/cost_details_calculator.py,sha256=Tt0YcuLhgPuXKWJemWVmYQfG0xQUvH4VziIj6KcDnoA,8945
402
403
  phoenix/server/cost_tracking/cost_model_lookup.py,sha256=jhtVdnQBzrTUHeOGPWgOebk-Io5hpJ1vAgWOu8ojeJ4,6801
403
404
  phoenix/server/cost_tracking/helpers.py,sha256=Pk6ECjnYreTxrldtRwxnwFcxIPVsvDq_yAwDA_spkOc,2122
404
- phoenix/server/cost_tracking/model_cost_manifest.json,sha256=qPDorKVjL9O9OtBTcHUW38yq6WfGSw2lYjnDTAlbb6s,68581
405
+ phoenix/server/cost_tracking/model_cost_manifest.json,sha256=d8r3YEhCH1PxX8ebla-k0JAKk6e2cjkxWQ0ybQ2zrC4,71781
405
406
  phoenix/server/cost_tracking/regex_specificity.py,sha256=9kqWuQ68C-hlwW25hr7BhFlRt5y2Nnpy0Ax3n9UN6Xk,11622
406
407
  phoenix/server/cost_tracking/token_cost_calculator.py,sha256=2JEZnvusx2-xbhp8krp9EarjWuyGH2KO4e-ZwJX-K0s,1598
407
408
  phoenix/server/daemons/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -430,16 +431,16 @@ phoenix/server/static/apple-touch-icon-76x76.png,sha256=CT_xT12I0u2i0WU8JzBZBuOQ
430
431
  phoenix/server/static/apple-touch-icon.png,sha256=fOfpjqGpWYbJ0eAurKsyoZP1EAs6ZVooBJ_SGk2ZkDs,3801
431
432
  phoenix/server/static/favicon.ico,sha256=bY0vvCKRftemZfPShwZtE93DiiQdaYaozkPGwNFr6H8,34494
432
433
  phoenix/server/static/modernizr.js,sha256=mvK-XtkNqjOral-QvzoqsyOMECXIMu5BQwSVN_wcU9c,2564
433
- phoenix/server/static/.vite/manifest.json,sha256=5fpY6vVAsxBRbIz1baNZ1Jd0FZIXJJ5bZq3sORv9VtU,2328
434
- phoenix/server/static/assets/components-CboqzKQ9.js,sha256=BMU19yw43gTzg0-RbLXhP_xgOifcxpNKF3Ff0k1PiDE,743011
435
- phoenix/server/static/assets/index-CYYGI5-x.js,sha256=lz6Y3i3pwdaFw2QfYqp7gaVgmWYafoUWvvu1A7ciCMg,63675
436
- phoenix/server/static/assets/pages-DdlUeKi2.js,sha256=YUVU8xR7I9j927Sptk3AkiXC7SgIcaDTfAIJl3OSdKE,1352219
434
+ phoenix/server/static/.vite/manifest.json,sha256=o_7W7W2yi7eRf9EUNoLT4aOlcRodtT7OlfNWo9agUa0,2328
435
+ phoenix/server/static/assets/components-X_GtZhnz.js,sha256=qKnZEKJCeNl28Me3cqs1jEPM2OCJQEaXd-vM_qJQ7hQ,758722
436
+ phoenix/server/static/assets/index-BCtFqQdo.js,sha256=LhoeZWDjS_vlgvwY4nz8c8Ogkn19zwr94vJzK0evXXk,63675
437
+ phoenix/server/static/assets/pages-Dl8TWyNq.js,sha256=W5kL05Jv_gyf7ExeJ9zX5YicL2u8RsuBkUqRW22aPiU,1352914
438
+ phoenix/server/static/assets/vendor-3BvTzoBp.js,sha256=TTjoWR-GrJf3kUBuRWOKsoL66pKco299wKSb7lgaKLA,2676807
437
439
  phoenix/server/static/assets/vendor-BGzfc4EU.css,sha256=Nx5Lmx-bqYR7nsO_O4kEBcrJ8cwknWjZ6seHN3_s4UQ,3171
438
- phoenix/server/static/assets/vendor-CQ4tN9P7.js,sha256=T-jwFQyaPcs9NTsr1-LgZyTCOHuU79yNocsMVZpL9os,2647461
439
- phoenix/server/static/assets/vendor-arizeai-Cb1ncvYH.js,sha256=SEQFDzn04e85NQ20oEHzQUtkhBghcT_ihBRr3PCX2_4,61555
440
- phoenix/server/static/assets/vendor-codemirror-CckmKopH.js,sha256=MQyNw9XiM5yirfH35t-lnEh07dgg29PdGhy4iUiv9vA,413211
441
- phoenix/server/static/assets/vendor-recharts-BC1ysIKu.js,sha256=D38l2FL3n4q-emg9NWzdIhye8tleaur0d9Qu-lMXgIE,231652
442
- phoenix/server/static/assets/vendor-shiki-B45T-YxN.js,sha256=EaUAfs0m0Gy_vwpnvWRTZQpiSIHxcmaY6tk_ASmiPPQ,305160
440
+ phoenix/server/static/assets/vendor-arizeai-C6_oC0y8.js,sha256=meOakkfYcA4TSYjxbobysSn5Z8YdOw2EaBZP3iC977g,61555
441
+ phoenix/server/static/assets/vendor-codemirror-DPnZGAZA.js,sha256=Ry5RV48MqAg_Q1PK0-URAbyinGajuQ728O71QBVD-u8,413334
442
+ phoenix/server/static/assets/vendor-recharts-CjgSbsB0.js,sha256=lnJ2ZyzB_LTd0pLIp2fohK9v9UrzMLeY1TlzDIpJQok,231652
443
+ phoenix/server/static/assets/vendor-shiki-CJyhDG0E.js,sha256=Aia7kJ1a_hjZkazx9ePQjwgI_eyjq-7geCiGHJDDnXw,305160
443
444
  phoenix/server/static/assets/vendor-three-BtCyLs1w.js,sha256=E6e1HbskKn61fWQPWmiZiPXXGHfZYn-30v0nofpDaqo,704132
444
445
  phoenix/server/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
445
446
  phoenix/server/templates/index.html,sha256=_iKIyXEDDr5cTTnrUCjCd617U6Alc1k-IXtdKSt8g14,7215
@@ -479,9 +480,9 @@ phoenix/utilities/project.py,sha256=auVpARXkDb-JgeX5f2aStyFIkeKvGwN9l7qrFeJMVxI,
479
480
  phoenix/utilities/re.py,sha256=6YyUWIkv0zc2SigsxfOWIHzdpjKA_TZo2iqKq7zJKvw,2081
480
481
  phoenix/utilities/span_store.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
481
482
  phoenix/utilities/template_formatters.py,sha256=gh9PJD6WEGw7TEYXfSst1UR4pWWwmjxMLrDVQ_CkpkQ,2779
482
- arize_phoenix-12.6.0.dist-info/METADATA,sha256=8sMWL54La0PXr6Qh0N6-DY-hTJL-FYanll5qitmNa90,34069
483
- arize_phoenix-12.6.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
484
- arize_phoenix-12.6.0.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
485
- arize_phoenix-12.6.0.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
486
- arize_phoenix-12.6.0.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
487
- arize_phoenix-12.6.0.dist-info/RECORD,,
483
+ arize_phoenix-12.7.0.dist-info/METADATA,sha256=LnGkrf4RgexzjMydbt9ppbNvDmiTCjQd_f3xtH4O2YQ,35327
484
+ arize_phoenix-12.7.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
485
+ arize_phoenix-12.7.0.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
486
+ arize_phoenix-12.7.0.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
487
+ arize_phoenix-12.7.0.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
488
+ arize_phoenix-12.7.0.dist-info/RECORD,,
@@ -29,6 +29,7 @@ from phoenix.server.api.dataloaders import (
29
29
  DocumentEvaluationSummaryDataLoader,
30
30
  DocumentRetrievalMetricsDataLoader,
31
31
  ExperimentAnnotationSummaryDataLoader,
32
+ ExperimentDatasetSplitsDataLoader,
32
33
  ExperimentErrorRatesDataLoader,
33
34
  ExperimentRepeatedRunGroupAnnotationSummariesDataLoader,
34
35
  ExperimentRepeatedRunGroupsDataLoader,
@@ -111,6 +112,7 @@ class DataLoaders:
111
112
  document_evaluations: DocumentEvaluationsDataLoader
112
113
  document_retrieval_metrics: DocumentRetrievalMetricsDataLoader
113
114
  experiment_annotation_summaries: ExperimentAnnotationSummaryDataLoader
115
+ experiment_dataset_splits: ExperimentDatasetSplitsDataLoader
114
116
  experiment_error_rates: ExperimentErrorRatesDataLoader
115
117
  experiment_repeated_run_group_annotation_summaries: (
116
118
  ExperimentRepeatedRunGroupAnnotationSummariesDataLoader
@@ -25,6 +25,7 @@ from .document_evaluation_summaries import (
25
25
  from .document_evaluations import DocumentEvaluationsDataLoader
26
26
  from .document_retrieval_metrics import DocumentRetrievalMetricsDataLoader
27
27
  from .experiment_annotation_summaries import ExperimentAnnotationSummaryDataLoader
28
+ from .experiment_dataset_splits import ExperimentDatasetSplitsDataLoader
28
29
  from .experiment_error_rates import ExperimentErrorRatesDataLoader
29
30
  from .experiment_repeated_run_group_annotation_summaries import (
30
31
  ExperimentRepeatedRunGroupAnnotationSummariesDataLoader,
@@ -91,6 +92,7 @@ __all__ = [
91
92
  "DatasetExamplesAndVersionsByExperimentRunDataLoader",
92
93
  "DatasetExampleSplitsDataLoader",
93
94
  "DatasetLabelsDataLoader",
95
+ "ExperimentDatasetSplitsDataLoader",
94
96
  "DocumentEvaluationSummaryDataLoader",
95
97
  "DocumentEvaluationsDataLoader",
96
98
  "DocumentRetrievalMetricsDataLoader",
@@ -0,0 +1,43 @@
1
+ from sqlalchemy import select
2
+ from strawberry.dataloader import DataLoader
3
+ from typing_extensions import TypeAlias
4
+
5
+ from phoenix.db import models
6
+ from phoenix.server.types import DbSessionFactory
7
+
8
+ ExperimentID: TypeAlias = int
9
+ Key: TypeAlias = ExperimentID
10
+ Result: TypeAlias = list[models.DatasetSplit]
11
+
12
+
13
+ class ExperimentDatasetSplitsDataLoader(DataLoader[Key, Result]):
14
+ def __init__(self, db: DbSessionFactory) -> None:
15
+ super().__init__(
16
+ load_fn=self._load_fn,
17
+ )
18
+ self._db = db
19
+
20
+ async def _load_fn(self, keys: list[Key]) -> list[Result]:
21
+ experiment_ids = keys
22
+ async with self._db() as session:
23
+ splits: dict[ExperimentID, list[models.DatasetSplit]] = {}
24
+
25
+ async for experiment_id, split in await session.stream(
26
+ select(models.ExperimentDatasetSplit.experiment_id, models.DatasetSplit)
27
+ .select_from(models.DatasetSplit)
28
+ .join(
29
+ models.ExperimentDatasetSplit,
30
+ onclause=(
31
+ models.DatasetSplit.id == models.ExperimentDatasetSplit.dataset_split_id
32
+ ),
33
+ )
34
+ .where(models.ExperimentDatasetSplit.experiment_id.in_(experiment_ids))
35
+ ):
36
+ if experiment_id not in splits:
37
+ splits[experiment_id] = []
38
+ splits[experiment_id].append(split)
39
+
40
+ return [
41
+ sorted(splits.get(experiment_id, []), key=lambda x: x.name)
42
+ for experiment_id in keys
43
+ ]
@@ -40,6 +40,7 @@ class ChatCompletionOverDatasetInput:
40
40
  repetitions: int
41
41
  dataset_id: GlobalID
42
42
  dataset_version_id: Optional[GlobalID] = None
43
+ split_ids: Optional[list[GlobalID]] = None
43
44
  experiment_name: Optional[str] = None
44
45
  experiment_description: Optional[str] = None
45
46
  experiment_metadata: Optional[JSON] = strawberry.field(default_factory=dict)
@@ -1,6 +1,8 @@
1
1
  from enum import Enum
2
+ from typing import Optional
2
3
 
3
4
  import strawberry
5
+ from strawberry import UNSET
4
6
 
5
7
 
6
8
  @strawberry.enum
@@ -10,5 +12,6 @@ class DatasetFilterColumn(Enum):
10
12
 
11
13
  @strawberry.input(description="A filter for datasets")
12
14
  class DatasetFilter:
13
- col: DatasetFilterColumn
14
- value: str
15
+ col: Optional[DatasetFilterColumn] = None
16
+ value: Optional[str] = None
17
+ filter_labels: Optional[list[str]] = UNSET
@@ -186,12 +186,21 @@ class ChatCompletionMutationMixin:
186
186
  raise NotFound("No versions found for the given dataset")
187
187
  else:
188
188
  resolved_version_id = dataset_version_id
189
+ # Parse split IDs if provided
190
+ resolved_split_ids: Optional[list[int]] = None
191
+ if input.split_ids is not None and len(input.split_ids) > 0:
192
+ resolved_split_ids = [
193
+ from_global_id_with_expected_type(split_id, models.DatasetSplit.__name__)
194
+ for split_id in input.split_ids
195
+ ]
196
+
189
197
  revisions = [
190
198
  revision
191
199
  async for revision in await session.stream_scalars(
192
- get_dataset_example_revisions(resolved_version_id).order_by(
193
- models.DatasetExampleRevision.id
194
- )
200
+ get_dataset_example_revisions(
201
+ resolved_version_id,
202
+ split_ids=resolved_split_ids,
203
+ ).order_by(models.DatasetExampleRevision.id)
195
204
  )
196
205
  ]
197
206
  if not revisions:
@@ -208,6 +217,11 @@ class ChatCompletionMutationMixin:
208
217
  project_name=project_name,
209
218
  user_id=user_id,
210
219
  )
220
+ if resolved_split_ids:
221
+ experiment.experiment_dataset_splits = [
222
+ models.ExperimentDatasetSplit(dataset_split_id=split_id)
223
+ for split_id in resolved_split_ids
224
+ ]
211
225
  await insert_experiment_with_examples_snapshot(session, experiment)
212
226
 
213
227
  results: list[Union[ChatCompletionMutationPayload, BaseException]] = []
@@ -22,7 +22,10 @@ from phoenix.config import (
22
22
  )
23
23
  from phoenix.db import models
24
24
  from phoenix.db.constants import DEFAULT_PROJECT_TRACE_RETENTION_POLICY_ID
25
- from phoenix.db.helpers import SupportedSQLDialect, exclude_experiment_projects
25
+ from phoenix.db.helpers import (
26
+ SupportedSQLDialect,
27
+ exclude_experiment_projects,
28
+ )
26
29
  from phoenix.db.models import LatencyMs
27
30
  from phoenix.pointcloud.clustering import Hdbscan
28
31
  from phoenix.server.api.auth import MSG_ADMIN_ONLY, IsAdmin
@@ -385,7 +388,35 @@ class Query:
385
388
  sort_col = getattr(models.Dataset, sort.col.value)
386
389
  stmt = stmt.order_by(sort_col.desc() if sort.dir is SortDir.desc else sort_col.asc())
387
390
  if filter:
388
- stmt = stmt.where(getattr(models.Dataset, filter.col.value).ilike(f"%{filter.value}%"))
391
+ # Apply name filter
392
+ if filter.col and filter.value:
393
+ stmt = stmt.where(
394
+ getattr(models.Dataset, filter.col.value).ilike(f"%{filter.value}%")
395
+ )
396
+
397
+ # Apply label filter
398
+ if filter.filter_labels and filter.filter_labels is not UNSET:
399
+ label_rowids = []
400
+ for label_id in filter.filter_labels:
401
+ try:
402
+ label_rowid = from_global_id_with_expected_type(
403
+ global_id=GlobalID.from_id(label_id),
404
+ expected_type_name="DatasetLabel",
405
+ )
406
+ label_rowids.append(label_rowid)
407
+ except ValueError:
408
+ continue # Skip invalid label IDs
409
+
410
+ if label_rowids:
411
+ # Join with the junction table to filter by labels
412
+ stmt = (
413
+ stmt.join(
414
+ models.DatasetsDatasetLabel,
415
+ models.Dataset.id == models.DatasetsDatasetLabel.dataset_id,
416
+ )
417
+ .where(models.DatasetsDatasetLabel.dataset_label_id.in_(label_rowids))
418
+ .distinct()
419
+ )
389
420
  async with info.context.db() as session:
390
421
  datasets = await session.scalars(stmt)
391
422
  return connection_from_list(
@@ -448,6 +479,7 @@ class Query:
448
479
  )
449
480
  )
450
481
  ).all()
482
+
451
483
  if not experiments or len(experiments) < len(experiment_rowids):
452
484
  raise NotFound("Unable to resolve one or more experiment IDs.")
453
485
  num_datasets = len(set(experiment.dataset_id for experiment in experiments))
@@ -456,37 +488,19 @@ class Query:
456
488
  base_experiment = next(
457
489
  experiment for experiment in experiments if experiment.id == base_experiment_rowid
458
490
  )
459
- revision_ids = (
460
- select(func.max(models.DatasetExampleRevision.id))
461
- .join(
462
- models.DatasetExample,
463
- models.DatasetExample.id == models.DatasetExampleRevision.dataset_example_id,
464
- )
465
- .where(
466
- and_(
467
- models.DatasetExampleRevision.dataset_version_id
468
- <= base_experiment.dataset_version_id,
469
- models.DatasetExample.dataset_id == base_experiment.dataset_id,
470
- )
471
- )
472
- .group_by(models.DatasetExampleRevision.dataset_example_id)
473
- .scalar_subquery()
474
- )
491
+
492
+ # Use ExperimentDatasetExample to pull down examples.
493
+ # Splits are mutable and should not be used for comparison.
494
+ # The comparison should only occur against examples which were assigned to the same
495
+ # splits at the time of execution of the ExperimentRun.
475
496
  examples_query = (
476
497
  select(models.DatasetExample)
477
- .distinct(models.DatasetExample.id)
478
- .join(
479
- models.DatasetExampleRevision,
480
- onclause=and_(
481
- models.DatasetExample.id
482
- == models.DatasetExampleRevision.dataset_example_id,
483
- models.DatasetExampleRevision.id.in_(revision_ids),
484
- models.DatasetExampleRevision.revision_kind != "DELETE",
485
- ),
486
- )
498
+ .join(models.ExperimentDatasetExample)
499
+ .where(models.ExperimentDatasetExample.experiment_id == base_experiment_rowid)
487
500
  .order_by(models.DatasetExample.id.desc())
488
501
  .limit(page_size + 1)
489
502
  )
503
+
490
504
  if cursor is not None:
491
505
  examples_query = examples_query.where(models.DatasetExample.id < cursor.rowid)
492
506
 
@@ -1103,6 +1117,7 @@ class Query:
1103
1117
  after: Optional[CursorString] = UNSET,
1104
1118
  before: Optional[CursorString] = UNSET,
1105
1119
  filter: Optional[PromptFilter] = UNSET,
1120
+ labelIds: Optional[list[GlobalID]] = UNSET,
1106
1121
  ) -> Connection[Prompt]:
1107
1122
  args = ConnectionArgs(
1108
1123
  first=first,
@@ -1119,6 +1134,16 @@ class Query:
1119
1134
  stmt = stmt.where(column.ilike(f"%{filter.value}%")).order_by(
1120
1135
  models.Prompt.updated_at.desc()
1121
1136
  )
1137
+ if labelIds:
1138
+ stmt = stmt.join(models.PromptPromptLabel).where(
1139
+ models.PromptPromptLabel.prompt_label_id.in_(
1140
+ from_global_id_with_expected_type(
1141
+ global_id=label_id, expected_type_name="PromptLabel"
1142
+ )
1143
+ for label_id in labelIds
1144
+ )
1145
+ )
1146
+ stmt = stmt.distinct()
1122
1147
  async with info.context.db() as session:
1123
1148
  orm_prompts = await session.stream_scalars(stmt)
1124
1149
  data = [to_gql_prompt_from_orm(orm_prompt) async for orm_prompt in orm_prompts]