arize-phoenix 4.4.3__tar.gz → 4.4.4rc0__tar.gz

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 (260) hide show
  1. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/PKG-INFO +4 -4
  2. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/pyproject.toml +21 -11
  3. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/__init__.py +0 -27
  4. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/config.py +21 -7
  5. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/core/model.py +25 -25
  6. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/core/model_schema.py +64 -62
  7. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/core/model_schema_adapter.py +27 -25
  8. arize_phoenix-4.4.4rc0/src/phoenix/datasets/evaluators.py +275 -0
  9. arize_phoenix-4.4.4rc0/src/phoenix/datasets/experiments.py +469 -0
  10. arize_phoenix-4.4.4rc0/src/phoenix/datasets/tracing.py +66 -0
  11. arize_phoenix-4.4.4rc0/src/phoenix/datasets/types.py +212 -0
  12. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/db/bulk_inserter.py +54 -14
  13. arize_phoenix-4.4.4rc0/src/phoenix/db/insertion/dataset.py +234 -0
  14. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/db/insertion/evaluation.py +6 -6
  15. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/db/insertion/helpers.py +13 -2
  16. arize_phoenix-4.4.4rc0/src/phoenix/db/migrations/types.py +29 -0
  17. arize_phoenix-4.4.4rc0/src/phoenix/db/migrations/versions/10460e46d750_datasets.py +291 -0
  18. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/db/migrations/versions/cf03bd6bae1d_init.py +2 -28
  19. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/db/models.py +230 -3
  20. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/inferences/fixtures.py +23 -23
  21. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/inferences/inferences.py +7 -7
  22. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/inferences/validation.py +1 -1
  23. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/context.py +16 -0
  24. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/dataloaders/__init__.py +16 -0
  25. arize_phoenix-4.4.4rc0/src/phoenix/server/api/dataloaders/dataset_example_revisions.py +100 -0
  26. arize_phoenix-4.4.4rc0/src/phoenix/server/api/dataloaders/dataset_example_spans.py +43 -0
  27. arize_phoenix-4.4.4rc0/src/phoenix/server/api/dataloaders/experiment_annotation_summaries.py +85 -0
  28. arize_phoenix-4.4.4rc0/src/phoenix/server/api/dataloaders/experiment_error_rates.py +43 -0
  29. arize_phoenix-4.4.4rc0/src/phoenix/server/api/dataloaders/experiment_sequence_number.py +49 -0
  30. arize_phoenix-4.4.4rc0/src/phoenix/server/api/dataloaders/project_by_name.py +31 -0
  31. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/dataloaders/span_descendants.py +2 -3
  32. arize_phoenix-4.4.4rc0/src/phoenix/server/api/dataloaders/span_projects.py +33 -0
  33. arize_phoenix-4.4.4rc0/src/phoenix/server/api/dataloaders/trace_row_ids.py +39 -0
  34. arize_phoenix-4.4.4rc0/src/phoenix/server/api/helpers/dataset_helpers.py +178 -0
  35. arize_phoenix-4.4.4rc0/src/phoenix/server/api/input_types/AddExamplesToDatasetInput.py +16 -0
  36. arize_phoenix-4.4.4rc0/src/phoenix/server/api/input_types/AddSpansToDatasetInput.py +14 -0
  37. arize_phoenix-4.4.4rc0/src/phoenix/server/api/input_types/CreateDatasetInput.py +12 -0
  38. arize_phoenix-4.4.4rc0/src/phoenix/server/api/input_types/DatasetExampleInput.py +14 -0
  39. arize_phoenix-4.4.4rc0/src/phoenix/server/api/input_types/DatasetSort.py +17 -0
  40. arize_phoenix-4.4.4rc0/src/phoenix/server/api/input_types/DatasetVersionSort.py +16 -0
  41. arize_phoenix-4.4.4rc0/src/phoenix/server/api/input_types/DeleteDatasetExamplesInput.py +13 -0
  42. arize_phoenix-4.4.4rc0/src/phoenix/server/api/input_types/DeleteDatasetInput.py +7 -0
  43. arize_phoenix-4.4.4rc0/src/phoenix/server/api/input_types/DeleteExperimentsInput.py +9 -0
  44. arize_phoenix-4.4.4rc0/src/phoenix/server/api/input_types/PatchDatasetExamplesInput.py +35 -0
  45. arize_phoenix-4.4.4rc0/src/phoenix/server/api/input_types/PatchDatasetInput.py +14 -0
  46. arize_phoenix-4.4.4rc0/src/phoenix/server/api/mutations/__init__.py +13 -0
  47. arize_phoenix-4.4.4rc0/src/phoenix/server/api/mutations/auth.py +11 -0
  48. arize_phoenix-4.4.4rc0/src/phoenix/server/api/mutations/dataset_mutations.py +520 -0
  49. arize_phoenix-4.4.4rc0/src/phoenix/server/api/mutations/experiment_mutations.py +65 -0
  50. arize_phoenix-4.4.3/src/phoenix/server/api/types/ExportEventsMutation.py → arize_phoenix-4.4.4rc0/src/phoenix/server/api/mutations/export_events_mutations.py +17 -14
  51. arize_phoenix-4.4.4rc0/src/phoenix/server/api/mutations/project_mutations.py +42 -0
  52. arize_phoenix-4.4.4rc0/src/phoenix/server/api/queries.py +503 -0
  53. arize_phoenix-4.4.4rc0/src/phoenix/server/api/routers/v1/__init__.py +86 -0
  54. arize_phoenix-4.4.4rc0/src/phoenix/server/api/routers/v1/dataset_examples.py +178 -0
  55. arize_phoenix-4.4.4rc0/src/phoenix/server/api/routers/v1/datasets.py +861 -0
  56. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/routers/v1/evaluations.py +4 -2
  57. arize_phoenix-4.4.4rc0/src/phoenix/server/api/routers/v1/experiment_evaluations.py +65 -0
  58. arize_phoenix-4.4.4rc0/src/phoenix/server/api/routers/v1/experiment_runs.py +108 -0
  59. arize_phoenix-4.4.4rc0/src/phoenix/server/api/routers/v1/experiments.py +174 -0
  60. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/routers/v1/spans.py +3 -1
  61. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/routers/v1/traces.py +1 -4
  62. arize_phoenix-4.4.4rc0/src/phoenix/server/api/schema.py +13 -0
  63. arize_phoenix-4.4.4rc0/src/phoenix/server/api/types/AnnotatorKind.py +10 -0
  64. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/Cluster.py +19 -19
  65. arize_phoenix-4.4.4rc0/src/phoenix/server/api/types/CreateDatasetPayload.py +8 -0
  66. arize_phoenix-4.4.4rc0/src/phoenix/server/api/types/Dataset.py +299 -0
  67. arize_phoenix-4.4.4rc0/src/phoenix/server/api/types/DatasetExample.py +85 -0
  68. arize_phoenix-4.4.4rc0/src/phoenix/server/api/types/DatasetExampleRevision.py +34 -0
  69. arize_phoenix-4.4.4rc0/src/phoenix/server/api/types/DatasetVersion.py +14 -0
  70. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/Dimension.py +30 -29
  71. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/EmbeddingDimension.py +40 -34
  72. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/Event.py +16 -16
  73. arize_phoenix-4.4.4rc0/src/phoenix/server/api/types/ExampleRevisionInterface.py +14 -0
  74. arize_phoenix-4.4.4rc0/src/phoenix/server/api/types/Experiment.py +135 -0
  75. arize_phoenix-4.4.4rc0/src/phoenix/server/api/types/ExperimentAnnotationSummary.py +13 -0
  76. arize_phoenix-4.4.4rc0/src/phoenix/server/api/types/ExperimentComparison.py +19 -0
  77. arize_phoenix-4.4.4rc0/src/phoenix/server/api/types/ExperimentRun.py +91 -0
  78. arize_phoenix-4.4.4rc0/src/phoenix/server/api/types/ExperimentRunAnnotation.py +57 -0
  79. arize_phoenix-4.4.3/src/phoenix/server/api/types/Dataset.py → arize_phoenix-4.4.4rc0/src/phoenix/server/api/types/Inferences.py +14 -14
  80. arize_phoenix-4.4.4rc0/src/phoenix/server/api/types/InferencesRole.py +23 -0
  81. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/Model.py +43 -42
  82. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/Project.py +26 -12
  83. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/Span.py +78 -2
  84. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/TimeSeries.py +6 -6
  85. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/Trace.py +15 -4
  86. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/UMAPPoints.py +1 -1
  87. arize_phoenix-4.4.4rc0/src/phoenix/server/api/types/node.py +27 -0
  88. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/pagination.py +10 -52
  89. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/app.py +99 -49
  90. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/main.py +49 -27
  91. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/openapi/docs.py +3 -0
  92. arize_phoenix-4.4.4rc0/src/phoenix/server/static/index.js +8376 -0
  93. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/templates/index.html +1 -0
  94. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/services.py +15 -15
  95. arize_phoenix-4.4.4rc0/src/phoenix/session/client.py +549 -0
  96. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/session/session.py +47 -37
  97. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/exporter.py +14 -9
  98. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/fixtures.py +133 -7
  99. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/span_evaluations.py +3 -3
  100. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/trace_dataset.py +6 -6
  101. arize_phoenix-4.4.4rc0/src/phoenix/utilities/json.py +61 -0
  102. arize_phoenix-4.4.4rc0/src/phoenix/utilities/re.py +50 -0
  103. arize_phoenix-4.4.4rc0/src/phoenix/utilities/span_store.py +0 -0
  104. arize_phoenix-4.4.4rc0/src/phoenix/version.py +1 -0
  105. arize_phoenix-4.4.3/src/phoenix/server/api/routers/v1/__init__.py +0 -11
  106. arize_phoenix-4.4.3/src/phoenix/server/api/schema.py +0 -314
  107. arize_phoenix-4.4.3/src/phoenix/server/api/types/DatasetRole.py +0 -23
  108. arize_phoenix-4.4.3/src/phoenix/server/api/types/node.py +0 -133
  109. arize_phoenix-4.4.3/src/phoenix/server/static/index.js +0 -7498
  110. arize_phoenix-4.4.3/src/phoenix/session/client.py +0 -254
  111. arize_phoenix-4.4.3/src/phoenix/version.py +0 -1
  112. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/.gitignore +0 -0
  113. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/IP_NOTICE +0 -0
  114. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/LICENSE +0 -0
  115. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/README.md +0 -0
  116. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/examples/manually-instrumented-chatbot/chat-service/chat/__init__.py +0 -0
  117. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/examples/manually-instrumented-chatbot/chat-service/chat/app.py +0 -0
  118. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/examples/manually-instrumented-chatbot/chat-service/chat/types.py +0 -0
  119. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/examples/manually-instrumented-chatbot/frontend/Dockerfile +0 -0
  120. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/examples/manually-instrumented-chatbot/frontend/Makefile +0 -0
  121. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/examples/manually-instrumented-chatbot/frontend/__init__.py +0 -0
  122. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/examples/manually-instrumented-chatbot/frontend/pyproject.toml +0 -0
  123. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/examples/manually-instrumented-chatbot/frontend/requirements.txt +0 -0
  124. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/examples/manually-instrumented-chatbot/frontend/schema.json +0 -0
  125. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/core/__init__.py +0 -0
  126. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/core/embedding_dimension.py +0 -0
  127. {arize_phoenix-4.4.3/src/phoenix/db/insertion → arize_phoenix-4.4.4rc0/src/phoenix/datasets}/__init__.py +0 -0
  128. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/datetime_utils.py +0 -0
  129. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/db/README.md +0 -0
  130. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/db/__init__.py +0 -0
  131. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/db/alembic.ini +0 -0
  132. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/db/engines.py +0 -0
  133. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/db/helpers.py +0 -0
  134. {arize_phoenix-4.4.3/src/phoenix/db/migrations → arize_phoenix-4.4.4rc0/src/phoenix/db/insertion}/__init__.py +0 -0
  135. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/db/insertion/span.py +0 -0
  136. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/db/migrate.py +0 -0
  137. {arize_phoenix-4.4.3/src/phoenix/inferences → arize_phoenix-4.4.4rc0/src/phoenix/db/migrations}/__init__.py +0 -0
  138. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/db/migrations/env.py +0 -0
  139. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/db/migrations/script.py.mako +0 -0
  140. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/exceptions.py +0 -0
  141. {arize_phoenix-4.4.3/src/phoenix/server → arize_phoenix-4.4.4rc0/src/phoenix/inferences}/__init__.py +0 -0
  142. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/inferences/errors.py +0 -0
  143. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/inferences/schema.py +0 -0
  144. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/metrics/README.md +0 -0
  145. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/metrics/__init__.py +0 -0
  146. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/metrics/binning.py +0 -0
  147. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/metrics/metrics.py +0 -0
  148. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/metrics/mixins.py +0 -0
  149. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/metrics/retrieval_metrics.py +0 -0
  150. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/metrics/timeseries.py +0 -0
  151. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/metrics/wrappers.py +0 -0
  152. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/pointcloud/__init__.py +0 -0
  153. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/pointcloud/clustering.py +0 -0
  154. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/pointcloud/pointcloud.py +0 -0
  155. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/pointcloud/projectors.py +0 -0
  156. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/pointcloud/umap_parameters.py +0 -0
  157. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/py.typed +0 -0
  158. {arize_phoenix-4.4.3/src/phoenix/server/api → arize_phoenix-4.4.4rc0/src/phoenix/server}/__init__.py +0 -0
  159. {arize_phoenix-4.4.3/src/phoenix/server/api/input_types → arize_phoenix-4.4.4rc0/src/phoenix/server/api}/__init__.py +0 -0
  160. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/dataloaders/cache/__init__.py +0 -0
  161. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/dataloaders/cache/two_tier_cache.py +0 -0
  162. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/dataloaders/document_evaluation_summaries.py +0 -0
  163. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/dataloaders/document_evaluations.py +0 -0
  164. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/dataloaders/document_retrieval_metrics.py +0 -0
  165. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/dataloaders/evaluation_summaries.py +0 -0
  166. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/dataloaders/latency_ms_quantile.py +0 -0
  167. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/dataloaders/min_start_or_max_end_times.py +0 -0
  168. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/dataloaders/record_counts.py +0 -0
  169. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/dataloaders/span_evaluations.py +0 -0
  170. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/dataloaders/token_counts.py +0 -0
  171. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/dataloaders/trace_evaluations.py +0 -0
  172. /arize_phoenix-4.4.3/src/phoenix/server/api/helpers.py → /arize_phoenix-4.4.4rc0/src/phoenix/server/api/helpers/__init__.py +0 -0
  173. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/input_types/ClusterInput.py +0 -0
  174. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/input_types/Coordinates.py +0 -0
  175. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/input_types/DataQualityMetricInput.py +0 -0
  176. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/input_types/DimensionFilter.py +0 -0
  177. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/input_types/DimensionInput.py +0 -0
  178. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/input_types/Granularity.py +0 -0
  179. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/input_types/PerformanceMetricInput.py +0 -0
  180. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/input_types/SpanSort.py +0 -0
  181. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/input_types/TimeRange.py +0 -0
  182. {arize_phoenix-4.4.3/src/phoenix/server/api/routers → arize_phoenix-4.4.4rc0/src/phoenix/server/api/input_types}/__init__.py +0 -0
  183. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/interceptor.py +0 -0
  184. {arize_phoenix-4.4.3/src/phoenix/server/api/types → arize_phoenix-4.4.4rc0/src/phoenix/server/api/routers}/__init__.py +0 -0
  185. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/routers/utils.py +0 -0
  186. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/DataQualityMetric.py +0 -0
  187. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/DatasetValues.py +0 -0
  188. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/DimensionDataType.py +0 -0
  189. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/DimensionShape.py +0 -0
  190. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/DimensionType.py +0 -0
  191. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/DimensionWithValue.py +0 -0
  192. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/DocumentEvaluationSummary.py +0 -0
  193. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/DocumentRetrievalMetrics.py +0 -0
  194. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/EmbeddingMetadata.py +0 -0
  195. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/Evaluation.py +0 -0
  196. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/EvaluationSummary.py +0 -0
  197. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/EventMetadata.py +0 -0
  198. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/ExportedFile.py +0 -0
  199. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/Functionality.py +0 -0
  200. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/MimeType.py +0 -0
  201. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/NumericRange.py +0 -0
  202. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/PerformanceMetric.py +0 -0
  203. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/PromptResponse.py +0 -0
  204. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/Retrieval.py +0 -0
  205. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/ScalarDriftMetricEnum.py +0 -0
  206. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/Segments.py +0 -0
  207. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/SortDir.py +0 -0
  208. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/ValidationResult.py +0 -0
  209. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/api/types/VectorDriftMetricEnum.py +0 -0
  210. {arize_phoenix-4.4.3/src/phoenix/server/openapi → arize_phoenix-4.4.4rc0/src/phoenix/server/api/types}/__init__.py +0 -0
  211. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/grpc_server.py +0 -0
  212. {arize_phoenix-4.4.3/src/phoenix/server/templates → arize_phoenix-4.4.4rc0/src/phoenix/server/openapi}/__init__.py +0 -0
  213. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/prometheus.py +0 -0
  214. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/static/apple-touch-icon-114x114.png +0 -0
  215. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/static/apple-touch-icon-120x120.png +0 -0
  216. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/static/apple-touch-icon-144x144.png +0 -0
  217. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/static/apple-touch-icon-152x152.png +0 -0
  218. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/static/apple-touch-icon-180x180.png +0 -0
  219. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/static/apple-touch-icon-72x72.png +0 -0
  220. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/static/apple-touch-icon-76x76.png +0 -0
  221. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/static/apple-touch-icon.png +0 -0
  222. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/static/favicon.ico +0 -0
  223. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/static/index.css +0 -0
  224. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/static/modernizr.js +0 -0
  225. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/telemetry.py +0 -0
  226. {arize_phoenix-4.4.3/src/phoenix/session → arize_phoenix-4.4.4rc0/src/phoenix/server/templates}/__init__.py +0 -0
  227. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/server/thread_server.py +0 -0
  228. {arize_phoenix-4.4.3/src/phoenix/utilities → arize_phoenix-4.4.4rc0/src/phoenix/session}/__init__.py +0 -0
  229. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/session/data_extractor.py +0 -0
  230. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/session/evaluation.py +0 -0
  231. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/settings.py +0 -0
  232. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/__init__.py +0 -0
  233. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/attributes.py +0 -0
  234. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/dsl/README.md +0 -0
  235. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/dsl/__init__.py +0 -0
  236. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/dsl/filter.py +0 -0
  237. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/dsl/helpers.py +0 -0
  238. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/dsl/query.py +0 -0
  239. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/errors.py +0 -0
  240. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/evaluation_conventions.py +0 -0
  241. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/langchain/__init__.py +0 -0
  242. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/langchain/instrumentor.py +0 -0
  243. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/llama_index/__init__.py +0 -0
  244. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/llama_index/callback.py +0 -0
  245. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/openai/__init__.py +0 -0
  246. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/openai/instrumentor.py +0 -0
  247. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/otel.py +0 -0
  248. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/projects.py +0 -0
  249. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/schemas.py +0 -0
  250. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/span_json_decoder.py +0 -0
  251. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/span_json_encoder.py +0 -0
  252. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/utils.py +0 -0
  253. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/v1/__init__.py +0 -0
  254. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/v1/evaluation_pb2.py +0 -0
  255. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/trace/v1/evaluation_pb2.pyi +0 -0
  256. /arize_phoenix-4.4.3/src/phoenix/utilities/span_store.py → /arize_phoenix-4.4.4rc0/src/phoenix/utilities/__init__.py +0 -0
  257. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/utilities/deprecation.py +0 -0
  258. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/utilities/error_handling.py +0 -0
  259. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/utilities/logging.py +0 -0
  260. {arize_phoenix-4.4.3 → arize_phoenix-4.4.4rc0}/src/phoenix/utilities/project.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: arize-phoenix
