arize-phoenix 4.22.0__tar.gz → 4.23.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.
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/PKG-INFO +1 -1
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/examples/manually-instrumented-chatbot/frontend/requirements.txt +1 -1
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/experiments/functions.py +4 -4
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/experiments/types.py +3 -3
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/context.py +0 -6
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/__init__.py +0 -9
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/mutations/dataset_mutations.py +52 -12
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/queries.py +30 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/routers/v1/experiment_runs.py +7 -2
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/Evaluation.py +1 -26
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/Project.py +1 -60
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/Span.py +21 -11
- arize_phoenix-4.23.0/src/phoenix/server/api/types/User.py +13 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/app.py +5 -11
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/dml_event_handler.py +0 -3
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/main.py +12 -0
- arize_phoenix-4.23.0/src/phoenix/server/static/.vite/manifest.json +78 -0
- arize_phoenix-4.22.0/src/phoenix/server/static/assets/components-Bhx3QVW0.js → arize_phoenix-4.23.0/src/phoenix/server/static/assets/components-DBYPF96c.js +48 -48
- arize_phoenix-4.23.0/src/phoenix/server/static/assets/index-DNxu4viw.js +100 -0
- arize_phoenix-4.22.0/src/phoenix/server/static/assets/pages-DG-5zgoV.js → arize_phoenix-4.23.0/src/phoenix/server/static/assets/pages-BhOnrUmC.js +229 -204
- arize_phoenix-4.22.0/src/phoenix/server/static/assets/vendor-BMWfu6zp.js → arize_phoenix-4.23.0/src/phoenix/server/static/assets/vendor-CIqy43_9.js +1 -1
- arize_phoenix-4.22.0/src/phoenix/server/static/assets/vendor-arizeai-Sj74jm5V.js → arize_phoenix-4.23.0/src/phoenix/server/static/assets/vendor-arizeai-B1YgcWL8.js +1 -1
- arize_phoenix-4.22.0/src/phoenix/server/static/assets/vendor-codemirror-DO3VqEcD.js → arize_phoenix-4.23.0/src/phoenix/server/static/assets/vendor-codemirror-_bcwCA1C.js +1 -1
- arize_phoenix-4.22.0/src/phoenix/server/static/assets/vendor-recharts-BGN0SxgJ.js → arize_phoenix-4.23.0/src/phoenix/server/static/assets/vendor-recharts-C3pM_Wlg.js +1 -1
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/templates/index.html +2 -1
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/session/session.py +1 -0
- arize_phoenix-4.23.0/src/phoenix/version.py +1 -0
- arize_phoenix-4.22.0/src/phoenix/server/api/dataloaders/evaluation_summaries.py +0 -149
- arize_phoenix-4.22.0/src/phoenix/server/api/dataloaders/span_evaluations.py +0 -35
- arize_phoenix-4.22.0/src/phoenix/server/api/dataloaders/trace_evaluations.py +0 -35
- arize_phoenix-4.22.0/src/phoenix/server/static/.vite/manifest.json +0 -78
- arize_phoenix-4.22.0/src/phoenix/server/static/assets/index-CZg-95kd.js +0 -100
- arize_phoenix-4.22.0/src/phoenix/version.py +0 -1
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/.gitignore +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/IP_NOTICE +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/LICENSE +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/README.md +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/examples/manually-instrumented-chatbot/chat-service/chat/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/examples/manually-instrumented-chatbot/chat-service/chat/app.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/examples/manually-instrumented-chatbot/chat-service/chat/types.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/examples/manually-instrumented-chatbot/frontend/Dockerfile +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/examples/manually-instrumented-chatbot/frontend/Makefile +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/examples/manually-instrumented-chatbot/frontend/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/examples/manually-instrumented-chatbot/frontend/pyproject.toml +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/examples/manually-instrumented-chatbot/frontend/schema.json +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/pyproject.toml +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/config.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/core/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/core/embedding_dimension.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/core/model.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/core/model_schema.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/core/model_schema_adapter.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/datetime_utils.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/README.md +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/alembic.ini +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/bulk_inserter.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/engines.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/helpers.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/insertion/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/insertion/constants.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/insertion/dataset.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/insertion/document_annotation.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/insertion/evaluation.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/insertion/helpers.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/insertion/span.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/insertion/span_annotation.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/insertion/trace_annotation.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/insertion/types.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/migrate.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/migrations/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/migrations/env.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/migrations/future_versions/README.md +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/migrations/future_versions/cd164e83824f_users_and_tokens.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/migrations/script.py.mako +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/migrations/versions/.gitignore +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/migrations/versions/10460e46d750_datasets.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/migrations/versions/3be8647b87d8_add_token_columns_to_spans_table.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/migrations/versions/cf03bd6bae1d_init.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/db/models.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/exceptions.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/experiments/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/experiments/evaluators/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/experiments/evaluators/base.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/experiments/evaluators/code_evaluators.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/experiments/evaluators/llm_evaluators.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/experiments/evaluators/utils.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/experiments/tracing.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/experiments/utils.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/inferences/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/inferences/errors.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/inferences/fixtures.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/inferences/inferences.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/inferences/schema.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/inferences/validation.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/metrics/README.md +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/metrics/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/metrics/binning.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/metrics/metrics.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/metrics/mixins.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/metrics/retrieval_metrics.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/metrics/timeseries.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/metrics/wrappers.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/pointcloud/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/pointcloud/clustering.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/pointcloud/pointcloud.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/pointcloud/projectors.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/pointcloud/umap_parameters.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/py.typed +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/annotation_summaries.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/average_experiment_run_latency.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/cache/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/cache/two_tier_cache.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/dataset_example_revisions.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/dataset_example_spans.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/document_evaluation_summaries.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/document_evaluations.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/document_retrieval_metrics.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/experiment_annotation_summaries.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/experiment_error_rates.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/experiment_run_counts.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/experiment_sequence_number.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/latency_ms_quantile.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/min_start_or_max_end_times.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/project_by_name.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/record_counts.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/span_annotations.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/span_dataset_examples.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/span_descendants.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/span_projects.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/token_counts.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/trace_row_ids.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/helpers/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/helpers/dataset_helpers.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/AddExamplesToDatasetInput.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/AddSpansToDatasetInput.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/ClearProjectInput.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/ClusterInput.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/Coordinates.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/CreateDatasetInput.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/CreateSpanAnnotationInput.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/CreateTraceAnnotationInput.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/DataQualityMetricInput.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/DatasetExampleInput.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/DatasetSort.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/DatasetVersionSort.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/DeleteAnnotationsInput.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/DeleteDatasetExamplesInput.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/DeleteDatasetInput.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/DeleteExperimentsInput.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/DimensionFilter.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/DimensionInput.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/Granularity.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/PatchAnnotationInput.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/PatchDatasetExamplesInput.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/PatchDatasetInput.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/PerformanceMetricInput.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/SpanAnnotationSort.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/SpanSort.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/TimeRange.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/TraceAnnotationSort.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/input_types/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/interceptor.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/mutations/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/mutations/auth.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/mutations/experiment_mutations.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/mutations/export_events_mutations.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/mutations/project_mutations.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/mutations/span_annotations_mutations.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/mutations/trace_annotations_mutations.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/openapi/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/openapi/main.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/openapi/schema.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/routers/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/routers/utils.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/routers/v1/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/routers/v1/datasets.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/routers/v1/evaluations.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/routers/v1/experiment_evaluations.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/routers/v1/experiments.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/routers/v1/pydantic_compat.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/routers/v1/spans.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/routers/v1/traces.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/routers/v1/utils.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/schema.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/Annotation.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/AnnotationSummary.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/AnnotatorKind.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/Cluster.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/CreateDatasetPayload.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/DataQualityMetric.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/Dataset.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/DatasetExample.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/DatasetExampleRevision.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/DatasetValues.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/DatasetVersion.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/Dimension.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/DimensionDataType.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/DimensionShape.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/DimensionType.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/DimensionWithValue.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/DocumentEvaluationSummary.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/DocumentRetrievalMetrics.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/EmbeddingDimension.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/EmbeddingMetadata.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/EvaluationSummary.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/Event.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/EventMetadata.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/ExampleRevisionInterface.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/Experiment.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/ExperimentAnnotationSummary.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/ExperimentComparison.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/ExperimentRun.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/ExperimentRunAnnotation.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/ExportedFile.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/Functionality.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/Inferences.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/InferencesRole.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/LabelFraction.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/MimeType.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/Model.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/NumericRange.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/PerformanceMetric.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/PromptResponse.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/Retrieval.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/ScalarDriftMetricEnum.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/Segments.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/SortDir.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/SpanAnnotation.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/TimeSeries.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/Trace.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/TraceAnnotation.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/UMAPPoints.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/ValidationResult.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/VectorDriftMetricEnum.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/node.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/types/pagination.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/utils.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/dml_event.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/grpc_server.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/openapi/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/prometheus.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/static/apple-touch-icon-114x114.png +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/static/apple-touch-icon-120x120.png +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/static/apple-touch-icon-144x144.png +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/static/apple-touch-icon-152x152.png +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/static/apple-touch-icon-180x180.png +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/static/apple-touch-icon-72x72.png +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/static/apple-touch-icon-76x76.png +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/static/apple-touch-icon.png +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/static/assets/vendor-DxkFTwjz.css +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/static/assets/vendor-three-DwGkEfCM.js +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/static/favicon.ico +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/static/modernizr.js +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/telemetry.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/templates/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/thread_server.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/types.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/services.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/session/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/session/client.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/session/data_extractor.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/session/evaluation.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/settings.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/attributes.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/dsl/README.md +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/dsl/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/dsl/filter.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/dsl/helpers.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/dsl/query.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/errors.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/evaluation_conventions.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/exporter.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/fixtures.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/langchain/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/langchain/instrumentor.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/llama_index/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/llama_index/callback.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/openai/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/openai/instrumentor.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/otel.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/projects.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/schemas.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/span_evaluations.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/span_json_decoder.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/span_json_encoder.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/trace_dataset.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/utils.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/v1/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/v1/evaluation_pb2.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/trace/v1/evaluation_pb2.pyi +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/utilities/__init__.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/utilities/client.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/utilities/deprecation.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/utilities/error_handling.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/utilities/json.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/utilities/logging.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/utilities/project.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/utilities/re.py +0 -0
- {arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/utilities/span_store.py +0 -0
|
@@ -447,14 +447,14 @@ def evaluate_experiment(
|
|
|
447
447
|
)
|
|
448
448
|
if not dataset.examples:
|
|
449
449
|
raise ValueError(f"Dataset has no examples: {dataset_id=}, {dataset_version_id=}")
|
|
450
|
-
experiment_runs =
|
|
451
|
-
ExperimentRun.from_dict(exp_run)
|
|
450
|
+
experiment_runs = {
|
|
451
|
+
exp_run["id"]: ExperimentRun.from_dict(exp_run)
|
|
452
452
|
for exp_run in sync_client.get(f"/v1/experiments/{experiment.id}/runs").json()["data"]
|
|
453
|
-
|
|
453
|
+
}
|
|
454
454
|
if not experiment_runs:
|
|
455
455
|
raise ValueError("Experiment has not been run")
|
|
456
456
|
params = ExperimentParameters(n_examples=len(dataset.examples))
|
|
457
|
-
task_summary = TaskSummary.from_task_runs(params, experiment_runs)
|
|
457
|
+
task_summary = TaskSummary.from_task_runs(params, experiment_runs.values())
|
|
458
458
|
ran_experiment = object.__new__(RanExperiment)
|
|
459
459
|
ran_experiment.__init__( # type: ignore[misc]
|
|
460
460
|
dataset=dataset,
|
|
@@ -167,7 +167,7 @@ class Dataset:
|
|
|
167
167
|
def from_dict(cls, obj: Mapping[str, Any]) -> Dataset:
|
|
168
168
|
examples = tuple(map(Example.from_dict, obj.get("examples") or ()))
|
|
169
169
|
return cls(
|
|
170
|
-
id=obj["
|
|
170
|
+
id=obj["dataset_id"],
|
|
171
171
|
version_id=obj["version_id"],
|
|
172
172
|
examples={ex.id: ex for ex in examples},
|
|
173
173
|
)
|
|
@@ -225,7 +225,7 @@ class ExperimentRun:
|
|
|
225
225
|
)
|
|
226
226
|
|
|
227
227
|
def __post_init__(self) -> None:
|
|
228
|
-
if
|
|
228
|
+
if self.output is None and self.error is None:
|
|
229
229
|
raise ValueError("Must specify exactly one of experiment_run_output or error")
|
|
230
230
|
|
|
231
231
|
|
|
@@ -284,7 +284,7 @@ class ExperimentEvaluationRun:
|
|
|
284
284
|
)
|
|
285
285
|
|
|
286
286
|
def __post_init__(self) -> None:
|
|
287
|
-
if
|
|
287
|
+
if self.result is None and self.error is None:
|
|
288
288
|
raise ValueError("Must specify either result or error")
|
|
289
289
|
|
|
290
290
|
|
|
@@ -14,7 +14,6 @@ from phoenix.server.api.dataloaders import (
|
|
|
14
14
|
DocumentEvaluationsDataLoader,
|
|
15
15
|
DocumentEvaluationSummaryDataLoader,
|
|
16
16
|
DocumentRetrievalMetricsDataLoader,
|
|
17
|
-
EvaluationSummaryDataLoader,
|
|
18
17
|
ExperimentAnnotationSummaryDataLoader,
|
|
19
18
|
ExperimentErrorRatesDataLoader,
|
|
20
19
|
ExperimentRunCountsDataLoader,
|
|
@@ -26,10 +25,8 @@ from phoenix.server.api.dataloaders import (
|
|
|
26
25
|
SpanAnnotationsDataLoader,
|
|
27
26
|
SpanDatasetExamplesDataLoader,
|
|
28
27
|
SpanDescendantsDataLoader,
|
|
29
|
-
SpanEvaluationsDataLoader,
|
|
30
28
|
SpanProjectsDataLoader,
|
|
31
29
|
TokenCountDataLoader,
|
|
32
|
-
TraceEvaluationsDataLoader,
|
|
33
30
|
TraceRowIdsDataLoader,
|
|
34
31
|
)
|
|
35
32
|
from phoenix.server.dml_event import DmlEvent
|
|
@@ -45,7 +42,6 @@ class DataLoaders:
|
|
|
45
42
|
document_evaluations: DocumentEvaluationsDataLoader
|
|
46
43
|
document_retrieval_metrics: DocumentRetrievalMetricsDataLoader
|
|
47
44
|
annotation_summaries: AnnotationSummaryDataLoader
|
|
48
|
-
evaluation_summaries: EvaluationSummaryDataLoader
|
|
49
45
|
experiment_annotation_summaries: ExperimentAnnotationSummaryDataLoader
|
|
50
46
|
experiment_error_rates: ExperimentErrorRatesDataLoader
|
|
51
47
|
experiment_run_counts: ExperimentRunCountsDataLoader
|
|
@@ -56,10 +52,8 @@ class DataLoaders:
|
|
|
56
52
|
span_annotations: SpanAnnotationsDataLoader
|
|
57
53
|
span_dataset_examples: SpanDatasetExamplesDataLoader
|
|
58
54
|
span_descendants: SpanDescendantsDataLoader
|
|
59
|
-
span_evaluations: SpanEvaluationsDataLoader
|
|
60
55
|
span_projects: SpanProjectsDataLoader
|
|
61
56
|
token_counts: TokenCountDataLoader
|
|
62
|
-
trace_evaluations: TraceEvaluationsDataLoader
|
|
63
57
|
trace_row_ids: TraceRowIdsDataLoader
|
|
64
58
|
project_by_name: ProjectByNameDataLoader
|
|
65
59
|
|
{arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/dataloaders/__init__.py
RENAMED
|
@@ -10,7 +10,6 @@ from .document_evaluation_summaries import (
|
|
|
10
10
|
)
|
|
11
11
|
from .document_evaluations import DocumentEvaluationsDataLoader
|
|
12
12
|
from .document_retrieval_metrics import DocumentRetrievalMetricsDataLoader
|
|
13
|
-
from .evaluation_summaries import EvaluationSummaryCache, EvaluationSummaryDataLoader
|
|
14
13
|
from .experiment_annotation_summaries import ExperimentAnnotationSummaryDataLoader
|
|
15
14
|
from .experiment_error_rates import ExperimentErrorRatesDataLoader
|
|
16
15
|
from .experiment_run_counts import ExperimentRunCountsDataLoader
|
|
@@ -22,10 +21,8 @@ from .record_counts import RecordCountCache, RecordCountDataLoader
|
|
|
22
21
|
from .span_annotations import SpanAnnotationsDataLoader
|
|
23
22
|
from .span_dataset_examples import SpanDatasetExamplesDataLoader
|
|
24
23
|
from .span_descendants import SpanDescendantsDataLoader
|
|
25
|
-
from .span_evaluations import SpanEvaluationsDataLoader
|
|
26
24
|
from .span_projects import SpanProjectsDataLoader
|
|
27
25
|
from .token_counts import TokenCountCache, TokenCountDataLoader
|
|
28
|
-
from .trace_evaluations import TraceEvaluationsDataLoader
|
|
29
26
|
from .trace_row_ids import TraceRowIdsDataLoader
|
|
30
27
|
|
|
31
28
|
__all__ = [
|
|
@@ -37,7 +34,6 @@ __all__ = [
|
|
|
37
34
|
"DocumentEvaluationsDataLoader",
|
|
38
35
|
"DocumentRetrievalMetricsDataLoader",
|
|
39
36
|
"AnnotationSummaryDataLoader",
|
|
40
|
-
"EvaluationSummaryDataLoader",
|
|
41
37
|
"ExperimentAnnotationSummaryDataLoader",
|
|
42
38
|
"ExperimentErrorRatesDataLoader",
|
|
43
39
|
"ExperimentRunCountsDataLoader",
|
|
@@ -47,10 +43,8 @@ __all__ = [
|
|
|
47
43
|
"RecordCountDataLoader",
|
|
48
44
|
"SpanDatasetExamplesDataLoader",
|
|
49
45
|
"SpanDescendantsDataLoader",
|
|
50
|
-
"SpanEvaluationsDataLoader",
|
|
51
46
|
"SpanProjectsDataLoader",
|
|
52
47
|
"TokenCountDataLoader",
|
|
53
|
-
"TraceEvaluationsDataLoader",
|
|
54
48
|
"TraceRowIdsDataLoader",
|
|
55
49
|
"ProjectByNameDataLoader",
|
|
56
50
|
"SpanAnnotationsDataLoader",
|
|
@@ -65,9 +59,6 @@ class CacheForDataLoaders:
|
|
|
65
59
|
annotation_summary: AnnotationSummaryCache = field(
|
|
66
60
|
default_factory=AnnotationSummaryCache,
|
|
67
61
|
)
|
|
68
|
-
evaluation_summary: EvaluationSummaryCache = field(
|
|
69
|
-
default_factory=EvaluationSummaryCache,
|
|
70
|
-
)
|
|
71
62
|
latency_ms_quantile: LatencyMsQuantileCache = field(
|
|
72
63
|
default_factory=LatencyMsQuantileCache,
|
|
73
64
|
)
|
{arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/mutations/dataset_mutations.py
RENAMED
|
@@ -230,7 +230,7 @@ class DatasetMutationMixin:
|
|
|
230
230
|
) -> DatasetMutationPayload:
|
|
231
231
|
dataset_id = input.dataset_id
|
|
232
232
|
# Extract the span rowids from the input examples if they exist
|
|
233
|
-
span_ids =
|
|
233
|
+
span_ids = [example.span_id for example in input.examples if example.span_id]
|
|
234
234
|
span_rowids = {
|
|
235
235
|
from_global_id_with_expected_type(global_id=span_id, expected_type_name=Span.__name__)
|
|
236
236
|
for span_id in set(span_ids)
|
|
@@ -260,6 +260,8 @@ class DatasetMutationMixin:
|
|
|
260
260
|
)
|
|
261
261
|
.returning(models.DatasetVersion.id)
|
|
262
262
|
)
|
|
263
|
+
|
|
264
|
+
# Fetch spans and span annotations
|
|
263
265
|
spans = (
|
|
264
266
|
await session.execute(
|
|
265
267
|
select(models.Span.id)
|
|
@@ -267,9 +269,36 @@ class DatasetMutationMixin:
|
|
|
267
269
|
.where(models.Span.id.in_(span_rowids))
|
|
268
270
|
)
|
|
269
271
|
).all()
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
272
|
+
|
|
273
|
+
span_annotations = (
|
|
274
|
+
await session.execute(
|
|
275
|
+
select(
|
|
276
|
+
models.SpanAnnotation.span_rowid,
|
|
277
|
+
models.SpanAnnotation.name,
|
|
278
|
+
models.SpanAnnotation.label,
|
|
279
|
+
models.SpanAnnotation.score,
|
|
280
|
+
models.SpanAnnotation.explanation,
|
|
281
|
+
models.SpanAnnotation.metadata_,
|
|
282
|
+
models.SpanAnnotation.annotator_kind,
|
|
283
|
+
)
|
|
284
|
+
.select_from(models.SpanAnnotation)
|
|
285
|
+
.where(models.SpanAnnotation.span_rowid.in_(span_rowids))
|
|
286
|
+
)
|
|
287
|
+
).all()
|
|
288
|
+
|
|
289
|
+
span_annotations_by_span: Dict[int, Dict[Any, Any]] = {span.id: {} for span in spans}
|
|
290
|
+
for annotation in span_annotations:
|
|
291
|
+
span_id = annotation.span_rowid
|
|
292
|
+
if span_id not in span_annotations_by_span:
|
|
293
|
+
span_annotations_by_span[span_id] = dict()
|
|
294
|
+
span_annotations_by_span[span_id][annotation.name] = {
|
|
295
|
+
"label": annotation.label,
|
|
296
|
+
"score": annotation.score,
|
|
297
|
+
"explanation": annotation.explanation,
|
|
298
|
+
"metadata": annotation.metadata_,
|
|
299
|
+
"annotator_kind": annotation.annotator_kind,
|
|
300
|
+
}
|
|
301
|
+
|
|
273
302
|
DatasetExample = models.DatasetExample
|
|
274
303
|
dataset_example_rowids = (
|
|
275
304
|
await session.scalars(
|
|
@@ -291,21 +320,32 @@ class DatasetMutationMixin:
|
|
|
291
320
|
assert len(dataset_example_rowids) == len(input.examples)
|
|
292
321
|
assert all(map(lambda id: isinstance(id, int), dataset_example_rowids))
|
|
293
322
|
DatasetExampleRevision = models.DatasetExampleRevision
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
323
|
+
|
|
324
|
+
dataset_example_revisions = []
|
|
325
|
+
for dataset_example_rowid, example in zip(dataset_example_rowids, input.examples):
|
|
326
|
+
span_annotation = {}
|
|
327
|
+
if example.span_id:
|
|
328
|
+
span_id = from_global_id_with_expected_type(
|
|
329
|
+
global_id=example.span_id,
|
|
330
|
+
expected_type_name=Span.__name__,
|
|
331
|
+
)
|
|
332
|
+
span_annotation = span_annotations_by_span.get(span_id, {})
|
|
333
|
+
dataset_example_revisions.append(
|
|
297
334
|
{
|
|
298
335
|
DatasetExampleRevision.dataset_example_id.key: dataset_example_rowid,
|
|
299
336
|
DatasetExampleRevision.dataset_version_id.key: dataset_version_rowid,
|
|
300
337
|
DatasetExampleRevision.input.key: example.input,
|
|
301
338
|
DatasetExampleRevision.output.key: example.output,
|
|
302
|
-
DatasetExampleRevision.metadata_.key:
|
|
339
|
+
DatasetExampleRevision.metadata_.key: {
|
|
340
|
+
**(example.metadata or {}),
|
|
341
|
+
"annotations": span_annotation,
|
|
342
|
+
},
|
|
303
343
|
DatasetExampleRevision.revision_kind.key: "CREATE",
|
|
304
344
|
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
345
|
+
)
|
|
346
|
+
await session.execute(
|
|
347
|
+
insert(DatasetExampleRevision),
|
|
348
|
+
dataset_example_revisions,
|
|
309
349
|
)
|
|
310
350
|
info.context.event_queue.put(DatasetInsertEvent((dataset.id,)))
|
|
311
351
|
return DatasetMutationPayload(dataset=to_gql_dataset(dataset))
|
|
@@ -67,10 +67,40 @@ from phoenix.server.api.types.Project import Project
|
|
|
67
67
|
from phoenix.server.api.types.SortDir import SortDir
|
|
68
68
|
from phoenix.server.api.types.Span import Span, to_gql_span
|
|
69
69
|
from phoenix.server.api.types.Trace import Trace
|
|
70
|
+
from phoenix.server.api.types.User import User
|
|
70
71
|
|
|
71
72
|
|
|
72
73
|
@strawberry.type
|
|
73
74
|
class Query:
|
|
75
|
+
@strawberry.field
|
|
76
|
+
async def users(
|
|
77
|
+
self,
|
|
78
|
+
info: Info[Context, None],
|
|
79
|
+
first: Optional[int] = 50,
|
|
80
|
+
last: Optional[int] = UNSET,
|
|
81
|
+
after: Optional[CursorString] = UNSET,
|
|
82
|
+
before: Optional[CursorString] = UNSET,
|
|
83
|
+
) -> Connection[User]:
|
|
84
|
+
args = ConnectionArgs(
|
|
85
|
+
first=first,
|
|
86
|
+
after=after if isinstance(after, CursorString) else None,
|
|
87
|
+
last=last,
|
|
88
|
+
before=before if isinstance(before, CursorString) else None,
|
|
89
|
+
)
|
|
90
|
+
stmt = select(models.User).order_by(models.User.email)
|
|
91
|
+
async with info.context.db() as session:
|
|
92
|
+
users = await session.stream_scalars(stmt)
|
|
93
|
+
data = [
|
|
94
|
+
User(
|
|
95
|
+
id_attr=user.id,
|
|
96
|
+
email=user.email,
|
|
97
|
+
username=user.username,
|
|
98
|
+
created_at=user.created_at,
|
|
99
|
+
)
|
|
100
|
+
async for user in users
|
|
101
|
+
]
|
|
102
|
+
return connection_from_list(data=data, args=args)
|
|
103
|
+
|
|
74
104
|
@strawberry.field
|
|
75
105
|
async def projects(
|
|
76
106
|
self,
|
{arize_phoenix-4.22.0 → arize_phoenix-4.23.0}/src/phoenix/server/api/routers/v1/experiment_runs.py
RENAMED
|
@@ -108,7 +108,12 @@ async def create_experiment_run(
|
|
|
108
108
|
return CreateExperimentResponseBody(data=CreateExperimentRunResponseBodyData(id=str(run_gid)))
|
|
109
109
|
|
|
110
110
|
|
|
111
|
-
class
|
|
111
|
+
class ExperimentRunResponse(ExperimentRun):
|
|
112
|
+
id: str = Field(description="The ID of the experiment run")
|
|
113
|
+
experiment_id: str = Field(description="The ID of the experiment")
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
class ListExperimentRunsResponseBody(ResponseBody[List[ExperimentRunResponse]]):
|
|
112
117
|
pass
|
|
113
118
|
|
|
114
119
|
|
|
@@ -147,7 +152,7 @@ async def list_experiment_runs(
|
|
|
147
152
|
experiment_gid = GlobalID("Experiment", str(exp_run.experiment_id))
|
|
148
153
|
example_gid = GlobalID("DatasetExample", str(exp_run.dataset_example_id))
|
|
149
154
|
runs.append(
|
|
150
|
-
|
|
155
|
+
ExperimentRunResponse(
|
|
151
156
|
start_time=exp_run.start_time,
|
|
152
157
|
end_time=exp_run.end_time,
|
|
153
158
|
experiment_id=str(experiment_gid),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import strawberry
|
|
2
2
|
|
|
3
3
|
import phoenix.trace.v1 as pb
|
|
4
|
-
from phoenix.db.models import DocumentAnnotation,
|
|
4
|
+
from phoenix.db.models import DocumentAnnotation, TraceAnnotation
|
|
5
5
|
|
|
6
6
|
from .Annotation import Annotation
|
|
7
7
|
|
|
@@ -31,31 +31,6 @@ class TraceEvaluation(Annotation):
|
|
|
31
31
|
)
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
@strawberry.type
|
|
35
|
-
class SpanEvaluation(Annotation):
|
|
36
|
-
@staticmethod
|
|
37
|
-
def from_pb_evaluation(evaluation: pb.Evaluation) -> "SpanEvaluation":
|
|
38
|
-
result = evaluation.result
|
|
39
|
-
score = result.score.value if result.HasField("score") else None
|
|
40
|
-
label = result.label.value if result.HasField("label") else None
|
|
41
|
-
explanation = result.explanation.value if result.HasField("explanation") else None
|
|
42
|
-
return SpanEvaluation(
|
|
43
|
-
name=evaluation.name,
|
|
44
|
-
score=score,
|
|
45
|
-
label=label,
|
|
46
|
-
explanation=explanation,
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
@staticmethod
|
|
50
|
-
def from_sql_span_annotation(annotation: SpanAnnotation) -> "SpanEvaluation":
|
|
51
|
-
return SpanEvaluation(
|
|
52
|
-
name=annotation.name,
|
|
53
|
-
score=annotation.score,
|
|
54
|
-
label=annotation.label,
|
|
55
|
-
explanation=annotation.explanation,
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
|
|
59
34
|
@strawberry.type
|
|
60
35
|
class DocumentEvaluation(Annotation):
|
|
61
36
|
document_position: int = strawberry.field(
|
|
@@ -24,7 +24,6 @@ from phoenix.server.api.input_types.SpanSort import SpanSort, SpanSortConfig
|
|
|
24
24
|
from phoenix.server.api.input_types.TimeRange import TimeRange
|
|
25
25
|
from phoenix.server.api.types.AnnotationSummary import AnnotationSummary
|
|
26
26
|
from phoenix.server.api.types.DocumentEvaluationSummary import DocumentEvaluationSummary
|
|
27
|
-
from phoenix.server.api.types.EvaluationSummary import EvaluationSummary
|
|
28
27
|
from phoenix.server.api.types.pagination import (
|
|
29
28
|
Cursor,
|
|
30
29
|
CursorSortColumn,
|
|
@@ -249,23 +248,6 @@ class Project(Node):
|
|
|
249
248
|
has_next_page=has_next_page,
|
|
250
249
|
)
|
|
251
250
|
|
|
252
|
-
@strawberry.field(
|
|
253
|
-
description="Names of all available evaluations for traces. "
|
|
254
|
-
"(The list contains no duplicates.)"
|
|
255
|
-
) # type: ignore
|
|
256
|
-
async def trace_evaluation_names(
|
|
257
|
-
self,
|
|
258
|
-
info: Info[Context, None],
|
|
259
|
-
) -> List[str]:
|
|
260
|
-
stmt = (
|
|
261
|
-
select(distinct(models.TraceAnnotation.name))
|
|
262
|
-
.join(models.Trace)
|
|
263
|
-
.where(models.Trace.project_rowid == self.id_attr)
|
|
264
|
-
.where(models.TraceAnnotation.annotator_kind == "LLM")
|
|
265
|
-
)
|
|
266
|
-
async with info.context.db() as session:
|
|
267
|
-
return list(await session.scalars(stmt))
|
|
268
|
-
|
|
269
251
|
@strawberry.field(
|
|
270
252
|
description="Names of all available annotations for traces. "
|
|
271
253
|
"(The list contains no duplicates.)"
|
|
@@ -282,24 +264,6 @@ class Project(Node):
|
|
|
282
264
|
async with info.context.db() as session:
|
|
283
265
|
return list(await session.scalars(stmt))
|
|
284
266
|
|
|
285
|
-
@strawberry.field(
|
|
286
|
-
description="Names of all available evaluations for spans. "
|
|
287
|
-
"(The list contains no duplicates.)"
|
|
288
|
-
) # type: ignore
|
|
289
|
-
async def span_evaluation_names(
|
|
290
|
-
self,
|
|
291
|
-
info: Info[Context, None],
|
|
292
|
-
) -> List[str]:
|
|
293
|
-
stmt = (
|
|
294
|
-
select(distinct(models.SpanAnnotation.name))
|
|
295
|
-
.join(models.Span)
|
|
296
|
-
.join(models.Trace, models.Span.trace_rowid == models.Trace.id)
|
|
297
|
-
.where(models.Trace.project_rowid == self.id_attr)
|
|
298
|
-
.where(models.SpanAnnotation.annotator_kind == "LLM")
|
|
299
|
-
)
|
|
300
|
-
async with info.context.db() as session:
|
|
301
|
-
return list(await session.scalars(stmt))
|
|
302
|
-
|
|
303
267
|
@strawberry.field(
|
|
304
268
|
description="Names of all available annotations for spans. "
|
|
305
269
|
"(The list contains no duplicates.)"
|
|
@@ -337,29 +301,6 @@ class Project(Node):
|
|
|
337
301
|
async with info.context.db() as session:
|
|
338
302
|
return list(await session.scalars(stmt))
|
|
339
303
|
|
|
340
|
-
@strawberry.field
|
|
341
|
-
async def trace_evaluation_summary(
|
|
342
|
-
self,
|
|
343
|
-
info: Info[Context, None],
|
|
344
|
-
evaluation_name: str,
|
|
345
|
-
time_range: Optional[TimeRange] = UNSET,
|
|
346
|
-
) -> Optional[EvaluationSummary]:
|
|
347
|
-
return await info.context.data_loaders.evaluation_summaries.load(
|
|
348
|
-
("trace", self.id_attr, time_range, None, evaluation_name),
|
|
349
|
-
)
|
|
350
|
-
|
|
351
|
-
@strawberry.field
|
|
352
|
-
async def span_evaluation_summary(
|
|
353
|
-
self,
|
|
354
|
-
info: Info[Context, None],
|
|
355
|
-
evaluation_name: str,
|
|
356
|
-
time_range: Optional[TimeRange] = UNSET,
|
|
357
|
-
filter_condition: Optional[str] = UNSET,
|
|
358
|
-
) -> Optional[EvaluationSummary]:
|
|
359
|
-
return await info.context.data_loaders.evaluation_summaries.load(
|
|
360
|
-
("span", self.id_attr, time_range, filter_condition, evaluation_name),
|
|
361
|
-
)
|
|
362
|
-
|
|
363
304
|
@strawberry.field
|
|
364
305
|
async def trace_annotation_summary(
|
|
365
306
|
self,
|
|
@@ -405,7 +346,7 @@ class Project(Node):
|
|
|
405
346
|
@strawberry.field
|
|
406
347
|
async def validate_span_filter_condition(self, condition: str) -> ValidationResult:
|
|
407
348
|
# This query is too expensive to run on every validation
|
|
408
|
-
# valid_eval_names = await self.
|
|
349
|
+
# valid_eval_names = await self.span_annotation_names()
|
|
409
350
|
try:
|
|
410
351
|
SpanFilter(
|
|
411
352
|
condition=condition,
|
|
@@ -28,7 +28,7 @@ from phoenix.server.api.types.SpanAnnotation import to_gql_span_annotation
|
|
|
28
28
|
from phoenix.trace.attributes import get_attribute_value
|
|
29
29
|
|
|
30
30
|
from .DocumentRetrievalMetrics import DocumentRetrievalMetrics
|
|
31
|
-
from .Evaluation import DocumentEvaluation
|
|
31
|
+
from .Evaluation import DocumentEvaluation
|
|
32
32
|
from .ExampleRevisionInterface import ExampleRevision
|
|
33
33
|
from .MimeType import MimeType
|
|
34
34
|
from .SpanAnnotation import SpanAnnotation
|
|
@@ -170,14 +170,6 @@ class Span(Node):
|
|
|
170
170
|
"codes from descendant spans (children, grandchildren, etc.)",
|
|
171
171
|
)
|
|
172
172
|
|
|
173
|
-
@strawberry.field(
|
|
174
|
-
description="Evaluations associated with the span, e.g. if the span is "
|
|
175
|
-
"an LLM, an evaluation may assess the helpfulness of its response with "
|
|
176
|
-
"respect to its input."
|
|
177
|
-
) # type: ignore
|
|
178
|
-
async def span_evaluations(self, info: Info[Context, None]) -> List[SpanEvaluation]:
|
|
179
|
-
return await info.context.data_loaders.span_evaluations.load(self.id_attr)
|
|
180
|
-
|
|
181
173
|
@strawberry.field(
|
|
182
174
|
description=(
|
|
183
175
|
"Annotations associated with the span. This encompasses both "
|
|
@@ -240,7 +232,7 @@ class Span(Node):
|
|
|
240
232
|
@strawberry.field(
|
|
241
233
|
description="The span's attributes translated into an example revision for a dataset",
|
|
242
234
|
) # type: ignore
|
|
243
|
-
def as_example_revision(self) -> SpanAsExampleRevision:
|
|
235
|
+
async def as_example_revision(self, info: Info[Context, None]) -> SpanAsExampleRevision:
|
|
244
236
|
db_span = self.db_span
|
|
245
237
|
attributes = db_span.attributes
|
|
246
238
|
span_io = _SpanIO(
|
|
@@ -256,10 +248,28 @@ class Span(Node):
|
|
|
256
248
|
llm_output_messages=get_attribute_value(attributes, LLM_OUTPUT_MESSAGES),
|
|
257
249
|
retrieval_documents=get_attribute_value(attributes, RETRIEVAL_DOCUMENTS),
|
|
258
250
|
)
|
|
251
|
+
|
|
252
|
+
# Fetch annotations associated with this span
|
|
253
|
+
span_annotations = await self.span_annotations(info)
|
|
254
|
+
annotations = dict()
|
|
255
|
+
for annotation in span_annotations:
|
|
256
|
+
annotations[annotation.name] = {
|
|
257
|
+
"label": annotation.label,
|
|
258
|
+
"score": annotation.score,
|
|
259
|
+
"explanation": annotation.explanation,
|
|
260
|
+
"metadata": annotation.metadata,
|
|
261
|
+
"annotator_kind": annotation.annotator_kind.value,
|
|
262
|
+
}
|
|
263
|
+
# Merge annotations into the metadata
|
|
264
|
+
metadata = {
|
|
265
|
+
**attributes,
|
|
266
|
+
"annotations": annotations,
|
|
267
|
+
}
|
|
268
|
+
|
|
259
269
|
return SpanAsExampleRevision(
|
|
260
270
|
input=get_dataset_example_input(span_io),
|
|
261
271
|
output=get_dataset_example_output(span_io),
|
|
262
|
-
metadata=
|
|
272
|
+
metadata=metadata,
|
|
263
273
|
)
|
|
264
274
|
|
|
265
275
|
@strawberry.field(description="The project that this span belongs to.") # type: ignore
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
from typing import Optional
|
|
3
|
+
|
|
4
|
+
import strawberry
|
|
5
|
+
from strawberry.relay import Node, NodeID
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@strawberry.type
|
|
9
|
+
class User(Node):
|
|
10
|
+
id_attr: NodeID[int]
|
|
11
|
+
email: str
|
|
12
|
+
username: Optional[str]
|
|
13
|
+
created_at: datetime
|
|
@@ -65,7 +65,6 @@ from phoenix.server.api.dataloaders import (
|
|
|
65
65
|
DocumentEvaluationsDataLoader,
|
|
66
66
|
DocumentEvaluationSummaryDataLoader,
|
|
67
67
|
DocumentRetrievalMetricsDataLoader,
|
|
68
|
-
EvaluationSummaryDataLoader,
|
|
69
68
|
ExperimentAnnotationSummaryDataLoader,
|
|
70
69
|
ExperimentErrorRatesDataLoader,
|
|
71
70
|
ExperimentRunCountsDataLoader,
|
|
@@ -77,10 +76,8 @@ from phoenix.server.api.dataloaders import (
|
|
|
77
76
|
SpanAnnotationsDataLoader,
|
|
78
77
|
SpanDatasetExamplesDataLoader,
|
|
79
78
|
SpanDescendantsDataLoader,
|
|
80
|
-
SpanEvaluationsDataLoader,
|
|
81
79
|
SpanProjectsDataLoader,
|
|
82
80
|
TokenCountDataLoader,
|
|
83
|
-
TraceEvaluationsDataLoader,
|
|
84
81
|
TraceRowIdsDataLoader,
|
|
85
82
|
)
|
|
86
83
|
from phoenix.server.api.routers.v1 import REST_API_VERSION
|
|
@@ -118,6 +115,8 @@ class AppConfig(NamedTuple):
|
|
|
118
115
|
n_samples: int
|
|
119
116
|
is_development: bool
|
|
120
117
|
web_manifest_path: Path
|
|
118
|
+
authentication_enabled: bool
|
|
119
|
+
""" Whether authentication is enabled """
|
|
121
120
|
|
|
122
121
|
|
|
123
122
|
class Static(StaticFiles):
|
|
@@ -165,6 +164,7 @@ class Static(StaticFiles):
|
|
|
165
164
|
"request": request,
|
|
166
165
|
"is_development": self._app_config.is_development,
|
|
167
166
|
"manifest": self._web_manifest,
|
|
167
|
+
"authentication_enabled": self._app_config.authentication_enabled,
|
|
168
168
|
},
|
|
169
169
|
)
|
|
170
170
|
except Exception as e:
|
|
@@ -303,12 +303,6 @@ def create_graphql_router(
|
|
|
303
303
|
if cache_for_dataloaders
|
|
304
304
|
else None,
|
|
305
305
|
),
|
|
306
|
-
evaluation_summaries=EvaluationSummaryDataLoader(
|
|
307
|
-
db,
|
|
308
|
-
cache_map=cache_for_dataloaders.evaluation_summary
|
|
309
|
-
if cache_for_dataloaders
|
|
310
|
-
else None,
|
|
311
|
-
),
|
|
312
306
|
experiment_annotation_summaries=ExperimentAnnotationSummaryDataLoader(db),
|
|
313
307
|
experiment_error_rates=ExperimentErrorRatesDataLoader(db),
|
|
314
308
|
experiment_run_counts=ExperimentRunCountsDataLoader(db),
|
|
@@ -332,13 +326,11 @@ def create_graphql_router(
|
|
|
332
326
|
span_annotations=SpanAnnotationsDataLoader(db),
|
|
333
327
|
span_dataset_examples=SpanDatasetExamplesDataLoader(db),
|
|
334
328
|
span_descendants=SpanDescendantsDataLoader(db),
|
|
335
|
-
span_evaluations=SpanEvaluationsDataLoader(db),
|
|
336
329
|
span_projects=SpanProjectsDataLoader(db),
|
|
337
330
|
token_counts=TokenCountDataLoader(
|
|
338
331
|
db,
|
|
339
332
|
cache_map=cache_for_dataloaders.token_count if cache_for_dataloaders else None,
|
|
340
333
|
),
|
|
341
|
-
trace_evaluations=TraceEvaluationsDataLoader(db),
|
|
342
334
|
trace_row_ids=TraceRowIdsDataLoader(db),
|
|
343
335
|
project_by_name=ProjectByNameDataLoader(db),
|
|
344
336
|
),
|
|
@@ -406,6 +398,7 @@ def create_app(
|
|
|
406
398
|
db: DbSessionFactory,
|
|
407
399
|
export_path: Path,
|
|
408
400
|
model: Model,
|
|
401
|
+
authentication_enabled: bool,
|
|
409
402
|
umap_params: UMAPParameters,
|
|
410
403
|
corpus: Optional[Model] = None,
|
|
411
404
|
debug: bool = False,
|
|
@@ -526,6 +519,7 @@ def create_app(
|
|
|
526
519
|
n_neighbors=umap_params.n_neighbors,
|
|
527
520
|
n_samples=umap_params.n_samples,
|
|
528
521
|
is_development=dev,
|
|
522
|
+
authentication_enabled=authentication_enabled,
|
|
529
523
|
web_manifest_path=SERVER_DIR / "static" / ".vite" / "manifest.json",
|
|
530
524
|
),
|
|
531
525
|
),
|
|
@@ -142,7 +142,6 @@ class _SpanDeleteEventHandler(_SpanDmlEventHandler):
|
|
|
142
142
|
@staticmethod
|
|
143
143
|
def _clear(cache: CacheForDataLoaders, project_id: int) -> None:
|
|
144
144
|
cache.annotation_summary.invalidate_project(project_id)
|
|
145
|
-
cache.evaluation_summary.invalidate_project(project_id)
|
|
146
145
|
cache.document_evaluation_summary.invalidate_project(project_id)
|
|
147
146
|
|
|
148
147
|
|
|
@@ -201,7 +200,6 @@ class _SpanAnnotationDmlEventHandler(_AnnotationDmlEventHandler[SpanAnnotationDm
|
|
|
201
200
|
@staticmethod
|
|
202
201
|
def _clear(cache: CacheForDataLoaders, project_id: int, name: str) -> None:
|
|
203
202
|
cache.annotation_summary.invalidate((project_id, name, "span"))
|
|
204
|
-
cache.evaluation_summary.invalidate((project_id, name, "span"))
|
|
205
203
|
|
|
206
204
|
|
|
207
205
|
class _TraceAnnotationDmlEventHandler(_AnnotationDmlEventHandler[TraceAnnotationDmlEvent]):
|
|
@@ -214,7 +212,6 @@ class _TraceAnnotationDmlEventHandler(_AnnotationDmlEventHandler[TraceAnnotation
|
|
|
214
212
|
@staticmethod
|
|
215
213
|
def _clear(cache: CacheForDataLoaders, project_id: int, name: str) -> None:
|
|
216
214
|
cache.annotation_summary.invalidate((project_id, name, "trace"))
|
|
217
|
-
cache.evaluation_summary.invalidate((project_id, name, "trace"))
|
|
218
215
|
|
|
219
216
|
|
|
220
217
|
class _DocumentAnnotationDmlEventHandler(_AnnotationDmlEventHandler[DocumentAnnotationDmlEvent]):
|
|
@@ -13,6 +13,7 @@ from uvicorn import Config, Server
|
|
|
13
13
|
import phoenix.trace.v1 as pb
|
|
14
14
|
from phoenix.config import (
|
|
15
15
|
EXPORT_DIR,
|
|
16
|
+
get_auth_settings,
|
|
16
17
|
get_env_database_connection_str,
|
|
17
18
|
get_env_enable_prometheus,
|
|
18
19
|
get_env_grpc_port,
|
|
@@ -80,6 +81,11 @@ _WELCOME_MESSAGE = """
|
|
|
80
81
|
| Storage: {storage}
|
|
81
82
|
"""
|
|
82
83
|
|
|
84
|
+
_EXPERIMENTAL_WARNING = """
|
|
85
|
+
🚨 WARNING: Phoenix is running in experimental mode. 🚨
|
|
86
|
+
| Authentication enabled: {auth_enabled}
|
|
87
|
+
"""
|
|
88
|
+
|
|
83
89
|
|
|
84
90
|
def _write_pid_file_when_ready(
|
|
85
91
|
server: Server,
|
|
@@ -212,6 +218,8 @@ if __name__ == "__main__":
|
|
|
212
218
|
reference_inferences,
|
|
213
219
|
)
|
|
214
220
|
|
|
221
|
+
authentication_enabled, auth_secret = get_auth_settings()
|
|
222
|
+
|
|
215
223
|
fixture_spans: List[Span] = []
|
|
216
224
|
fixture_evals: List[pb.Evaluation] = []
|
|
217
225
|
if trace_dataset_name is not None:
|
|
@@ -251,6 +259,7 @@ if __name__ == "__main__":
|
|
|
251
259
|
db=factory,
|
|
252
260
|
export_path=export_path,
|
|
253
261
|
model=model,
|
|
262
|
+
authentication_enabled=authentication_enabled,
|
|
254
263
|
umap_params=umap_params,
|
|
255
264
|
corpus=None
|
|
256
265
|
if corpus_inferences is None
|
|
@@ -278,5 +287,8 @@ if __name__ == "__main__":
|
|
|
278
287
|
)
|
|
279
288
|
)
|
|
280
289
|
|
|
290
|
+
if authentication_enabled:
|
|
291
|
+
print(_EXPERIMENTAL_WARNING.format(auth_enabled=authentication_enabled))
|
|
292
|
+
|
|
281
293
|
# Start the server
|
|
282
294
|
server.run()
|