arize-phoenix 2.1.0__tar.gz → 2.2.0rc0__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 (173) hide show
  1. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/PKG-INFO +3 -1
  2. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/pyproject.toml +4 -2
  3. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/__init__.py +2 -2
  4. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/evals/functions/executor.py +1 -0
  5. arize_phoenix-2.2.0rc0/src/phoenix/experimental/evals/models/anthropic.py +171 -0
  6. arize_phoenix-2.2.0rc0/src/phoenix/experimental/evals/models/vertex.py +155 -0
  7. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/otel.py +3 -3
  8. arize_phoenix-2.2.0rc0/src/phoenix/version.py +1 -0
  9. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/.gitignore +0 -0
  10. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/IP_NOTICE +0 -0
  11. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/LICENSE +0 -0
  12. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/README.md +0 -0
  13. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/config.py +0 -0
  14. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/core/__init__.py +0 -0
  15. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/core/embedding_dimension.py +0 -0
  16. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/core/evals.py +0 -0
  17. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/core/model.py +0 -0
  18. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/core/model_schema.py +0 -0
  19. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/core/model_schema_adapter.py +0 -0
  20. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/core/traces.py +0 -0
  21. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/datasets/__init__.py +0 -0
  22. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/datasets/dataset.py +0 -0
  23. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/datasets/errors.py +0 -0
  24. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/datasets/fixtures.py +0 -0
  25. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/datasets/schema.py +0 -0
  26. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/datasets/validation.py +0 -0
  27. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/datetime_utils.py +0 -0
  28. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/exceptions.py +0 -0
  29. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/__init__.py +0 -0
  30. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/evals/__init__.py +0 -0
  31. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/evals/evaluators.py +0 -0
  32. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/evals/functions/__init__.py +0 -0
  33. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/evals/functions/classify.py +0 -0
  34. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/evals/functions/generate.py +0 -0
  35. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/evals/functions/processing.py +0 -0
  36. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/evals/models/__init__.py +0 -0
  37. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/evals/models/base.py +0 -0
  38. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/evals/models/bedrock.py +0 -0
  39. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/evals/models/litellm.py +0 -0
  40. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/evals/models/openai.py +0 -0
  41. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/evals/models/rate_limiters.py +0 -0
  42. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/evals/models/vertexai.py +0 -0
  43. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/evals/retrievals.py +0 -0
  44. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/evals/templates/__init__.py +0 -0
  45. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/evals/templates/default_templates.py +0 -0
  46. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/evals/templates/template.py +0 -0
  47. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/evals/utils/__init__.py +0 -0
  48. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/experimental/evals/utils/threads.py +0 -0
  49. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/metrics/README.md +0 -0
  50. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/metrics/__init__.py +0 -0
  51. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/metrics/binning.py +0 -0
  52. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/metrics/metrics.py +0 -0
  53. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/metrics/mixins.py +0 -0
  54. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/metrics/retrieval_metrics.py +0 -0
  55. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/metrics/timeseries.py +0 -0
  56. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/metrics/wrappers.py +0 -0
  57. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/pointcloud/__init__.py +0 -0
  58. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/pointcloud/clustering.py +0 -0
  59. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/pointcloud/pointcloud.py +0 -0
  60. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/pointcloud/projectors.py +0 -0
  61. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/pointcloud/umap_parameters.py +0 -0
  62. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/py.typed +0 -0
  63. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/__init__.py +0 -0
  64. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/__init__.py +0 -0
  65. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/context.py +0 -0
  66. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/helpers.py +0 -0
  67. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/input_types/ClusterInput.py +0 -0
  68. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/input_types/Coordinates.py +0 -0
  69. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/input_types/DataQualityMetricInput.py +0 -0
  70. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/input_types/DimensionFilter.py +0 -0
  71. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/input_types/DimensionInput.py +0 -0
  72. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/input_types/Granularity.py +0 -0
  73. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/input_types/PerformanceMetricInput.py +0 -0
  74. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/input_types/SpanSort.py +0 -0
  75. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/input_types/TimeRange.py +0 -0
  76. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/input_types/__init__.py +0 -0
  77. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/interceptor.py +0 -0
  78. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/schema.py +0 -0
  79. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/Cluster.py +0 -0
  80. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/DataQualityMetric.py +0 -0
  81. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/Dataset.py +0 -0
  82. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/DatasetInfo.py +0 -0
  83. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/DatasetRole.py +0 -0
  84. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/DatasetValues.py +0 -0
  85. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/Dimension.py +0 -0
  86. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/DimensionDataType.py +0 -0
  87. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/DimensionShape.py +0 -0
  88. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/DimensionType.py +0 -0
  89. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/DimensionWithValue.py +0 -0
  90. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/DocumentEvaluationSummary.py +0 -0
  91. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/DocumentRetrievalMetrics.py +0 -0
  92. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/EmbeddingDimension.py +0 -0
  93. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/EmbeddingMetadata.py +0 -0
  94. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/Evaluation.py +0 -0
  95. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/EvaluationSummary.py +0 -0
  96. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/Event.py +0 -0
  97. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/EventMetadata.py +0 -0
  98. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/ExportEventsMutation.py +0 -0
  99. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/ExportedFile.py +0 -0
  100. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/Functionality.py +0 -0
  101. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/MimeType.py +0 -0
  102. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/Model.py +0 -0
  103. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/NumericRange.py +0 -0
  104. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/PerformanceMetric.py +0 -0
  105. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/PromptResponse.py +0 -0
  106. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/Retrieval.py +0 -0
  107. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/ScalarDriftMetricEnum.py +0 -0
  108. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/Segments.py +0 -0
  109. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/SortDir.py +0 -0
  110. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/Span.py +0 -0
  111. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/TimeSeries.py +0 -0
  112. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/UMAPPoints.py +0 -0
  113. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/ValidationResult.py +0 -0
  114. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/VectorDriftMetricEnum.py +0 -0
  115. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/__init__.py +0 -0
  116. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/node.py +0 -0
  117. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/api/types/pagination.py +0 -0
  118. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/app.py +0 -0
  119. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/evaluation_handler.py +0 -0
  120. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/main.py +0 -0
  121. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/span_handler.py +0 -0
  122. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/static/apple-touch-icon-114x114.png +0 -0
  123. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/static/apple-touch-icon-120x120.png +0 -0
  124. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/static/apple-touch-icon-144x144.png +0 -0
  125. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/static/apple-touch-icon-152x152.png +0 -0
  126. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/static/apple-touch-icon-180x180.png +0 -0
  127. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/static/apple-touch-icon-72x72.png +0 -0
  128. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/static/apple-touch-icon-76x76.png +0 -0
  129. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/static/apple-touch-icon.png +0 -0
  130. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/static/favicon.ico +0 -0
  131. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/static/index.css +0 -0
  132. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/static/index.js +0 -0
  133. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/static/modernizr.js +0 -0
  134. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/templates/__init__.py +0 -0
  135. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/templates/index.html +0 -0
  136. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/thread_server.py +0 -0
  137. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/server/trace_handler.py +0 -0
  138. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/services.py +0 -0
  139. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/session/__init__.py +0 -0
  140. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/session/evaluation.py +0 -0
  141. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/session/session.py +0 -0
  142. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/__init__.py +0 -0
  143. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/dsl/__init__.py +0 -0
  144. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/dsl/filter.py +0 -0
  145. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/dsl/helpers.py +0 -0
  146. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/dsl/missing.py +0 -0
  147. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/dsl/query.py +0 -0
  148. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/evaluation_conventions.py +0 -0
  149. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/exporter.py +0 -0
  150. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/fixtures.py +0 -0
  151. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/langchain/__init__.py +0 -0
  152. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/langchain/instrumentor.py +0 -0
  153. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/langchain/tracer.py +0 -0
  154. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/llama_index/__init__.py +0 -0
  155. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/llama_index/callback.py +0 -0
  156. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/llama_index/debug_callback.py +0 -0
  157. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/llama_index/streaming.py +0 -0
  158. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/openai/__init__.py +0 -0
  159. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/openai/instrumentor.py +0 -0
  160. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/schemas.py +0 -0
  161. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/semantic_conventions.py +0 -0
  162. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/span_evaluations.py +0 -0
  163. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/span_json_decoder.py +0 -0
  164. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/span_json_encoder.py +0 -0
  165. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/trace_dataset.py +0 -0
  166. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/tracer.py +0 -0
  167. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/utils.py +0 -0
  168. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/v1/__init__.py +0 -0
  169. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/v1/evaluation_pb2.py +0 -0
  170. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/trace/v1/evaluation_pb2.pyi +0 -0
  171. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/utilities/__init__.py +0 -0
  172. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/utilities/error_handling.py +0 -0
  173. {arize_phoenix-2.1.0 → arize_phoenix-2.2.0rc0}/src/phoenix/utilities/logging.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: arize-phoenix