3
- Version: 4.4.3
3
+ Version: 4.4.4rc0
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
@@ -20,9 +20,11 @@ Requires-Python: <3.13,>=3.8
20
20
  Requires-Dist: aioitertools
21
21
  Requires-Dist: aiosqlite
22
22
  Requires-Dist: alembic<2,>=1.3.0
23
+ Requires-Dist: arize-phoenix-evals>=0.3.0
23
24
  Requires-Dist: cachetools
24
25
  Requires-Dist: grpcio
25
26
  Requires-Dist: hdbscan>=0.8.33
27
+ Requires-Dist: httpx
26
28
  Requires-Dist: jinja2
27
29
  Requires-Dist: numpy<2
28
30
  Requires-Dist: openinference-instrumentation
@@ -38,7 +40,7 @@ Requires-Dist: pandas
38
40
  Requires-Dist: protobuf<6.0,>=3.20
39
41
  Requires-Dist: psutil
40
42
  Requires-Dist: pyarrow
41
- Requires-Dist: requests
43
+ Requires-Dist: python-multipart
42
44
  Requires-Dist: scikit-learn
43
45
  Requires-Dist: scipy
44
46
  Requires-Dist: sqlalchemy[asyncio]<3,>=2.0.4
@@ -87,9 +89,7 @@ Requires-Dist: pytest==8.2.2; extra == 'dev'
87
89
  Requires-Dist: ruff==0.4.9; extra == 'dev'
