arize-phoenix 3.2.1__tar.gz → 3.4.0__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 (179) hide show
  1. {arize_phoenix-3.2.1 → arize_phoenix-3.4.0}/PKG-INFO +5 -3
  2. {arize_phoenix-3.2.1 → arize_phoenix-3.4.0}/README.md +2 -2
  3. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/__init__.py +28 -0
  4. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/core/traces.py +138 -139
  5. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/Span.py +3 -4
  6. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/static/index.js +130 -126
  7. arize_phoenix-3.4.0/phoenix/version.py +1 -0
  8. {arize_phoenix-3.2.1 → arize_phoenix-3.4.0}/pyproject.toml +16 -1
  9. arize_phoenix-3.2.1/packages/phoenix-evals/src/phoenix/evals/py.typed +0 -0
  10. arize_phoenix-3.2.1/packages/phoenix-evals/src/phoenix/evals/version.py +0 -1
  11. arize_phoenix-3.2.1/src/phoenix/session/__init__.py +0 -0
  12. arize_phoenix-3.2.1/src/phoenix/version.py +0 -1
  13. {arize_phoenix-3.2.1 → arize_phoenix-3.4.0}/.gitignore +0 -0
  14. {arize_phoenix-3.2.1 → arize_phoenix-3.4.0}/IP_NOTICE +0 -0
  15. {arize_phoenix-3.2.1 → arize_phoenix-3.4.0}/LICENSE +0 -0
  16. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/config.py +0 -0
  17. {arize_phoenix-3.2.1/packages/phoenix-evals/src/phoenix/evals → arize_phoenix-3.4.0/phoenix/core}/__init__.py +0 -0
  18. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/core/embedding_dimension.py +0 -0
  19. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/core/evals.py +0 -0
  20. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/core/model.py +0 -0
  21. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/core/model_schema.py +0 -0
  22. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/core/model_schema_adapter.py +0 -0
  23. {arize_phoenix-3.2.1/src/phoenix/core → arize_phoenix-3.4.0/phoenix/datasets}/__init__.py +0 -0
  24. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/datasets/dataset.py +0 -0
  25. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/datasets/errors.py +0 -0
  26. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/datasets/fixtures.py +0 -0
  27. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/datasets/schema.py +0 -0
  28. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/datasets/validation.py +0 -0
  29. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/datetime_utils.py +0 -0
  30. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/exceptions.py +0 -0
  31. {arize_phoenix-3.2.1/src/phoenix/datasets → arize_phoenix-3.4.0/phoenix/experimental}/__init__.py +0 -0
  32. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/__init__.py +0 -0
  33. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/evaluators.py +0 -0
  34. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/functions/__init__.py +0 -0
  35. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/functions/classify.py +0 -0
  36. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/functions/executor.py +0 -0
  37. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/functions/generate.py +0 -0
  38. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/functions/processing.py +0 -0
  39. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/models/__init__.py +0 -0
  40. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/models/anthropic.py +0 -0
  41. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/models/base.py +0 -0
  42. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/models/bedrock.py +0 -0
  43. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/models/litellm.py +0 -0
  44. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/models/openai.py +0 -0
  45. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/models/rate_limiters.py +0 -0
  46. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/models/vertex.py +0 -0
  47. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/models/vertexai.py +0 -0
  48. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/retrievals.py +0 -0
  49. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/templates/__init__.py +0 -0
  50. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/templates/default_templates.py +0 -0
  51. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/templates/template.py +0 -0
  52. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/utils/__init__.py +0 -0
  53. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/experimental/evals/utils/threads.py +0 -0
  54. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/metrics/README.md +0 -0
  55. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/metrics/__init__.py +0 -0
  56. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/metrics/binning.py +0 -0
  57. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/metrics/metrics.py +0 -0
  58. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/metrics/mixins.py +0 -0
  59. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/metrics/retrieval_metrics.py +0 -0
  60. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/metrics/timeseries.py +0 -0
  61. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/metrics/wrappers.py +0 -0
  62. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/pointcloud/__init__.py +0 -0
  63. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/pointcloud/clustering.py +0 -0
  64. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/pointcloud/pointcloud.py +0 -0
  65. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/pointcloud/projectors.py +0 -0
  66. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/pointcloud/umap_parameters.py +0 -0
  67. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/py.typed +0 -0
  68. {arize_phoenix-3.2.1/src/phoenix/experimental → arize_phoenix-3.4.0/phoenix/server}/__init__.py +0 -0
  69. {arize_phoenix-3.2.1/src/phoenix/server → arize_phoenix-3.4.0/phoenix/server/api}/__init__.py +0 -0
  70. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/context.py +0 -0
  71. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/helpers.py +0 -0
  72. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/input_types/ClusterInput.py +0 -0
  73. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/input_types/Coordinates.py +0 -0
  74. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/input_types/DataQualityMetricInput.py +0 -0
  75. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/input_types/DimensionFilter.py +0 -0
  76. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/input_types/DimensionInput.py +0 -0
  77. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/input_types/Granularity.py +0 -0
  78. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/input_types/PerformanceMetricInput.py +0 -0
  79. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/input_types/SpanSort.py +0 -0
  80. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/input_types/TimeRange.py +0 -0
  81. {arize_phoenix-3.2.1/src/phoenix/server/api → arize_phoenix-3.4.0/phoenix/server/api/input_types}/__init__.py +0 -0
  82. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/interceptor.py +0 -0
  83. {arize_phoenix-3.2.1/src/phoenix/server/api/input_types → arize_phoenix-3.4.0/phoenix/server/api/routers}/__init__.py +0 -0
  84. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/routers/evaluation_handler.py +0 -0
  85. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/routers/span_handler.py +0 -0
  86. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/routers/trace_handler.py +0 -0
  87. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/routers/utils.py +0 -0
  88. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/schema.py +0 -0
  89. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/Cluster.py +0 -0
  90. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/DataQualityMetric.py +0 -0
  91. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/Dataset.py +0 -0
  92. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/DatasetInfo.py +0 -0
  93. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/DatasetRole.py +0 -0
  94. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/DatasetValues.py +0 -0
  95. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/Dimension.py +0 -0
  96. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/DimensionDataType.py +0 -0
  97. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/DimensionShape.py +0 -0
  98. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/DimensionType.py +0 -0
  99. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/DimensionWithValue.py +0 -0
  100. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/DocumentEvaluationSummary.py +0 -0
  101. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/DocumentRetrievalMetrics.py +0 -0
  102. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/EmbeddingDimension.py +0 -0
  103. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/EmbeddingMetadata.py +0 -0
  104. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/Evaluation.py +0 -0
  105. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/EvaluationSummary.py +0 -0
  106. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/Event.py +0 -0
  107. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/EventMetadata.py +0 -0
  108. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/ExportEventsMutation.py +0 -0
  109. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/ExportedFile.py +0 -0
  110. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/Functionality.py +0 -0
  111. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/MimeType.py +0 -0
  112. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/Model.py +0 -0
  113. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/NumericRange.py +0 -0
  114. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/PerformanceMetric.py +0 -0
  115. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/PromptResponse.py +0 -0
  116. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/Retrieval.py +0 -0
  117. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/ScalarDriftMetricEnum.py +0 -0
  118. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/Segments.py +0 -0
  119. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/SortDir.py +0 -0
  120. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/TimeSeries.py +0 -0
  121. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/UMAPPoints.py +0 -0
  122. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/ValidationResult.py +0 -0
  123. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/VectorDriftMetricEnum.py +0 -0
  124. {arize_phoenix-3.2.1/src/phoenix/server/api/routers → arize_phoenix-3.4.0/phoenix/server/api/types}/__init__.py +0 -0
  125. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/node.py +0 -0
  126. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/api/types/pagination.py +0 -0
  127. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/app.py +0 -0
  128. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/main.py +0 -0
  129. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/static/apple-touch-icon-114x114.png +0 -0
  130. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/static/apple-touch-icon-120x120.png +0 -0
  131. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/static/apple-touch-icon-144x144.png +0 -0
  132. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/static/apple-touch-icon-152x152.png +0 -0
  133. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/static/apple-touch-icon-180x180.png +0 -0
  134. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/static/apple-touch-icon-72x72.png +0 -0
  135. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/static/apple-touch-icon-76x76.png +0 -0
  136. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/static/apple-touch-icon.png +0 -0
  137. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/static/favicon.ico +0 -0
  138. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/static/index.css +0 -0
  139. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/static/modernizr.js +0 -0
  140. {arize_phoenix-3.2.1/src/phoenix/server/api/types → arize_phoenix-3.4.0/phoenix/server/templates}/__init__.py +0 -0
  141. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/templates/index.html +0 -0
  142. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/server/thread_server.py +0 -0
  143. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/services.py +0 -0
  144. {arize_phoenix-3.2.1/src/phoenix/server/templates → arize_phoenix-3.4.0/phoenix/session}/__init__.py +0 -0
  145. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/session/client.py +0 -0
  146. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/session/data_extractor.py +0 -0
  147. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/session/evaluation.py +0 -0
  148. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/session/session.py +0 -0
  149. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/__init__.py +0 -0
  150. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/dsl/__init__.py +0 -0
  151. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/dsl/filter.py +0 -0
  152. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/dsl/helpers.py +0 -0
  153. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/dsl/missing.py +0 -0
  154. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/dsl/query.py +0 -0
  155. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/errors.py +0 -0
  156. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/evaluation_conventions.py +0 -0
  157. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/exporter.py +0 -0
  158. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/fixtures.py +0 -0
  159. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/langchain/__init__.py +0 -0
  160. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/langchain/instrumentor.py +0 -0
  161. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/langchain/tracer.py +0 -0
  162. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/llama_index/__init__.py +0 -0
  163. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/llama_index/callback.py +0 -0
  164. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/openai/__init__.py +0 -0
  165. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/openai/instrumentor.py +0 -0
  166. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/otel.py +0 -0
  167. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/schemas.py +0 -0
  168. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/span_evaluations.py +0 -0
  169. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/span_json_decoder.py +0 -0
  170. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/span_json_encoder.py +0 -0
  171. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/trace_dataset.py +0 -0
  172. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/tracer.py +0 -0
  173. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/utils.py +0 -0
  174. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/v1/__init__.py +0 -0
  175. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/v1/evaluation_pb2.py +0 -0
  176. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/trace/v1/evaluation_pb2.pyi +0 -0
  177. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/utilities/__init__.py +0 -0
  178. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/utilities/error_handling.py +0 -0
  179. {arize_phoenix-3.2.1/src → arize_phoenix-3.4.0}/phoenix/utilities/logging.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: arize-phoenix