3
- Version: 2.1.0
3
+ Version: 2.2.0rc0
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
@@ -38,8 +38,10 @@ Requires-Dist: umap-learn
38
38
  Requires-Dist: uvicorn
39
39
  Requires-Dist: wrapt
40
40
  Provides-Extra: dev
41
+ Requires-Dist: anthropic; extra == 'dev'
41
42
  Requires-Dist: arize[autoembeddings,llm-evaluation]; extra == 'dev'
42
43
  Requires-Dist: gcsfs; extra == 'dev'
44
+ Requires-Dist: google-cloud-aiplatform>=1.3; extra == 'dev'
43
45
  Requires-Dist: hatch; extra == 'dev'
44
46
  Requires-Dist: jupyter; extra == 'dev'
45
47
  Requires-Dist: langchain>=0.0.334; extra == 'dev'
@@ -62,7 +62,9 @@ dev = [
62
62
  "arize[AutoEmbeddings, LLM_Evaluation]",
63
63
  "llama-index>=0.9.14",
64
64
  "langchain>=0.0.334",
65
- "litellm>=1.0.3"
65
+ "litellm>=1.0.3",
66
+ "google-cloud-aiplatform>=1.3",
67
+ "anthropic",
66
68
  ]
67
69
  experimental = [
68
70
  "tenacity",
@@ -77,7 +79,7 @@ Issues = "https://github.com/Arize-ai/phoenix/issues"
77
79
  Source = "https://github.com/Arize-ai/phoenix"
78
80
 
79
81
  [tool.hatch.version]
80
- path = "src/phoenix/__init__.py"
82
+ path = "src/phoenix/version.py"
81
83
 
82
84
  [build-system]
83
85
  requires = ["hatchling"]
@@ -5,8 +5,7 @@ from .session.evaluation import log_evaluations
5
5
  from .session.session import NotebookEnvironment, Session, active_session, close_app, launch_app
6
6
  from .trace.fixtures import load_example_traces
7
7
  from .trace.trace_dataset import TraceDataset
8
-
9
- __version__ = "2.1.0"
8
+ from .version import __version__
10
9
 
11
10
  # module level doc-string
12
11
  __doc__ = """
@@ -25,6 +24,7 @@ Here are just a few of the things that phoenix does well:
25
24
  """
26
25
 
27
26
  __all__ = [
27
+ "__version__",
28
28
  "Dataset",
29
29
  "EmbeddingColumnNames",
30
30
  "RetrievalEmbeddingColumnNames",
@@ -275,6 +275,7 @@ class SyncExecutor(Executor):
275
275
  result = self.generate(input)
276
276
  outputs[index] = result
277
277
  progress_bar.update()
278
+ break
278
279
  except Exception as exc:
279
280
  is_phoenix_exception = isinstance(exc, PhoenixException)
280
281
  if attempt >= self.max_retries or is_phoenix_exception:
@@ -0,0 +1,171 @@
1
+ import logging
2
+ from dataclasses import dataclass, field
3
+ from typing import TYPE_CHECKING, Any, Dict, List, Optional
4
+
5
+ from phoenix.experimental.evals.models.base import BaseEvalModel
6
+ from phoenix.experimental.evals.models.rate_limiters import RateLimiter
7
+
8
+ if TYPE_CHECKING:
9
+ from tiktoken import Encoding
10
+
11
+ logger = logging.getLogger(__name__)
12
+
13
+ MODEL_TOKEN_LIMIT_MAPPING = {
14
+ "claude-2.1": 200000,
15
+ "claude-2.0": 100000,
16
+ "claude-instant-1.2": 100000,
17
+ }
18
+
19
+
20
+ @dataclass
21
+ class AnthropicModel(BaseEvalModel):
22
+ model: str = "claude-2.1"
23
+ """The model name to use."""
24
+ temperature: float = 0.0
25
+ """What sampling temperature to use."""
26
+ max_tokens: int = 256
27
+ """The maximum number of tokens to generate in the completion."""
28
+ top_p: float = 1
29
+ """Total probability mass of tokens to consider at each step."""
30
+ top_k: int = 256
31
+ """The cutoff where the model no longer selects the words"""
32
+ stop_sequences: List[str] = field(default_factory=list)
33
+ """If the model encounters a stop sequence, it stops generating further tokens. """
34
+ max_retries: int = 6
35
+ """Maximum number of retries to make when generating."""
36
+ retry_min_seconds: int = 10
37
+ """Minimum number of seconds to wait when retrying."""
38
+ retry_max_seconds: int = 60
39
+ """Maximum number of seconds to wait when retrying."""
40
+ extra_parameters: Dict[str, Any] = field(default_factory=dict)
41
+ """Any extra parameters to add to the request body (e.g., countPenalty for a21 models)"""
42
+ max_content_size: Optional[int] = None
43
+ """If you're using a fine-tuned model, set this to the maximum content size"""
44
+
45
+ def __post_init__(self) -> None:
46
+ self._init_environment()
47
+ self._init_client()
48
+ self._init_tiktoken()
49
+ self._init_rate_limiter()
50
+ self.retry = self._retry(
51
+ error_types=[], # default to catching all errors
52
+ min_seconds=self.retry_min_seconds,
53
+ max_seconds=self.retry_max_seconds,
54
+ max_retries=self.max_retries,
55
+ )
56
+
57
+ def _init_environment(self) -> None:
58
+ try:
59
+ import tiktoken
60
+
61
+ self._tiktoken = tiktoken
62
+ except ImportError:
63
+ self._raise_import_error(
64
+ package_name="tiktoken",
65
+ )
66
+
67
+ def _init_client(self) -> None:
68
+ try:
69
+ import anthropic # type:ignore
70
+
71
+ self._anthropic = anthropic
72
+ self.client = self._anthropic.Anthropic()
73
+ self.async_client = self._anthropic.AsyncAnthropic()
74
+ except ImportError:
75
+ self._raise_import_error(
76
+ package_name="anthropic",
77
+ )
78
+
79
+ def _init_tiktoken(self) -> None:
80
+ try:
81
+ encoding = self._tiktoken.encoding_for_model(self.model)
82
+ except KeyError:
83
+ logger.warning("Warning: model not found. Using cl100k_base encoding.")
84
+ encoding = self._tiktoken.get_encoding("cl100k_base")
85
+ self._tiktoken_encoding = encoding
86
+
87
+ def _init_rate_limiter(self) -> None:
88
+ self._rate_limiter = RateLimiter(
89
+ rate_limit_error=self._anthropic.RateLimitError,
90
+ max_rate_limit_retries=10,
91
+ initial_per_second_request_rate=1,
92
+ maximum_per_second_request_rate=20,
93
+ enforcement_window_minutes=1,
94
+ )
95
+
96
+ def invocation_parameters(self) -> Dict[str, Any]:
97
+ return {
98
+ "max_tokens_to_sample": self.max_tokens,
99
+ "stop_sequences": self.stop_sequences,
100
+ "temperature": self.temperature,
101
+ "top_p": self.top_p,
102
+ "top_k": self.top_k,
103
+ }
104
+
105
+ @property
106
+ def encoder(self) -> "Encoding":
107
+ return self._tiktoken_encoding
108
+
109
+ def get_tokens_from_text(self, text: str) -> List[int]:
110
+ return self.encoder.encode(text)
111
+
112
+ def get_text_from_tokens(self, tokens: List[int]) -> str:
113
+ return self.encoder.decode(tokens)
114
+
115
+ @property
116
+ def max_context_size(self) -> int:
117
+ context_size = self.max_content_size or MODEL_TOKEN_LIMIT_MAPPING.get(self.model, None)
118
+
119
+ if context_size is None:
120
+ raise ValueError(
121
+ "Can't determine maximum context size. An unknown model name was "
122
+ + f"used: {self.model}. Please set the `max_content_size` argument"
123
+ + "when using fine-tuned models. "
124
+ )
125
+
126
+ return context_size
127
+
128
+ def _generate(self, prompt: str, **kwargs: Dict[str, Any]) -> str:
129
+ # instruction is an invalid input to Anthropic models, it is passed in by
130
+ # BaseEvalModel.__call__ and needs to be removed
131
+ kwargs.pop("instruction", None)
132
+ invocation_parameters = self.invocation_parameters()
133
+ invocation_parameters.update(kwargs)
134
+ response = self._generate_with_retry(
135
+ model=self.model,
136
+ prompt=self._format_prompt_for_claude(prompt),
137
+ **invocation_parameters,
138
+ )
139
+
140
+ return str(response)
141
+
142
+ def _generate_with_retry(self, **kwargs: Any) -> Any:
143
+ @self.retry
144
+ @self._rate_limiter.limit
145
+ def _completion_with_retry(**kwargs: Any) -> Any:
146
+ response = self.client.completions.create(**kwargs)
147
+ return response.completion
148
+
149
+ return _completion_with_retry(**kwargs)
150
+
151
+ async def _async_generate(self, prompt: str, **kwargs: Dict[str, Any]) -> str:
152
+ invocation_parameters = self.invocation_parameters()
153
+ invocation_parameters.update(kwargs)
154
+ response = await self._async_generate_with_retry(
155
+ model=self.model, prompt=self._format_prompt_for_claude(prompt), **invocation_parameters
156
+ )
157
+
158
+ return str(response)
159
+
160
+ async def _async_generate_with_retry(self, **kwargs: Any) -> Any:
161
+ @self.retry
162
+ @self._rate_limiter.alimit
163
+ async def _async_completion_with_retry(**kwargs: Any) -> Any:
164
+ response = await self.async_client.completions.create(**kwargs)
165
+ return response.completion
166
+
167
+ return await _async_completion_with_retry(**kwargs)
168
+
169
+ def _format_prompt_for_claude(self, prompt: str) -> str:
170
+ # Claude requires prompt in the format of Human: ... Assistant:
171
+ return f"{self._anthropic.HUMAN_PROMPT} {prompt} {self._anthropic.AI_PROMPT}"
@@ -0,0 +1,155 @@
1
+ import logging
2
+ from dataclasses import dataclass, field
3
+ from typing import TYPE_CHECKING, Any, Dict, List
4
+
5
+ from phoenix.experimental.evals.models.base import BaseEvalModel
6
+ from phoenix.experimental.evals.models.rate_limiters import RateLimiter
7
+
8
+ if TYPE_CHECKING:
9
+ from tiktoken import Encoding
10
+
11
+ logger = logging.getLogger(__name__)
12
+
13
+
14
+ # https://cloud.google.com/vertex-ai/docs/generative-ai/learn/models
15
+ MODEL_TOKEN_LIMIT_MAPPING = {
16
+ "gemini-pro": 32760,
17
+ "gemini-pro-vision": 16384,
18
+ }
19
+
20
+
21
+ @dataclass
22
+ class GeminiModel(BaseEvalModel):
23
+ model: str = "gemini-pro"
24
+ """The model name to use."""
25
+ temperature: float = 0.0
26
+ """What sampling temperature to use."""
27
+ max_tokens: int = 256
28
+ """The maximum number of tokens to generate in the completion."""
29
+ top_p: float = 1
30
+ """Total probability mass of tokens to consider at each step."""
31
+ top_k: int = 32
32
+ """The cutoff where the model no longer selects the words"""
33
+ stop_sequences: List[str] = field(default_factory=list)
34
+ """If the model encounters a stop sequence, it stops generating further tokens. """
35
+ max_retries: int = 6
36
+ """Maximum number of retries to make when generating."""
37
+ retry_min_seconds: int = 10
38
+ """Minimum number of seconds to wait when retrying."""
39
+ retry_max_seconds: int = 60
40
+ """Maximum number of seconds to wait when retrying."""
41
+
42
+ def __post_init__(self) -> None:
43
+ self._init_client()
44
+ self._init_rate_limiter()
45
+ self.retry = self._retry(
46
+ error_types=[], # default to catching all errors
47
+ min_seconds=self.retry_min_seconds,
48
+ max_seconds=self.retry_max_seconds,
49
+ max_retries=self.max_retries,
50
+ )
51
+
52
+ def _init_client(self) -> None:
53
+ try:
54
+ from google.api_core import exceptions # type:ignore
55
+ from vertexai.preview import generative_models as vertex # type:ignore
56
+
57
+ self._vertex = vertex
58
+ self._gcp_exceptions = exceptions
59
+ self._model = self._vertex.GenerativeModel(self.model)
60
+ except ImportError:
61
+ self._raise_import_error(
62
+ package_name="vertexai",
63
+ )
64
+
65
+ def _init_rate_limiter(self) -> None:
66
+ self._rate_limiter = RateLimiter(
67
+ rate_limit_error=self._gcp_exceptions.ResourceExhausted,
68
+ max_rate_limit_retries=10,
69
+ initial_per_second_request_rate=1,
70
+ maximum_per_second_request_rate=20,
71
+ enforcement_window_minutes=1,
72
+ )
73
+
74
+ @property
75
+ def encoder(self) -> "Encoding":
76
+ raise TypeError("Gemini models contain their own token counting")
77
+
78
+ def get_tokens_from_text(self, text: str) -> List[int]:
79
+ raise NotImplementedError
80
+
81
+ def get_text_from_tokens(self, tokens: List[int]) -> str:
82
+ raise NotImplementedError
83
+
84
+ @property
85
+ def max_context_size(self) -> int:
86
+ context_size = MODEL_TOKEN_LIMIT_MAPPING.get(self.model, None)
87
+
88
+ if context_size is None:
89
+ raise ValueError(
90
+ "Can't determine maximum context size. An unknown model name was "
91
+ + f"used: {self.model}. Please set the `max_content_size` argument"
92
+ + "when using fine-tuned models. "
93
+ )
94
+
95
+ return context_size
96
+
97
+ @property
98
+ def generation_config(self) -> Dict[str, Any]:
99
+ return {
100
+ "temperature": self.temperature,
101
+ "max_output_tokens": self.max_tokens,
102
+ "top_p": self.top_p,
103
+ "top_k": self.top_k,
104
+ "stop_sequences": self.stop_sequences,
105
+ }
106
+
107
+ def _generate(self, prompt: str, **kwargs: Dict[str, Any]) -> str:
108
+ # instruction is an invalid input to Gemini models, it is passed in by
109
+ # BaseEvalModel.__call__ and needs to be removed
110
+ kwargs.pop("instruction", None)
111
+ response = self._generate_with_retry(
112
+ prompt=prompt,
113
+ generation_config=self.generation_config,
114
+ **kwargs,
115
+ )
116
+
117
+ return str(response)
118
+
119
+ def _generate_with_retry(
120
+ self, prompt: str, generation_config: Dict[str, Any], **kwargs: Any
121
+ ) -> Any:
122
+ @self.retry
123
+ @self._rate_limiter.limit
124
+ def _completion_with_retry(**kwargs: Any) -> Any:
125
+ response = self._model.generate_content(
126
+ contents=prompt, generation_config=generation_config, **kwargs
127
+ )
128
+ candidate = response.candidates[0]
129
+ return candidate.text
130
+
131
+ return _completion_with_retry(**kwargs)
132
+
133
+ async def _async_generate(self, prompt: str, **kwargs: Dict[str, Any]) -> str:
134
+ kwargs.pop("instruction", None)
135
+ response = await self._async_generate_with_retry(
136
+ prompt=prompt,
137
+ generation_config=self.generation_config,
138
+ **kwargs,
139
+ )
140
+
141
+ return str(response)
142
+
143
+ async def _async_generate_with_retry(
144
+ self, prompt: str, generation_config: Dict[str, Any], **kwargs: Any
145
+ ) -> Any:
146
+ @self.retry
147
+ @self._rate_limiter.limit
148
+ async def _completion_with_retry(**kwargs: Any) -> Any:
149
+ response = await self._model.generate_content_async(
150
+ contents=prompt, generation_config=generation_config, **kwargs
151
+ )
152
+ candidate = response.candidates[0]
153
+ return candidate.text
154
+
155
+ return await _completion_with_retry(**kwargs)
@@ -396,11 +396,11 @@ def _encode_value(value: AttributeValue) -> AnyValue:
396
396
  return AnyValue(int_value=value)
397
397
  if isinstance(value, float):
398
398
  return AnyValue(double_value=value)
399
- if isinstance(value, Sequence):
400
- return AnyValue(array_value=ArrayValue(values=map(_encode_value, value)))
401
399
  if isinstance(value, bytes):
402
400
  return AnyValue(bytes_value=value)
403
- assert_never(value)
401
+ if isinstance(value, Sequence):
402
+ return AnyValue(array_value=ArrayValue(values=map(_encode_value, value)))
403
+ raise ValueError(f"Unexpected attribute value {value} with type {type(value)}.")
404
404
 
405
405
 
406
406
  __all__ = [
@@ -0,0 +1 @@
1
+ __version__ = "2.2.0rc0"
File without changes