88
90
  Requires-Dist: strawberry-graphql[debug-server,opentelemetry]==0.235.0; extra == 'dev'
89
91
  Provides-Extra: evals
90
- Requires-Dist: arize-phoenix-evals>=0.3.0; extra == 'evals'
91
92
  Provides-Extra: experimental
92
- Requires-Dist: tenacity; extra == 'experimental'
93
93
  Provides-Extra: llama-index
94
94
  Requires-Dist: llama-index==0.10.44; extra == 'llama-index'
95
95
  Provides-Extra: pg
@@ -41,7 +41,7 @@ dependencies = [
41
41
  "protobuf>=3.20, <6.0",
42
42
  "grpcio",
43
43
  "tqdm",
44
- "requests",
44
+ "httpx",
45
45
  "opentelemetry-sdk",
46
46
  "opentelemetry-proto>=1.12.0", # needed to avoid this issue: https://github.com/Arize-ai/phoenix/issues/2695
47
47
  "opentelemetry-exporter-otlp",
@@ -57,6 +57,8 @@ dependencies = [
57
57
  "aioitertools",
58
58
  "sqlean.py>=3.45.1",
59
59
  "cachetools",
60
+ "python-multipart", # see https://www.starlette.io/#dependencies
61
+ "arize-phoenix-evals>=0.3.0",
60
62
  ]
61
63
  dynamic = ["version"]
62
64
 
@@ -85,12 +87,8 @@ dev = [
85
87
  "anthropic",
86
88
  "prometheus_client",
87
89
  ]
88
- evals = [
89
- "arize-phoenix-evals>=0.3.0",
90
- ]
91
- experimental = [
92
- "tenacity",
93
- ]
90
+ evals = []
91
+ experimental = []
94
92
  llama-index = [
95
93
  "llama-index==0.10.44", # always pin to a version that keeps our notebooks working
96
94
  ]
@@ -150,7 +148,6 @@ dependencies = [
150
148
  "litellm>=1.0.3",
151
149
  "openai>=1.0.0",
152
150
  "tenacity",
153
- "requests",
154
151
  "protobuf==3.20", # version minimum (for tests)
155
152
  "responses",
156
153
  "tiktoken",
@@ -166,11 +163,9 @@ dependencies = [
166
163
  dependencies = [
167
164
  "mypy==1.10.0",
168
165
  "tenacity",
169
- "pandas-stubs==2.2.2.240603; python_version>='3.9'",
170
- "pandas-stubs==2.0.3.230814; python_version<'3.9'",
166
+ "pandas-stubs==2.0.3.230814",
171
167
  "types-psutil",
172
168
  "types-tqdm",
173
- "types-requests",
174
169
  "types-protobuf",
175
170
  "types-setuptools",
176
171
  "types-cachetools",
@@ -187,14 +182,21 @@ dependencies = [
187
182
  "opentelemetry-instrumentation-grpc",
188
183
  "py-grpc-prometheus",
189
184
  "strawberry-graphql[opentelemetry]==0.235.0", # need to pin version because we're monkey-patching
185
+ "requests", # this is needed to type-check third-party packages
190
186
  ]
191
187
 
188
+ [[tool.hatch.envs.type.matrix]]
189
+ python = ["3.8", "3.9", "3.12"]
190
+
192
191
  [tool.hatch.envs.style]
193
192
  detached = true
194
193
  dependencies = [
195
194
  "ruff==0.4.9",
196
195
  ]
197
196
 
197
+ [[tool.hatch.envs.style.matrix]]
198
+ python = ["3.8", "3.9", "3.12"]
199
+
198
200
  [tool.hatch.envs.notebooks]
199
201
  detached = true
200
202
  dependencies = [
@@ -292,6 +294,14 @@ dependencies = [
292
294
  [tool.hatch.envs.gql.scripts]
293
295
  build = 'strawberry export-schema phoenix.server.api.schema:schema > app/schema.graphql'
294
296
 
297
+ [tool.hatch.envs.openapi]
298
+ dependencies = [
299
+ "pyyaml",
300
+ ]
301
+
302
+ [tool.hatch.envs.openapi.scripts]
303
+ build = 'python -m phoenix.server.api.openapi.main > schemas/openapi.yaml'
304
+
295
305
  [tool.hatch.envs.proto]
296
306
  detached = true
297
307
  dependencies = [
@@ -1,9 +1,3 @@
1
- import sys
2
- from importlib.abc import Loader, MetaPathFinder
3
- from importlib.machinery import ModuleSpec
4
- from types import ModuleType
5
- from typing import Any, Optional
6
-
7
1
  from .inferences.fixtures import ExampleInferences, load_example
8
2
  from .inferences.inferences import Inferences
9
3
  from .inferences.schema import EmbeddingColumnNames, RetrievalEmbeddingColumnNames, Schema
@@ -57,24 +51,3 @@ __all__ = [
57
51
  "Client",
58
52
  "evals",
59
53
  ]
60
-
61
-
62
- class PhoenixEvalsFinder(MetaPathFinder):
63
- def find_spec(self, fullname: Any, path: Any, target: Any = None) -> Optional[ModuleSpec]:
64
- if fullname == "phoenix.evals":
65
- return ModuleSpec(fullname, PhoenixEvalsLoader())
66
- return None
67
-
68
-
69
- class PhoenixEvalsLoader(Loader):
70
- def create_module(self, spec: ModuleSpec) -> None:
71
- return None
72
-
73
- def exec_module(self, module: ModuleType) -> None:
74
- raise ImportError(
75
- "The optional `phoenix.evals` package is not installed. "
76
- "Please install `phoenix` with the `evals` extra: `pip install 'arize-phoenix[evals]'`."
77
- )
78
-
79
-
80
- sys.meta_path.append(PhoenixEvalsFinder())
@@ -2,7 +2,9 @@ import os
2
2
  import tempfile
3
3
  from logging import getLogger
4
4
  from pathlib import Path
5
- from typing import List, Optional
5
+ from typing import Dict, List, Optional
6
+
7
+ from .utilities.re import parse_env_headers
6
8
 
7
9
  logger = getLogger(__name__)
8
10
 
@@ -12,6 +14,12 @@ ENV_PHOENIX_GRPC_PORT = "PHOENIX_GRPC_PORT"
12
14
  ENV_PHOENIX_HOST = "PHOENIX_HOST"
13
15
  ENV_PHOENIX_HOST_ROOT_PATH = "PHOENIX_HOST_ROOT_PATH"
14
16
  ENV_NOTEBOOK_ENV = "PHOENIX_NOTEBOOK_ENV"
17
+ ENV_PHOENIX_CLIENT_HEADERS = "PHOENIX_CLIENT_HEADERS"
18
+ """
19
+ The headers to include in Phoenix client requests.
20
+ Note: This overrides OTEL_EXPORTER_OTLP_HEADERS in the case where
21
+ phoenix.trace instrumentors are used.
22
+ """
15
23
  ENV_PHOENIX_COLLECTOR_ENDPOINT = "PHOENIX_COLLECTOR_ENDPOINT"
16
24
  """
17
25
  The endpoint traces and evals are sent to. This must be set if the Phoenix
@@ -105,15 +113,15 @@ GRPC_PORT = 4317
105
113
  """The port the gRPC server will run on after launch_app is called.
106
114
  The default network port for OTLP/gRPC is 4317.
107
115
  See https://opentelemetry.io/docs/specs/otlp/#otlpgrpc-default-port"""
108
- GENERATED_DATASET_NAME_PREFIX = "phoenix_dataset_"
116
+ GENERATED_INFERENCES_NAME_PREFIX = "phoenix_inferences_"
109
117
  """The prefix of datasets that are auto-assigned a name."""
110
118
  WORKING_DIR = get_working_dir()
111
- """The work directory for saving, loading, and exporting datasets."""
119
+ """The work directory for saving, loading, and exporting data."""
112
120
 
113
121
  ROOT_DIR = WORKING_DIR
114
122
  EXPORT_DIR = ROOT_DIR / "exports"
115
- DATASET_DIR = ROOT_DIR / "datasets"
116
- TRACE_DATASET_DIR = ROOT_DIR / "trace_datasets"
123
+ INFERENCES_DIR = ROOT_DIR / "inferences"
124
+ TRACE_DATASETS_DIR = ROOT_DIR / "trace_datasets"
117
125
 
118
126
 
119
127
  def ensure_working_dir() -> None:
@@ -126,8 +134,8 @@ def ensure_working_dir() -> None:
126
134
  for path in (
127
135
  ROOT_DIR,
128
136
  EXPORT_DIR,
129
- DATASET_DIR,
130
- TRACE_DATASET_DIR,
137
+ INFERENCES_DIR,
138
+ TRACE_DATASETS_DIR,
131
139
  ):
132
140
  path.mkdir(parents=True, exist_ok=True)
133
141
  except Exception as e:
@@ -219,4 +227,10 @@ def get_env_enable_prometheus() -> bool:
219
227
  )
220
228
 
221
229
 
230
+ def get_env_client_headers() -> Optional[Dict[str, str]]:
231
+ if headers_str := os.getenv(ENV_PHOENIX_CLIENT_HEADERS):
232
+ return parse_env_headers(headers_str)
233
+ return None
234
+
235
+
222
236
  DEFAULT_PROJECT_NAME = "default"
@@ -7,73 +7,73 @@ from .embedding_dimension import EmbeddingDimension
7
7
 
8
8
 
9
9
  def _get_embedding_dimensions(
10
- primary_dataset: Inferences, reference_dataset: Optional[Inferences]
10
+ primary_inferences: Inferences, reference_inferences: Optional[Inferences]
11
11
  ) -> List[EmbeddingDimension]:
12
12
  embedding_dimensions: List[EmbeddingDimension] = []
13
13
  embedding_features: EmbeddingFeatures = {}
14
14
 
15
15
  primary_embedding_features: Optional[EmbeddingFeatures] = (
16
- primary_dataset.schema.embedding_feature_column_names
16
+ primary_inferences.schema.embedding_feature_column_names
17
17
  )
18
18
  if primary_embedding_features is not None:
19
19
  embedding_features.update(primary_embedding_features)
20
20
  primary_prompt_column_names: Optional[EmbeddingColumnNames] = (
21
- primary_dataset.schema.prompt_column_names
21
+ primary_inferences.schema.prompt_column_names
22
22
  )
23
23
  if primary_prompt_column_names is not None:
24
24
  embedding_features.update({"prompt": primary_prompt_column_names})
25
25
  primary_response_column_names: Optional[Union[str, EmbeddingColumnNames]] = (
26
- primary_dataset.schema.response_column_names
26
+ primary_inferences.schema.response_column_names
27
27
  )
28
28
  if isinstance(primary_response_column_names, EmbeddingColumnNames):
29
29
  embedding_features.update({"response": primary_response_column_names})
30
30
 
31
- if reference_dataset is not None:
31
+ if reference_inferences is not None:
32
32
  reference_embedding_features: Optional[EmbeddingFeatures] = (
33
- reference_dataset.schema.embedding_feature_column_names
33
+ reference_inferences.schema.embedding_feature_column_names
34
34
  )
35
35
  if reference_embedding_features is not None:
36
36
  embedding_features.update(reference_embedding_features)
37
37
  reference_prompt_column_names: Optional[EmbeddingColumnNames] = (
38
- reference_dataset.schema.prompt_column_names
38
+ reference_inferences.schema.prompt_column_names
39
39
  )
40
40
  if reference_prompt_column_names is not None:
41
41
  embedding_features.update({"prompt": reference_prompt_column_names})
42
42
  reference_response_column_names: Optional[Union[str, EmbeddingColumnNames]] = (
43
- reference_dataset.schema.response_column_names
43
+ reference_inferences.schema.response_column_names
44
44
  )
45
45
  if isinstance(reference_response_column_names, EmbeddingColumnNames):
46
46
  embedding_features.update({"response": reference_response_column_names})
47
47
 
48
48
  for embedding_feature, embedding_column_names in embedding_features.items():
49
49
  embedding_dimensions.append(EmbeddingDimension(name=embedding_feature))
50
- if reference_dataset is not None:
51
- _check_embedding_vector_lengths_match_across_datasets(
52
- embedding_feature, embedding_column_names, primary_dataset, reference_dataset
50
+ if reference_inferences is not None:
51
+ _check_embedding_vector_lengths_match_across_inference_sets(
52
+ embedding_feature, embedding_column_names, primary_inferences, reference_inferences
53
53
  )
54
54
 
55
55
  return embedding_dimensions
56
56
 
57
57
 
58
- def _check_embedding_vector_lengths_match_across_datasets(
58
+ def _check_embedding_vector_lengths_match_across_inference_sets(
59
59
  embedding_feature_name: str,
60
60
  embedding_column_names: EmbeddingColumnNames,
61
- primary_dataset: Inferences,
62
- reference_dataset: Inferences,
61
+ primary_inferences: Inferences,
62
+ reference_inferences: Inferences,
63
63
  ) -> None:
64
64
  """
65
65
  Ensure that for each embedding feature, the vector lengths match across the primary
66
- and reference datasets which is required for calculating embedding drift (vector distance)
66
+ and reference inferences which is required for calculating embedding drift (vector distance)
67
67
  """
68
68
  primary_vector_length = _get_column_vector_length(
69
- primary_dataset, embedding_column_names.vector_column_name
69
+ primary_inferences, embedding_column_names.vector_column_name
70
70
  )
71
71
  reference_vector_length = _get_column_vector_length(
72
- reference_dataset, embedding_column_names.vector_column_name
72
+ reference_inferences, embedding_column_names.vector_column_name
73
73
  )
74
74
 
75
- # if one of the datasets doesn't have the embedding column at all, which is fine since we
76
- # just consider this as missing from one of the datasets and won't need to worry about
75
+ # if one of the inferences doesn't have the embedding column at all, which is fine since we
76
+ # just consider this as missing from one of the inferences and won't need to worry about
77
77
  # calculating drift
78
78
  if primary_vector_length is None or reference_vector_length is None:
79
79
  return
@@ -81,23 +81,23 @@ def _check_embedding_vector_lengths_match_across_datasets(
81
81
  if primary_vector_length != reference_vector_length:
82
82
  raise ValueError(
83
83
  f"Embedding vector length must match for "
84
- f"both datasets; embedding_feature={embedding_feature_name} "
84
+ f"both inference sets; embedding_feature={embedding_feature_name} "
85
85
  f"vector_column={embedding_column_names.vector_column_name}"
86
86
  )
87
87
 
88
88
 
89
89
  def _get_column_vector_length(
90
- dataset: Inferences, embedding_vector_column_name: str
90
+ inferences: Inferences, embedding_vector_column_name: str
91
91
  ) -> Optional[int]:
92
92
  """
93
- Because a dataset has already been constructed, we can assume that the lengths
94
- of the vectors for any given embedding feature in the dataset are the same.
93
+ Because a inferences has already been constructed, we can assume that the lengths
94
+ of the vectors for any given embedding feature in the inferences are the same.
95
95
  Returns the length a vector by getting the length first non-null vector.
96
96
  """
97
- if embedding_vector_column_name not in dataset.dataframe:
97
+ if embedding_vector_column_name not in inferences.dataframe:
98
98
  return None
99
99
 
100
- column = dataset.dataframe[embedding_vector_column_name]
100
+ column = inferences.dataframe[embedding_vector_column_name]
101
101
 
102
102
  for row in column:
103
103
  # None/NaN is a valid entry for a row and represents the fact that the