3
- Version: 3.2.1
3
+ Version: 3.4.0
4
4
  Summary: ML Observability in your notebook
5
5
  Project-URL: Documentation, https://docs.arize.com/phoenix/
6
6
  Project-URL: Issues, https://github.com/Arize-ai/phoenix/issues
@@ -61,6 +61,8 @@ Requires-Dist: pytest-lazy-fixture; extra == 'dev'
61
61
  Requires-Dist: pytest==7.4.4; extra == 'dev'
62
62
  Requires-Dist: ruff==0.1.5; extra == 'dev'
63
63
  Requires-Dist: strawberry-graphql[debug-server]==0.208.2; extra == 'dev'
64
+ Provides-Extra: evals
65
+ Requires-Dist: arize-phoenix-evals>=0.0.3; extra == 'evals'
64
66
  Provides-Extra: experimental
65
67
  Requires-Dist: tenacity; extra == 'experimental'
66
68
  Provides-Extra: llama-index
@@ -303,12 +305,12 @@ df = download_benchmark_dataset(
303
305
  df = df.sample(100)
304
306
  df = df.rename(
305
307
  columns={
306
- "query_text": "query",
308
+ "query_text": "input",
307
309
  "document_text": "reference",
308
310
  },
309
311
  )
310
312
  model = OpenAIModel(
311
- model_name="gpt-4",
313
+ model="gpt-4",
312
314
  temperature=0.0,
313
315
  )
314
316
  rails =list(RAG_RELEVANCY_PROMPT_RAILS_MAP.values())
@@ -232,12 +232,12 @@ df = download_benchmark_dataset(
232
232
  df = df.sample(100)
233
233
  df = df.rename(
234
234
  columns={
235
- "query_text": "query",
235
+ "query_text": "input",
236
236
  "document_text": "reference",
237
237
  },
238
238
  )
239
239
  model = OpenAIModel(
240
- model_name="gpt-4",
240
+ model="gpt-4",
241
241
  temperature=0.0,
242
242
  )
243
243
  rails =list(RAG_RELEVANCY_PROMPT_RAILS_MAP.values())
@@ -1,3 +1,9 @@
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
+
1
7
  from .datasets.dataset import Dataset
2
8
  from .datasets.fixtures import ExampleDatasets, load_example
3
9
  from .datasets.schema import EmbeddingColumnNames, RetrievalEmbeddingColumnNames, Schema
@@ -41,4 +47,26 @@ __all__ = [
41
47
  "NotebookEnvironment",
42
48
  "log_evaluations",
43
49
  "Client",
50
+ "evals",
44
51
  ]
52
+
53
+
54
+ class PhoenixEvalsFinder(MetaPathFinder):
55
+ def find_spec(self, fullname: Any, path: Any, target: Any = None) -> Optional[ModuleSpec]:
56
+ if fullname == "phoenix.evals":
57
+ return ModuleSpec(fullname, PhoenixEvalsLoader())
58
+ return None
59
+
60
+
61
+ class PhoenixEvalsLoader(Loader):
62
+ def create_module(self, spec: ModuleSpec) -> None:
63
+ return None
64
+
65
+ def exec_module(self, module: ModuleType) -> None:
66
+ raise ImportError(
67
+ "The optional `phoenix.evals` package is not installed. "
68
+ "Please install `phoenix` with the `evals` extra: `pip install 'arize-phoenix[evals]'`."
69
+ )
70
+
71
+
72
+ sys.meta_path.append(PhoenixEvalsFinder())
@@ -3,14 +3,13 @@ from collections import defaultdict
3
3
  from datetime import datetime, timezone
4
4
  from queue import SimpleQueue
5
5
  from threading import RLock, Thread
6
- from types import MethodType
6
+ from types import MappingProxyType, MethodType
7
7
  from typing import (
8
8
  Any,
9
9
  DefaultDict,
10
10
  Dict,
11
11
  Iterable,
12
12
  Iterator,
13
- List,
14
13
  Optional,
15
14
  Set,
16
15
  SupportsFloat,
@@ -72,6 +71,10 @@ class ReadableSpan(ObjectProxy): # type: ignore
72
71
  @property
73
72
  def span(self) -> Span:
74
73
  span = decode(self._self_otlp_span)
74
+ # FIXME: Our legacy files have the __computed__ attributes which interferes
75
+ # with our ability to add more computations. As a workaround, we discard the computed
76
+ # attribute if it exists.
77
+ span.attributes.pop(COMPUTED_PREFIX[:-1], None)
75
78
  span.attributes.update(
76
79
  cast(phoenix.trace.schemas.SpanAttributes, self._self_computed_values)
77
80
  )
@@ -95,6 +98,12 @@ class ReadableSpan(ObjectProxy): # type: ignore
95
98
  raise KeyError(f"{key} is not a computed value")
96
99
  self._self_computed_values[key] = value
97
100
 
101
+ def __eq__(self, other: Any) -> bool:
102
+ return self is other
103
+
104
+ def __hash__(self) -> int:
105
+ return id(self)
106
+
98
107
 
99
108
  ParentSpanID: TypeAlias = SpanID
100
109
  ChildSpanID: TypeAlias = SpanID
@@ -108,22 +117,19 @@ class Traces:
108
117
  self._lock = RLock()
109
118
  self._spans: Dict[SpanID, ReadableSpan] = {}
110
119
  self._parent_span_ids: Dict[SpanID, ParentSpanID] = {}
111
- self._traces: DefaultDict[TraceID, List[SpanID]] = defaultdict(list)
112
- self._child_span_ids: DefaultDict[SpanID, Set[ChildSpanID]] = defaultdict(set)
113
- self._orphan_spans: DefaultDict[ParentSpanID, List[otlp.Span]] = defaultdict(list)
120
+ self._traces: DefaultDict[TraceID, Set[ReadableSpan]] = defaultdict(set)
121
+ self._child_spans: DefaultDict[SpanID, Set[ReadableSpan]] = defaultdict(set)
114
122
  self._num_documents: DefaultDict[SpanID, int] = defaultdict(int)
115
- self._start_time_sorted_span_ids: SortedKeyList[SpanID] = SortedKeyList(
116
- key=lambda span_id: self._spans[span_id].start_time,
123
+ self._start_time_sorted_spans: SortedKeyList[ReadableSpan] = SortedKeyList(
124
+ key=lambda span: span.start_time,
117
125
  )
118
- self._start_time_sorted_root_span_ids: SortedKeyList[SpanID] = SortedKeyList(
119
- key=lambda span_id: self._spans[span_id].start_time,
126
+ self._start_time_sorted_root_spans: SortedKeyList[ReadableSpan] = SortedKeyList(
127
+ key=lambda span: span.start_time,
120
128
  )
121
- self._latency_sorted_root_span_ids: SortedKeyList[SpanID] = SortedKeyList(
122
- key=lambda span_id: self._spans[span_id][ComputedAttributes.LATENCY_MS.value],
129
+ self._latency_sorted_root_spans: SortedKeyList[ReadableSpan] = SortedKeyList(
130
+ key=lambda span: span[ComputedAttributes.LATENCY_MS.value],
123
131
  )
124
132
  self._root_span_latency_ms_sketch = DDSketch()
125
- self._min_start_time: Optional[datetime] = None
126
- self._max_start_time: Optional[datetime] = None
127
133
  self._token_count_total: int = 0
128
134
  self._last_updated_at: Optional[datetime] = None
129
135
  self._start_consumer()
@@ -136,10 +142,9 @@ class Traces:
136
142
  # make a copy because source data can mutate during iteration
137
143
  if not (trace := self._traces.get(trace_id)):
138
144
  return
139
- span_ids = tuple(trace)
140
- for span_id in span_ids:
141
- if span := self[span_id]:
142
- yield span
145
+ spans = tuple(trace)
146
+ for span in spans:
147
+ yield span.span
143
148
 
144
149
  def get_spans(
145
150
  self,
@@ -157,32 +162,34 @@ class Traces:
157
162
  start_time = start_time or min_start_time
158
163
  stop_time = stop_time or max_stop_time
159
164
  if span_ids is not None:
160
- for span_id in span_ids:
161
- if (
162
- (span := self[span_id])
163
- and start_time <= span.start_time < stop_time
164
- and (not root_spans_only or span.parent_id is None)
165
- ):
166
- yield span
167
- return
168
- sorted_span_ids = (
169
- self._start_time_sorted_root_span_ids
170
- if root_spans_only
171
- else self._start_time_sorted_span_ids
172
- )
173
- with self._lock:
174
- # make a copy because source data can mutate during iteration
175
- span_ids = tuple(
176
- sorted_span_ids.irange_key(
177
- start_time.astimezone(timezone.utc),
178
- stop_time.astimezone(timezone.utc),
179
- inclusive=(True, False),
180
- reverse=True, # most recent spans first
165
+ with self._lock:
166
+ spans = tuple(
167
+ span
168
+ for span_id in span_ids
169
+ if (
170
+ (span := self._spans.get(span_id))
171
+ and start_time <= span.start_time < stop_time
172
+ and (not root_spans_only or span.parent_id is None)
173
+ )
181
174
  )
175
+ else:
176
+ sorted_spans = (
177
+ self._start_time_sorted_root_spans
178
+ if root_spans_only
179
+ else self._start_time_sorted_spans
182
180
  )
183
- for span_id in span_ids:
184
- if span := self[span_id]:
185
- yield span
181
+ # make a copy because source data can mutate during iteration
182
+ with self._lock:
183
+ spans = tuple(
184
+ sorted_spans.irange_key(
185
+ start_time.astimezone(timezone.utc),
186
+ stop_time.astimezone(timezone.utc),
187
+ inclusive=(True, False),
188
+ reverse=True, # most recent spans first
189
+ )
190
+ )
191
+ for span in spans:
192
+ yield span.span
186
193
 
187
194
  def get_num_documents(self, span_id: SpanID) -> int:
188
195
  with self._lock:
@@ -194,11 +201,11 @@ class Traces:
194
201
  latency value as percent of the total count of root spans. E.g., for
195
202
  a latency value at the 75th percentile, the result is roughly 75.
196
203
  """
197
- root_span_ids = self._latency_sorted_root_span_ids
198
- if not (n := len(root_span_ids)):
204
+ root_spans = self._latency_sorted_root_spans
205
+ if not (n := len(root_spans)):
199
206
  return None
200
207
  with self._lock:
201
- rank = cast(int, root_span_ids.bisect_key_left(latency_ms))
208
+ rank = cast(int, root_spans.bisect_key_left(latency_ms))
202
209
  return rank / n * 100
203
210
 
204
211
  def root_span_latency_ms_quantiles(self, *probabilities: float) -> Iterator[Optional[float]]:
@@ -210,15 +217,19 @@ class Traces:
210
217
  )
211
218
  yield from values
212
219
 
213
- def get_descendant_span_ids(self, span_id: SpanID) -> Iterator[SpanID]:
220
+ def get_descendant_spans(self, span_id: SpanID) -> Iterator[Span]:
221
+ for span in self._get_descendant_spans(span_id):
222
+ yield span.span
223
+
224
+ def _get_descendant_spans(self, span_id: SpanID) -> Iterator[ReadableSpan]:
214
225
  with self._lock:
215
226
  # make a copy because source data can mutate during iteration
216
- if not (child_span_ids := self._child_span_ids.get(span_id)):
227
+ if not (child_spans := self._child_spans.get(span_id)):
217
228
  return
218
- span_ids = tuple(child_span_ids)
219
- for child_span_id in span_ids:
220
- yield child_span_id
221
- yield from self.get_descendant_span_ids(child_span_id)
229
+ spans = tuple(child_spans)
230
+ for child_span in spans:
231
+ yield child_span
232
+ yield from self._get_descendant_spans(child_span.context.span_id)
222
233
 
223
234
  @property
224
235
  def last_updated_at(self) -> Optional[datetime]:
@@ -226,7 +237,7 @@ class Traces:
226
237
 
227
238
  @property
228
239
  def span_count(self) -> int:
229
- """Total number of spans (excluding orphan spans if any)"""
240
+ """Total number of spans"""
230
241
  return len(self._spans)
231
242
 
232
243
  @property
@@ -235,7 +246,14 @@ class Traces:
235
246
 
236
247
  @property
237
248
  def right_open_time_range(self) -> Tuple[Optional[datetime], Optional[datetime]]:
238
- return right_open_time_range(self._min_start_time, self._max_start_time)
249
+ if not self._start_time_sorted_spans:
250
+ return None, None
251
+ with self._lock:
252
+ first_span = self._start_time_sorted_spans[0]
253
+ last_span = self._start_time_sorted_spans[-1]
254
+ min_start_time = first_span.start_time
255
+ max_start_time = last_span.start_time
256
+ return right_open_time_range(min_start_time, max_start_time)
239
257
 
240
258
  def __getitem__(self, span_id: SpanID) -> Optional[Span]:
241
259
  with self._lock:
@@ -257,97 +275,67 @@ class Traces:
257
275
  with self._lock:
258
276
  self._process_span(item)
259
277
 
260
- def _process_span(self, span: otlp.Span) -> None:
261
- new_span = ReadableSpan(span)
262
- span_id = new_span.context.span_id
263
- existing_span = self._spans.get(span_id)
264
- if existing_span and existing_span.end_time:
265
- # Reject updates if span has ended.
278
+ def _process_span(self, otlp_span: otlp.Span) -> None:
279
+ span = ReadableSpan(otlp_span)
280
+ span_id = span.context.span_id
281
+ if span_id in self._spans:
282
+ # Update is not allowed.
266
283
  return
267
- is_root_span = not new_span.parent_id
284
+
285
+ parent_span_id = span.parent_id
286
+ is_root_span = parent_span_id is None
268
287
  if not is_root_span:
269
- parent_span_id = new_span.parent_id
270
- if parent_span_id not in self._spans:
271
- # Span can't be processed before its parent.
272
- self._orphan_spans[parent_span_id].append(span)
273
- return
274
- self._child_span_ids[parent_span_id].add(span_id)
288
+ self._child_spans[parent_span_id].add(span)
275
289
  self._parent_span_ids[span_id] = parent_span_id
276
- start_time = new_span.start_time
277
- end_time = new_span.end_time
278
- if end_time:
279
- new_span[ComputedAttributes.LATENCY_MS.value] = latency = (
280
- end_time - start_time
281
- ).total_seconds() * 1000
282
- if is_root_span:
283
- self._root_span_latency_ms_sketch.add(latency)
284
- self._spans[span_id] = new_span
285
- if is_root_span and end_time:
286
- self._latency_sorted_root_span_ids.add(span_id)
287
- if not existing_span:
288
- trace_id = new_span.context.trace_id
289
- self._traces[trace_id].append(span_id)
290
- if is_root_span:
291
- self._start_time_sorted_root_span_ids.add(span_id)
292
- self._start_time_sorted_span_ids.add(span_id)
293
- self._min_start_time = (
294
- start_time
295
- if self._min_start_time is None
296
- else min(self._min_start_time, start_time)
297
- )
298
- self._max_start_time = (
299
- start_time
300
- if self._max_start_time is None
301
- else max(self._max_start_time, start_time)
302
- )
303
- new_span[ComputedAttributes.ERROR_COUNT.value] = int(
304
- new_span.status_code is SpanStatusCode.ERROR
305
- )
306
- # Update cumulative values for span's ancestors.
307
- for attribute_name, cumulative_attribute_name in (
308
- (LLM_TOKEN_COUNT_TOTAL, ComputedAttributes.CUMULATIVE_LLM_TOKEN_COUNT_TOTAL.value),
309
- (LLM_TOKEN_COUNT_PROMPT, ComputedAttributes.CUMULATIVE_LLM_TOKEN_COUNT_PROMPT.value),
310
- (
311
- LLM_TOKEN_COUNT_COMPLETION,
312
- ComputedAttributes.CUMULATIVE_LLM_TOKEN_COUNT_COMPLETION.value,
313
- ),
314
- (
315
- ComputedAttributes.ERROR_COUNT.value,
316
- ComputedAttributes.CUMULATIVE_ERROR_COUNT.value,
317
- ),
290
+
291
+ # Add computed attributes to span
292
+ start_time = span.start_time
293
+ end_time = span.end_time
294
+ span[ComputedAttributes.LATENCY_MS.value] = latency = (
295
+ end_time - start_time
296
+ ).total_seconds() * 1000
297
+ if is_root_span:
298
+ self._root_span_latency_ms_sketch.add(latency)
299
+ span[ComputedAttributes.ERROR_COUNT.value] = int(span.status_code is SpanStatusCode.ERROR)
300
+
301
+ # Store the new span (after adding computed attributes)
302
+ self._spans[span_id] = span
303
+ self._traces[span.context.trace_id].add(span)
304
+ self._start_time_sorted_spans.add(span)
305
+ if is_root_span:
306
+ self._start_time_sorted_root_spans.add(span)
307
+ self._latency_sorted_root_spans.add(span)
308
+ self._propagate_cumulative_values(span)
309
+ self._update_cached_statistics(span)
310
+
311
+ # Update last updated timestamp, letting users know
312
+ # when they should refresh the page.
313
+ self._last_updated_at = datetime.now(timezone.utc)
314
+
315
+ def _update_cached_statistics(self, span: ReadableSpan) -> None:
316
+ # Update statistics for quick access later
317
+ span_id = span.context.span_id
318
+ if token_count_update := span.attributes.get(SpanAttributes.LLM_TOKEN_COUNT_TOTAL):
319
+ self._token_count_total += token_count_update
320
+ if num_documents_update := len(
321
+ span.attributes.get(SpanAttributes.RETRIEVAL_DOCUMENTS) or ()
318
322
  ):
319
- existing_value = (existing_span[attribute_name] or 0) if existing_span else 0
320
- new_value = new_span[attribute_name] or 0
321
- if not (difference := new_value - existing_value):
322
- continue
323
- existing_cumulative_value = (
324
- (existing_span[cumulative_attribute_name] or 0) if existing_span else 0
325
- )
326
- new_span[cumulative_attribute_name] = difference + existing_cumulative_value
327
- self._add_value_to_span_ancestors(
328
- span_id,
329
- cumulative_attribute_name,
330
- difference,
331
- )
332
- # Update token count total
333
- if existing_span:
334
- self._token_count_total -= existing_span[LLM_TOKEN_COUNT_TOTAL] or 0
335
- self._token_count_total += new_span[LLM_TOKEN_COUNT_TOTAL] or 0
336
- # Update number of documents
337
- num_documents_update = len(
338
- new_span.attributes.get(SpanAttributes.RETRIEVAL_DOCUMENTS) or ()
339
- )
340
- if existing_span:
341
- num_documents_update -= len(
342
- existing_span.attributes.get(SpanAttributes.RETRIEVAL_DOCUMENTS) or ()
343
- )
344
- if num_documents_update:
345
323
  self._num_documents[span_id] += num_documents_update
346
- # Process previously orphaned spans, if any.
347
- for orphan_span in self._orphan_spans.pop(span_id, ()):
348
- self._process_span(orphan_span)
349
- # Update last updated timestamp
350
- self._last_updated_at = datetime.now(timezone.utc)
324
+
325
+ def _propagate_cumulative_values(self, span: ReadableSpan) -> None:
326
+ child_spans: Iterable[ReadableSpan] = self._child_spans.get(span.context.span_id) or ()
327
+ for cumulative_attribute, attribute in _CUMULATIVE_ATTRIBUTES.items():
328
+ span[cumulative_attribute] = span[attribute] or 0
329
+ for child_span in child_spans:
330
+ span[cumulative_attribute] += child_span[cumulative_attribute] or 0
331
+ self._update_ancestors(span)
332
+
333
+ def _update_ancestors(self, span: ReadableSpan) -> None:
334
+ # Add cumulative values to each of the span's ancestors.
335
+ span_id = span.context.span_id
336
+ for attribute in _CUMULATIVE_ATTRIBUTES.keys():
337
+ value = span[attribute] or 0
338
+ self._add_value_to_span_ancestors(span_id, attribute, value)
351
339
 
352
340
  def _add_value_to_span_ancestors(
353
341
  self,
@@ -356,7 +344,18 @@ class Traces:
356
344
  value: float,
357
345
  ) -> None:
358
346
  while parent_span_id := self._parent_span_ids.get(span_id):
359
- parent_span = self._spans[parent_span_id]
347
+ if not (parent_span := self._spans.get(parent_span_id)):
348
+ return
360
349
  cumulative_value = parent_span[attribute_name] or 0
361
350
  parent_span[attribute_name] = cumulative_value + value
362
351
  span_id = parent_span_id
352
+
353
+
354
+ _CUMULATIVE_ATTRIBUTES = MappingProxyType(
355
+ {
356
+ ComputedAttributes.CUMULATIVE_LLM_TOKEN_COUNT_TOTAL.value: LLM_TOKEN_COUNT_TOTAL,
357
+ ComputedAttributes.CUMULATIVE_LLM_TOKEN_COUNT_PROMPT.value: LLM_TOKEN_COUNT_PROMPT,
358
+ ComputedAttributes.CUMULATIVE_LLM_TOKEN_COUNT_COMPLETION.value: LLM_TOKEN_COUNT_COMPLETION,
359
+ ComputedAttributes.CUMULATIVE_ERROR_COUNT.value: ComputedAttributes.ERROR_COUNT.value,
360
+ }
361
+ )
@@ -95,6 +95,7 @@ class SpanEvent:
95
95
  class Span:
96
96
  name: str
97
97
  status_code: SpanStatusCode
98
+ status_message: str
98
99
  start_time: datetime
99
100
  end_time: Optional[datetime]
100
101
  latency_ms: Optional[float]
@@ -212,10 +213,7 @@ class Span:
212
213
  if (traces := info.context.traces) is None:
213
214
  return []
214
215
  return [
215
- to_gql_span(cast(trace_schema.Span, traces[span_id]))
216
- for span_id in traces.get_descendant_span_ids(
217
- cast(SpanID, self.context.span_id),
218
- )
216
+ to_gql_span(span) for span in traces.get_descendant_spans(SpanID(self.context.span_id))
219
217
  ]
220
218
 
221
219
 
@@ -228,6 +226,7 @@ def to_gql_span(span: trace_schema.Span) -> "Span":
228
226
  return Span(
229
227
  name=span.name,
230
228
  status_code=SpanStatusCode(span.status_code),
229
+ status_message=span.status_message,
231
230
  parent_id=cast(Optional[ID], span.parent_id),
232
231
  span_kind=SpanKind(span.span_kind),
233
232
  start_time=span.start_time,