arize-phoenix 11.38.0__tar.gz → 12.2.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-11.38.0 → arize_phoenix-12.2.0}/PKG-INFO +3 -3
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/pyproject.toml +2 -2
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/config.py +1 -11
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/bulk_inserter.py +8 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/facilitator.py +1 -1
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/helpers.py +202 -33
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/insertion/dataset.py +7 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/insertion/document_annotation.py +1 -1
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/insertion/helpers.py +2 -2
- arize_phoenix-12.2.0/src/phoenix/db/insertion/session_annotation.py +176 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/insertion/span_annotation.py +1 -1
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/insertion/trace_annotation.py +1 -1
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/insertion/types.py +29 -3
- arize_phoenix-12.2.0/src/phoenix/db/migrations/versions/01a8342c9cdf_add_user_id_on_datasets.py +40 -0
- arize_phoenix-12.2.0/src/phoenix/db/migrations/versions/0df286449799_add_session_annotations_table.py +105 -0
- arize_phoenix-12.2.0/src/phoenix/db/migrations/versions/272b66ff50f8_drop_single_indices.py +119 -0
- arize_phoenix-12.2.0/src/phoenix/db/migrations/versions/58228d933c91_dataset_labels.py +67 -0
- arize_phoenix-12.2.0/src/phoenix/db/migrations/versions/699f655af132_experiment_tags.py +57 -0
- arize_phoenix-12.2.0/src/phoenix/db/migrations/versions/735d3d93c33e_add_composite_indices.py +41 -0
- arize_phoenix-12.2.0/src/phoenix/db/migrations/versions/ab513d89518b_add_user_id_on_dataset_versions.py +40 -0
- arize_phoenix-12.2.0/src/phoenix/db/migrations/versions/d0690a79ea51_users_on_experiments.py +40 -0
- arize_phoenix-12.2.0/src/phoenix/db/migrations/versions/deb2c81c0bb2_dataset_splits.py +139 -0
- arize_phoenix-12.2.0/src/phoenix/db/migrations/versions/e76cbd66ffc3_add_experiments_dataset_examples.py +87 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/models.py +306 -46
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/context.py +15 -2
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/__init__.py +8 -2
- arize_phoenix-12.2.0/src/phoenix/server/api/dataloaders/dataset_example_splits.py +40 -0
- arize_phoenix-12.2.0/src/phoenix/server/api/dataloaders/dataset_labels.py +36 -0
- arize_phoenix-12.2.0/src/phoenix/server/api/dataloaders/session_annotations_by_session.py +29 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/table_fields.py +2 -2
- arize_phoenix-12.2.0/src/phoenix/server/api/dataloaders/trace_annotations_by_trace.py +27 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/helpers/playground_clients.py +66 -35
- arize_phoenix-12.2.0/src/phoenix/server/api/helpers/playground_users.py +26 -0
- arize_phoenix-11.38.0/src/phoenix/server/api/input_types/SpanAnnotationFilter.py → arize_phoenix-12.2.0/src/phoenix/server/api/input_types/AnnotationFilter.py +22 -14
- arize_phoenix-12.2.0/src/phoenix/server/api/input_types/CreateProjectSessionAnnotationInput.py +37 -0
- arize_phoenix-12.2.0/src/phoenix/server/api/input_types/UpdateAnnotationInput.py +34 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/mutations/__init__.py +8 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/mutations/chat_mutations.py +8 -3
- arize_phoenix-12.2.0/src/phoenix/server/api/mutations/dataset_label_mutations.py +291 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/mutations/dataset_mutations.py +5 -0
- arize_phoenix-12.2.0/src/phoenix/server/api/mutations/dataset_split_mutations.py +423 -0
- arize_phoenix-12.2.0/src/phoenix/server/api/mutations/project_session_annotations_mutations.py +161 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/queries.py +53 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/routers/auth.py +5 -5
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/routers/oauth2.py +5 -23
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/routers/v1/__init__.py +2 -0
- arize_phoenix-12.2.0/src/phoenix/server/api/routers/v1/annotations.py +626 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/routers/v1/datasets.py +5 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/routers/v1/experiments.py +10 -3
- arize_phoenix-12.2.0/src/phoenix/server/api/routers/v1/sessions.py +111 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/routers/v1/traces.py +1 -2
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/routers/v1/users.py +7 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/subscriptions.py +5 -2
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/Dataset.py +8 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/DatasetExample.py +18 -0
- arize_phoenix-12.2.0/src/phoenix/server/api/types/DatasetLabel.py +23 -0
- arize_phoenix-12.2.0/src/phoenix/server/api/types/DatasetSplit.py +32 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/Experiment.py +0 -4
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/Project.py +16 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/ProjectSession.py +88 -3
- arize_phoenix-12.2.0/src/phoenix/server/api/types/ProjectSessionAnnotation.py +68 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/Prompt.py +18 -1
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/Span.py +5 -5
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/Trace.py +61 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/app.py +13 -14
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/cost_tracking/model_cost_manifest.json +132 -2
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/dml_event.py +13 -0
- arize_phoenix-12.2.0/src/phoenix/server/static/.vite/manifest.json +93 -0
- arize_phoenix-11.38.0/src/phoenix/server/static/assets/components-BQPHTBfv.js → arize_phoenix-12.2.0/src/phoenix/server/static/assets/components-BG6v0EM8.js +705 -385
- arize_phoenix-11.38.0/src/phoenix/server/static/assets/index-BL5BMgJU.js → arize_phoenix-12.2.0/src/phoenix/server/static/assets/index-CSVcULw1.js +13 -13
- arize_phoenix-11.38.0/src/phoenix/server/static/assets/pages-C0Y17J0T.js → arize_phoenix-12.2.0/src/phoenix/server/static/assets/pages-DgaM7kpM.js +1356 -1155
- arize_phoenix-11.38.0/src/phoenix/server/static/assets/vendor-BdjZxMii.js → arize_phoenix-12.2.0/src/phoenix/server/static/assets/vendor-BqTEkGQU.js +183 -183
- arize_phoenix-11.38.0/src/phoenix/server/static/assets/vendor-arizeai-CHYlS8jV.js → arize_phoenix-12.2.0/src/phoenix/server/static/assets/vendor-arizeai-DlOj0PQQ.js +15 -24
- arize_phoenix-11.38.0/src/phoenix/server/static/assets/vendor-codemirror-Di6t4HnH.js → arize_phoenix-12.2.0/src/phoenix/server/static/assets/vendor-codemirror-B2PHH5yZ.js +3 -3
- arize_phoenix-11.38.0/src/phoenix/server/static/assets/vendor-recharts-C9wCDYj3.js → arize_phoenix-12.2.0/src/phoenix/server/static/assets/vendor-recharts-CKsi4IjN.js +1 -1
- arize_phoenix-11.38.0/src/phoenix/server/static/assets/vendor-shiki-MNnmOotP.js → arize_phoenix-12.2.0/src/phoenix/server/static/assets/vendor-shiki-DN26BkKE.js +1 -1
- arize_phoenix-12.2.0/src/phoenix/server/utils.py +74 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/session/session.py +25 -5
- arize_phoenix-12.2.0/src/phoenix/version.py +1 -0
- arize_phoenix-11.38.0/src/phoenix/server/api/dataloaders/experiment_repetition_counts.py +0 -39
- arize_phoenix-11.38.0/src/phoenix/server/api/routers/v1/annotations.py +0 -306
- arize_phoenix-11.38.0/src/phoenix/server/static/.vite/manifest.json +0 -93
- arize_phoenix-11.38.0/src/phoenix/version.py +0 -1
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/.gitignore +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/IP_NOTICE +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/LICENSE +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/README.md +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/auth.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/core/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/core/embedding_dimension.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/core/model.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/core/model_schema.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/core/model_schema_adapter.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/datetime_utils.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/README.md +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/alembic.ini +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/constants.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/engines.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/enums.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/insertion/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/insertion/constants.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/insertion/evaluation.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/insertion/span.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/migrate.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/migrations/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/migrations/data_migration_scripts/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/migrations/data_migration_scripts/populate_project_sessions.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/migrations/env.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/migrations/script.py.mako +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/migrations/versions/10460e46d750_datasets.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/migrations/versions/2f9d1a65945f_annotation_config_migration.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/migrations/versions/3be8647b87d8_add_token_columns_to_spans_table.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/migrations/versions/4ded9e43755f_create_project_sessions_table.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/migrations/versions/6a88424799fe_update_users_with_auth_method.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/migrations/versions/8a3764fe7f1a_change_jsonb_to_json_for_prompts.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/migrations/versions/a20694b15f82_cost.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/migrations/versions/bb8139330879_create_project_trace_retention_policies_table.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/migrations/versions/bc8fea3c2bc8_add_prompt_tables.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/migrations/versions/cd164e83824f_users_and_tokens.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/migrations/versions/cf03bd6bae1d_init.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/pg_config.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/types/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/types/annotation_configs.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/types/db_models.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/types/identifier.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/types/model_provider.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/types/token_price_customization.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/types/trace_retention.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/exceptions.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/experiments/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/experiments/evaluators/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/experiments/evaluators/base.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/experiments/evaluators/code_evaluators.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/experiments/evaluators/llm_evaluators.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/experiments/evaluators/utils.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/experiments/functions.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/experiments/tracing.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/experiments/types.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/experiments/utils.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/inferences/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/inferences/errors.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/inferences/fixtures.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/inferences/inferences.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/inferences/schema.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/inferences/validation.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/logging/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/logging/_config.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/logging/_filter.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/logging/_formatter.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/metrics/README.md +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/metrics/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/metrics/binning.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/metrics/metrics.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/metrics/mixins.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/metrics/retrieval_metrics.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/metrics/timeseries.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/metrics/wrappers.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/pointcloud/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/pointcloud/clustering.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/pointcloud/pointcloud.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/pointcloud/projectors.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/pointcloud/umap_parameters.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/py.typed +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/README.md +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/auth.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/annotation_configs_by_project.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/annotation_summaries.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/average_experiment_repeated_run_group_latency.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/average_experiment_run_latency.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/cache/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/cache/two_tier_cache.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/dataset_example_revisions.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/dataset_example_spans.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/dataset_examples_and_versions_by_experiment_run.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/document_evaluation_summaries.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/document_evaluations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/document_retrieval_metrics.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/experiment_annotation_summaries.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/experiment_error_rates.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/experiment_repeated_run_group_annotation_summaries.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/experiment_repeated_run_groups.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/experiment_run_annotations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/experiment_run_counts.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/experiment_sequence_number.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/last_used_times_by_generative_model_id.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/latency_ms_quantile.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/min_start_or_max_end_times.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/num_child_spans.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/num_spans_per_trace.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/project_by_name.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/project_ids_by_trace_retention_policy_id.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/prompt_version_sequence_number.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/record_counts.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/session_io.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/session_num_traces.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/session_num_traces_with_error.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/session_token_usages.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/session_trace_latency_ms_quantile.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/span_annotations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/span_by_id.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/span_cost_by_span.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/span_cost_detail_summary_entries_by_generative_model.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/span_cost_detail_summary_entries_by_project_session.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/span_cost_detail_summary_entries_by_span.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/span_cost_detail_summary_entries_by_trace.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/span_cost_details_by_span_cost.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/span_cost_summary_by_experiment.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/span_cost_summary_by_experiment_repeated_run_group.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/span_cost_summary_by_experiment_run.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/span_cost_summary_by_generative_model.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/span_cost_summary_by_project.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/span_cost_summary_by_project_session.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/span_cost_summary_by_trace.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/span_costs.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/span_dataset_examples.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/span_descendants.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/span_projects.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/token_counts.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/trace_by_trace_ids.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/trace_retention_policy_id_by_project_id.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/trace_root_spans.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/types.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/user_roles.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/dataloaders/users.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/exceptions.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/helpers/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/helpers/annotations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/helpers/dataset_helpers.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/helpers/experiment_run_filters.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/helpers/playground_registry.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/helpers/playground_spans.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/helpers/prompts/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/helpers/prompts/conversions/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/helpers/prompts/conversions/anthropic.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/helpers/prompts/conversions/aws.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/helpers/prompts/conversions/openai.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/helpers/prompts/models.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/AddExamplesToDatasetInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/AddSpansToDatasetInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/ChatCompletionInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/ChatCompletionMessageInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/ClearProjectInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/ClusterInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/Coordinates.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/CreateDatasetInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/CreateProjectInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/CreateSpanAnnotationInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/CreateTraceAnnotationInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/DataQualityMetricInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/DatasetExampleInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/DatasetFilter.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/DatasetSort.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/DatasetVersionSort.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/DeleteAnnotationsInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/DeleteDatasetExamplesInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/DeleteDatasetInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/DeleteExperimentsInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/DimensionFilter.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/DimensionInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/GenerativeCredentialInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/GenerativeModelInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/Granularity.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/InvocationParameters.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/PatchAnnotationInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/PatchDatasetExamplesInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/PatchDatasetInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/PerformanceMetricInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/ProjectFilter.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/ProjectSessionSort.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/ProjectSort.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/PromptFilter.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/PromptTemplateOptions.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/PromptVersionInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/SpanAnnotationSort.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/SpanSort.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/TimeBinConfig.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/TimeRange.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/TraceAnnotationSort.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/UserRoleInput.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/input_types/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/interceptor.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/mutations/annotation_config_mutations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/mutations/api_key_mutations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/mutations/experiment_mutations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/mutations/export_events_mutations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/mutations/model_mutations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/mutations/project_mutations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/mutations/project_trace_retention_policy_mutations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/mutations/prompt_label_mutations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/mutations/prompt_mutations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/mutations/prompt_version_tag_mutations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/mutations/span_annotations_mutations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/mutations/trace_annotations_mutations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/mutations/trace_mutations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/mutations/user_mutations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/openapi/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/openapi/main.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/openapi/schema.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/routers/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/routers/embeddings.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/routers/utils.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/routers/v1/annotation_configs.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/routers/v1/documents.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/routers/v1/evaluations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/routers/v1/experiment_evaluations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/routers/v1/experiment_runs.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/routers/v1/models.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/routers/v1/projects.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/routers/v1/prompts.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/routers/v1/spans.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/routers/v1/utils.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/schema.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/Annotation.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/AnnotationConfig.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/AnnotationSource.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/AnnotationSummary.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/AnnotatorKind.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/ApiKey.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/AuthMethod.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/ChatCompletionMessageRole.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/ChatCompletionSubscriptionPayload.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/Cluster.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/CostBreakdown.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/CreateDatasetPayload.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/CronExpression.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/DataQualityMetric.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/DatasetExampleRevision.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/DatasetExperimentAnnotationSummary.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/DatasetValues.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/DatasetVersion.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/Dimension.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/DimensionDataType.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/DimensionShape.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/DimensionType.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/DimensionWithValue.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/DocumentAnnotation.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/DocumentEvaluationSummary.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/DocumentRetrievalMetrics.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/EmbeddingDimension.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/EmbeddingMetadata.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/EvaluationSummary.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/Event.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/EventMetadata.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/ExampleRevisionInterface.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/ExperimentAnnotationSummary.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/ExperimentComparison.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/ExperimentRepeatedRunGroup.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/ExperimentRepeatedRunGroupAnnotationSummary.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/ExperimentRun.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/ExperimentRunAnnotation.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/ExportedFile.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/Functionality.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/GenerativeModel.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/GenerativeProvider.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/Identifier.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/InferenceModel.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/Inferences.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/InferencesRole.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/LabelFraction.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/MimeType.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/ModelInterface.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/NumericRange.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/PerformanceMetric.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/PlaygroundModel.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/ProjectTraceRetentionPolicy.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/PromptLabel.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/PromptResponse.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/PromptVersion.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/PromptVersionTag.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/PromptVersionTemplate.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/ResponseFormat.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/Retrieval.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/ScalarDriftMetricEnum.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/Segments.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/ServerStatus.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/SortDir.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/SpanAnnotation.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/SpanCostDetailSummaryEntry.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/SpanCostSummary.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/SpanIOValue.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/SystemApiKey.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/TimeSeries.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/TokenCountPromptDetails.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/TokenPrice.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/TokenUsage.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/ToolDefinition.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/TraceAnnotation.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/UMAPPoints.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/User.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/UserApiKey.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/UserRole.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/ValidationResult.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/VectorDriftMetricEnum.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/node.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/types/pagination.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/api/utils.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/authorization.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/bearer_auth.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/cost_tracking/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/cost_tracking/cost_details_calculator.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/cost_tracking/cost_model_lookup.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/cost_tracking/helpers.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/cost_tracking/regex_specificity.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/cost_tracking/token_cost_calculator.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/daemons/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/daemons/db_disk_usage_monitor.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/daemons/generative_model_store.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/daemons/span_cost_calculator.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/dml_event_handler.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/email/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/email/sender.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/email/templates/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/email/templates/db_disk_usage_notification.html +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/email/templates/password_reset.html +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/email/templates/welcome.html +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/email/types.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/experiments/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/experiments/utils.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/grpc_server.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/jwt_store.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/main.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/middleware/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/middleware/gzip.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/oauth2.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/openapi/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/prometheus.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/rate_limiters.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/retention.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/session_filters.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/static/apple-touch-icon-114x114.png +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/static/apple-touch-icon-120x120.png +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/static/apple-touch-icon-144x144.png +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/static/apple-touch-icon-152x152.png +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/static/apple-touch-icon-180x180.png +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/static/apple-touch-icon-72x72.png +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/static/apple-touch-icon-76x76.png +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/static/apple-touch-icon.png +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/static/assets/vendor-BGzfc4EU.css +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/static/assets/vendor-three-BLWp5bic.js +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/static/favicon.ico +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/static/modernizr.js +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/telemetry.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/templates/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/templates/index.html +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/thread_server.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/server/types.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/services.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/session/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/session/client.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/session/data_extractor.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/session/evaluation.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/settings.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/attributes.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/dsl/README.md +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/dsl/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/dsl/filter.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/dsl/helpers.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/dsl/query.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/errors.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/evaluation_conventions.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/exporter.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/fixtures.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/otel.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/projects.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/schemas.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/span_evaluations.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/span_json_decoder.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/span_json_encoder.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/trace_dataset.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/utils.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/v1/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/v1/evaluation_pb2.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/trace/v1/evaluation_pb2.pyi +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/utilities/__init__.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/utilities/client.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/utilities/error_handling.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/utilities/json.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/utilities/logging.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/utilities/project.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/utilities/re.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/utilities/span_store.py +0 -0
- {arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/utilities/template_formatters.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: arize-phoenix
|
|
3
|
-
Version:
|
|
3
|
+
Version: 12.2.0
|
|
4
4
|
Summary: AI Observability and Evaluation
|
|
5
5
|
Project-URL: Documentation, https://arize.com/docs/phoenix/
|
|
6
6
|
Project-URL: Issues, https://github.com/Arize-ai/phoenix/issues
|
|
@@ -20,7 +20,7 @@ Requires-Python: <3.14,>=3.9
|
|
|
20
20
|
Requires-Dist: aioitertools
|
|
21
21
|
Requires-Dist: aiosqlite
|
|
22
22
|
Requires-Dist: alembic<2,>=1.3.0
|
|
23
|
-
Requires-Dist: arize-phoenix-client
|
|
23
|
+
Requires-Dist: arize-phoenix-client>=1.20.0
|
|
24
24
|
Requires-Dist: arize-phoenix-evals>=2.0.0
|
|
25
25
|
Requires-Dist: arize-phoenix-otel>=0.10.3
|
|
26
26
|
Requires-Dist: authlib
|
|
@@ -64,7 +64,7 @@ Requires-Dist: anthropic>=0.49.0; extra == 'container'
|
|
|
64
64
|
Requires-Dist: azure-identity; extra == 'container'
|
|
65
65
|
Requires-Dist: boto3; extra == 'container'
|
|
66
66
|
Requires-Dist: fast-hdbscan>=0.2.0; extra == 'container'
|
|
67
|
-
Requires-Dist: google-
|
|
67
|
+
Requires-Dist: google-genai; extra == 'container'
|
|
68
68
|
Requires-Dist: numba>=0.60.0; extra == 'container'
|
|
69
69
|
Requires-Dist: openai>=1.0.0; extra == 'container'
|
|
70
70
|
Requires-Dist: opentelemetry-exporter-otlp==1.33.1; extra == 'container'
|
|
@@ -58,7 +58,7 @@ dependencies = [
|
|
|
58
58
|
"fastapi",
|
|
59
59
|
"pydantic>=2.1.0", # exclude 2.0.* since it does not support the `json_encoders` configuration setting
|
|
60
60
|
"authlib",
|
|
61
|
-
"arize-phoenix-client",
|
|
61
|
+
"arize-phoenix-client>=1.20.0",
|
|
62
62
|
"email-validator",
|
|
63
63
|
"python-dateutil",
|
|
64
64
|
"prometheus_client",
|
|
@@ -121,7 +121,7 @@ pg = [
|
|
|
121
121
|
]
|
|
122
122
|
container = [
|
|
123
123
|
"anthropic>=0.49.0",
|
|
124
|
-
"google-
|
|
124
|
+
"google-genai",
|
|
125
125
|
"prometheus-client",
|
|
126
126
|
"openai>=1.0.0",
|
|
127
127
|
"azure-identity",
|
|
@@ -1147,16 +1147,10 @@ class DirectoryError(Exception):
|
|
|
1147
1147
|
super().__init__(message)
|
|
1148
1148
|
|
|
1149
1149
|
|
|
1150
|
-
# LEGACY: Regex for backward compatibility with host:port parsing in PHOENIX_POSTGRES_HOST
|
|
1151
|
-
_HOST_PORT_REGEX = re.compile(r"^[^:]+:\d{1,5}$")
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
1150
|
def get_env_postgres_connection_str() -> Optional[str]:
|
|
1155
1151
|
"""
|
|
1156
1152
|
Build PostgreSQL connection string from environment variables.
|
|
1157
|
-
|
|
1158
|
-
LEGACY: Supports host:port parsing in PHOENIX_POSTGRES_HOST for backward compatibility.
|
|
1159
|
-
""" # noqa: E501
|
|
1153
|
+
"""
|
|
1160
1154
|
if not (
|
|
1161
1155
|
(pg_host := getenv(ENV_PHOENIX_POSTGRES_HOST, "").rstrip("/"))
|
|
1162
1156
|
and (pg_user := getenv(ENV_PHOENIX_POSTGRES_USER))
|
|
@@ -1166,10 +1160,6 @@ def get_env_postgres_connection_str() -> Optional[str]:
|
|
|
1166
1160
|
pg_port = getenv(ENV_PHOENIX_POSTGRES_PORT)
|
|
1167
1161
|
pg_db = getenv(ENV_PHOENIX_POSTGRES_DB)
|
|
1168
1162
|
|
|
1169
|
-
if _HOST_PORT_REGEX.match(pg_host): # maintain backward compatibility
|
|
1170
|
-
pg_host, parsed_port = pg_host.split(":")
|
|
1171
|
-
pg_port = pg_port or parsed_port # use the explicitly set port if provided
|
|
1172
|
-
|
|
1173
1163
|
encoded_user = quote(pg_user)
|
|
1174
1164
|
encoded_password = quote(pg_password)
|
|
1175
1165
|
connection_str = f"postgresql://{encoded_user}:{encoded_password}@{pg_host}"
|
|
@@ -23,6 +23,7 @@ from phoenix.db.insertion.helpers import (
|
|
|
23
23
|
DataManipulationEvent,
|
|
24
24
|
should_calculate_span_cost,
|
|
25
25
|
)
|
|
26
|
+
from phoenix.db.insertion.session_annotation import SessionAnnotationQueueInserter
|
|
26
27
|
from phoenix.db.insertion.span import SpanInsertionEvent, insert_span
|
|
27
28
|
from phoenix.db.insertion.span_annotation import SpanAnnotationQueueInserter
|
|
28
29
|
from phoenix.db.insertion.trace_annotation import TraceAnnotationQueueInserter
|
|
@@ -272,10 +273,12 @@ class _QueueInserters:
|
|
|
272
273
|
self._span_annotations = SpanAnnotationQueueInserter(*args)
|
|
273
274
|
self._trace_annotations = TraceAnnotationQueueInserter(*args)
|
|
274
275
|
self._document_annotations = DocumentAnnotationQueueInserter(*args)
|
|
276
|
+
self._session_annotations = SessionAnnotationQueueInserter(*args)
|
|
275
277
|
self._queues = (
|
|
276
278
|
self._span_annotations,
|
|
277
279
|
self._trace_annotations,
|
|
278
280
|
self._document_annotations,
|
|
281
|
+
self._session_annotations,
|
|
279
282
|
)
|
|
280
283
|
|
|
281
284
|
async def insert(self) -> AsyncIterator[DmlEvent]:
|
|
@@ -312,6 +315,11 @@ class _QueueInserters:
|
|
|
312
315
|
async def _(self, item: Precursors.DocumentAnnotation) -> None:
|
|
313
316
|
await self._document_annotations.enqueue(item)
|
|
314
317
|
|
|
318
|
+
@_enqueue.register(Precursors.SessionAnnotation)
|
|
319
|
+
@_enqueue.register(Insertables.SessionAnnotation)
|
|
320
|
+
async def _(self, item: Precursors.SessionAnnotation) -> None:
|
|
321
|
+
await self._session_annotations.enqueue(item)
|
|
322
|
+
|
|
315
323
|
|
|
316
324
|
LLM_MODEL_NAME = SpanAttributes.LLM_MODEL_NAME
|
|
317
325
|
LLM_PROVIDER = SpanAttributes.LLM_PROVIDER
|
|
@@ -229,7 +229,7 @@ _CHILDLESS_RECORD_DELETION_GRACE_PERIOD_DAYS = 1
|
|
|
229
229
|
|
|
230
230
|
|
|
231
231
|
def _stmt_to_delete_expired_childless_records(
|
|
232
|
-
table: type[models.
|
|
232
|
+
table: type[models.HasId],
|
|
233
233
|
foreign_key: Union[InstrumentedAttribute[int], InstrumentedAttribute[Optional[int]]],
|
|
234
234
|
) -> ReturningDelete[tuple[int]]:
|
|
235
235
|
"""
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from collections.abc import Callable, Hashable, Iterable
|
|
2
2
|
from datetime import datetime
|
|
3
3
|
from enum import Enum
|
|
4
|
-
from typing import Any, Literal, Optional, TypeVar, Union
|
|
4
|
+
from typing import Any, Literal, Optional, Sequence, TypeVar, Union
|
|
5
5
|
|
|
6
6
|
import sqlalchemy as sa
|
|
7
7
|
from openinference.semconv.trace import (
|
|
@@ -10,16 +10,24 @@ from openinference.semconv.trace import (
|
|
|
10
10
|
SpanAttributes,
|
|
11
11
|
)
|
|
12
12
|
from sqlalchemy import (
|
|
13
|
+
Insert,
|
|
13
14
|
Integer,
|
|
14
15
|
Select,
|
|
15
16
|
SQLColumnExpression,
|
|
16
17
|
and_,
|
|
17
18
|
case,
|
|
18
19
|
distinct,
|
|
20
|
+
exists,
|
|
19
21
|
func,
|
|
22
|
+
insert,
|
|
23
|
+
literal,
|
|
24
|
+
or_,
|
|
20
25
|
select,
|
|
26
|
+
util,
|
|
21
27
|
)
|
|
28
|
+
from sqlalchemy.ext.asyncio import AsyncSession
|
|
22
29
|
from sqlalchemy.orm import QueryableAttribute
|
|
30
|
+
from sqlalchemy.sql.roles import InElementRole
|
|
23
31
|
from typing_extensions import assert_never
|
|
24
32
|
|
|
25
33
|
from phoenix.config import PLAYGROUND_PROJECT_NAME
|
|
@@ -118,51 +126,205 @@ def dedup(
|
|
|
118
126
|
return ans
|
|
119
127
|
|
|
120
128
|
|
|
121
|
-
def
|
|
129
|
+
def _build_ranked_revisions_query(
|
|
122
130
|
dataset_version_id: int,
|
|
123
|
-
|
|
124
|
-
|
|
131
|
+
/,
|
|
132
|
+
*,
|
|
133
|
+
dataset_id: Optional[int] = None,
|
|
134
|
+
example_ids: Optional[Union[Sequence[int], InElementRole]] = None,
|
|
135
|
+
) -> Select[tuple[int]]:
|
|
136
|
+
"""
|
|
137
|
+
Build a query that ranks revisions per example within a dataset version.
|
|
138
|
+
|
|
139
|
+
This performs the core ranking logic using ROW_NUMBER() to find the latest
|
|
140
|
+
revision for each example within the specified dataset version.
|
|
141
|
+
|
|
142
|
+
Args:
|
|
143
|
+
dataset_version_id: Maximum dataset version to consider
|
|
144
|
+
dataset_id: Optional dataset ID - if provided, avoids subquery lookup
|
|
145
|
+
|
|
146
|
+
Returns:
|
|
147
|
+
SQLAlchemy SELECT query with revision ranking and basic dataset filtering
|
|
148
|
+
"""
|
|
149
|
+
stmt = (
|
|
125
150
|
select(
|
|
126
|
-
|
|
127
|
-
|
|
151
|
+
func.row_number()
|
|
152
|
+
.over(
|
|
153
|
+
partition_by=models.DatasetExampleRevision.dataset_example_id,
|
|
154
|
+
order_by=models.DatasetExampleRevision.dataset_version_id.desc(),
|
|
155
|
+
)
|
|
156
|
+
.label("rn"),
|
|
128
157
|
)
|
|
129
|
-
.
|
|
130
|
-
.
|
|
158
|
+
.join(models.DatasetExample)
|
|
159
|
+
.where(models.DatasetExampleRevision.dataset_version_id <= dataset_version_id)
|
|
131
160
|
)
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
.join_from(
|
|
139
|
-
table,
|
|
140
|
-
models.DatasetExample,
|
|
141
|
-
table.dataset_example_id == models.DatasetExample.id,
|
|
161
|
+
|
|
162
|
+
if dataset_id is None:
|
|
163
|
+
version_subquery = (
|
|
164
|
+
select(models.DatasetVersion.dataset_id)
|
|
165
|
+
.filter_by(id=dataset_version_id)
|
|
166
|
+
.scalar_subquery()
|
|
142
167
|
)
|
|
143
|
-
.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
168
|
+
stmt = stmt.where(models.DatasetExample.dataset_id == version_subquery)
|
|
169
|
+
else:
|
|
170
|
+
stmt = stmt.where(models.DatasetExample.dataset_id == dataset_id)
|
|
171
|
+
|
|
172
|
+
if example_ids is not None:
|
|
173
|
+
stmt = stmt.where(models.DatasetExampleRevision.dataset_example_id.in_(example_ids))
|
|
174
|
+
|
|
175
|
+
return stmt
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
def get_dataset_example_revisions(
|
|
179
|
+
dataset_version_id: int,
|
|
180
|
+
/,
|
|
181
|
+
*,
|
|
182
|
+
dataset_id: Optional[int] = None,
|
|
183
|
+
example_ids: Optional[Union[Sequence[int], InElementRole]] = None,
|
|
184
|
+
split_ids: Optional[Union[Sequence[int], InElementRole]] = None,
|
|
185
|
+
split_names: Optional[Union[Sequence[str], InElementRole]] = None,
|
|
186
|
+
) -> Select[tuple[models.DatasetExampleRevision]]:
|
|
187
|
+
"""
|
|
188
|
+
Get the latest revisions for all dataset examples within a specific dataset version.
|
|
189
|
+
|
|
190
|
+
Excludes examples where the latest revision is a DELETE.
|
|
191
|
+
|
|
192
|
+
Args:
|
|
193
|
+
dataset_version_id: The dataset version to get revisions for
|
|
194
|
+
dataset_id: Optional dataset ID - if provided, avoids extra subquery lookup
|
|
195
|
+
example_ids: Optional filter by specific example IDs (subquery or list of IDs).
|
|
196
|
+
- None = no filtering
|
|
197
|
+
- Empty sequences/subqueries = no matches (strict filtering)
|
|
198
|
+
split_ids: Optional filter by split IDs (subquery or list of split IDs).
|
|
199
|
+
- None = no filtering
|
|
200
|
+
- Empty sequences/subqueries = no matches (strict filtering)
|
|
201
|
+
split_names: Optional filter by split names (subquery or list of split names).
|
|
202
|
+
- None = no filtering
|
|
203
|
+
- Empty sequences/subqueries = no matches (strict filtering)
|
|
204
|
+
|
|
205
|
+
Note:
|
|
206
|
+
- split_ids and split_names are mutually exclusive
|
|
207
|
+
- Use split_ids for better performance when IDs are available (avoids JOIN)
|
|
208
|
+
- Empty filters use strict behavior: empty inputs return zero results
|
|
209
|
+
"""
|
|
210
|
+
if split_ids is not None and split_names is not None:
|
|
211
|
+
raise ValueError(
|
|
212
|
+
"Cannot specify both split_ids and split_names - they are mutually exclusive"
|
|
147
213
|
)
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
214
|
+
|
|
215
|
+
stmt = _build_ranked_revisions_query(
|
|
216
|
+
dataset_version_id,
|
|
217
|
+
dataset_id=dataset_id,
|
|
218
|
+
example_ids=example_ids,
|
|
219
|
+
).add_columns(
|
|
220
|
+
models.DatasetExampleRevision.id,
|
|
221
|
+
models.DatasetExampleRevision.revision_kind,
|
|
152
222
|
)
|
|
223
|
+
|
|
224
|
+
if split_ids is not None or split_names is not None:
|
|
225
|
+
if split_names is not None:
|
|
226
|
+
split_example_ids_subquery = (
|
|
227
|
+
select(models.DatasetSplitDatasetExample.dataset_example_id)
|
|
228
|
+
.join(
|
|
229
|
+
models.DatasetSplit,
|
|
230
|
+
models.DatasetSplit.id == models.DatasetSplitDatasetExample.dataset_split_id,
|
|
231
|
+
)
|
|
232
|
+
.where(models.DatasetSplit.name.in_(split_names))
|
|
233
|
+
)
|
|
234
|
+
stmt = stmt.where(models.DatasetExample.id.in_(split_example_ids_subquery))
|
|
235
|
+
else:
|
|
236
|
+
assert split_ids is not None
|
|
237
|
+
split_example_ids_subquery = select(
|
|
238
|
+
models.DatasetSplitDatasetExample.dataset_example_id
|
|
239
|
+
).where(models.DatasetSplitDatasetExample.dataset_split_id.in_(split_ids))
|
|
240
|
+
stmt = stmt.where(models.DatasetExample.id.in_(split_example_ids_subquery))
|
|
241
|
+
|
|
242
|
+
ranked_subquery = stmt.subquery()
|
|
153
243
|
return (
|
|
154
|
-
select(
|
|
155
|
-
.where(table.revision_kind != "DELETE")
|
|
244
|
+
select(models.DatasetExampleRevision)
|
|
156
245
|
.join(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
246
|
+
ranked_subquery,
|
|
247
|
+
models.DatasetExampleRevision.id == ranked_subquery.c.id,
|
|
248
|
+
)
|
|
249
|
+
.where(
|
|
250
|
+
ranked_subquery.c.rn == 1,
|
|
251
|
+
ranked_subquery.c.revision_kind != "DELETE",
|
|
162
252
|
)
|
|
163
253
|
)
|
|
164
254
|
|
|
165
255
|
|
|
256
|
+
def create_experiment_examples_snapshot_insert(
|
|
257
|
+
experiment: models.Experiment,
|
|
258
|
+
) -> Insert:
|
|
259
|
+
"""
|
|
260
|
+
Create an INSERT statement to snapshot dataset examples for an experiment.
|
|
261
|
+
|
|
262
|
+
This captures which examples belong to the experiment at the time of creation,
|
|
263
|
+
respecting any dataset splits assigned to the experiment.
|
|
264
|
+
|
|
265
|
+
Args:
|
|
266
|
+
experiment: The experiment to create the snapshot for
|
|
267
|
+
|
|
268
|
+
Returns:
|
|
269
|
+
SQLAlchemy INSERT statement ready for execution
|
|
270
|
+
"""
|
|
271
|
+
stmt = _build_ranked_revisions_query(
|
|
272
|
+
experiment.dataset_version_id,
|
|
273
|
+
dataset_id=experiment.dataset_id,
|
|
274
|
+
).add_columns(
|
|
275
|
+
models.DatasetExampleRevision.id,
|
|
276
|
+
models.DatasetExampleRevision.dataset_example_id,
|
|
277
|
+
models.DatasetExampleRevision.revision_kind,
|
|
278
|
+
)
|
|
279
|
+
|
|
280
|
+
experiment_splits_subquery = select(models.ExperimentDatasetSplit.dataset_split_id).where(
|
|
281
|
+
models.ExperimentDatasetSplit.experiment_id == experiment.id
|
|
282
|
+
)
|
|
283
|
+
has_splits_condition = exists(experiment_splits_subquery)
|
|
284
|
+
split_filtered_example_ids = select(models.DatasetSplitDatasetExample.dataset_example_id).where(
|
|
285
|
+
models.DatasetSplitDatasetExample.dataset_split_id.in_(experiment_splits_subquery)
|
|
286
|
+
)
|
|
287
|
+
|
|
288
|
+
stmt = stmt.where(
|
|
289
|
+
or_(
|
|
290
|
+
~has_splits_condition, # No splits = include all examples
|
|
291
|
+
models.DatasetExampleRevision.dataset_example_id.in_(
|
|
292
|
+
split_filtered_example_ids
|
|
293
|
+
), # Has splits = filter by splits
|
|
294
|
+
)
|
|
295
|
+
)
|
|
296
|
+
|
|
297
|
+
ranked_subquery = stmt.subquery()
|
|
298
|
+
return insert(models.ExperimentDatasetExample).from_select(
|
|
299
|
+
[
|
|
300
|
+
models.ExperimentDatasetExample.experiment_id,
|
|
301
|
+
models.ExperimentDatasetExample.dataset_example_id,
|
|
302
|
+
models.ExperimentDatasetExample.dataset_example_revision_id,
|
|
303
|
+
],
|
|
304
|
+
select(
|
|
305
|
+
literal(experiment.id),
|
|
306
|
+
ranked_subquery.c.dataset_example_id,
|
|
307
|
+
ranked_subquery.c.id,
|
|
308
|
+
).where(
|
|
309
|
+
ranked_subquery.c.rn == 1,
|
|
310
|
+
ranked_subquery.c.revision_kind != "DELETE",
|
|
311
|
+
),
|
|
312
|
+
)
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
async def insert_experiment_with_examples_snapshot(
|
|
316
|
+
session: AsyncSession,
|
|
317
|
+
experiment: models.Experiment,
|
|
318
|
+
) -> None:
|
|
319
|
+
"""
|
|
320
|
+
Insert an experiment with its snapshot of dataset examples.
|
|
321
|
+
"""
|
|
322
|
+
session.add(experiment)
|
|
323
|
+
await session.flush()
|
|
324
|
+
insert_stmt = create_experiment_examples_snapshot_insert(experiment)
|
|
325
|
+
await session.execute(insert_stmt)
|
|
326
|
+
|
|
327
|
+
|
|
166
328
|
_AnyTuple = TypeVar("_AnyTuple", bound=tuple[Any, ...])
|
|
167
329
|
|
|
168
330
|
|
|
@@ -355,3 +517,10 @@ def get_ancestor_span_rowids(parent_id: str) -> Select[tuple[int]]:
|
|
|
355
517
|
)
|
|
356
518
|
)
|
|
357
519
|
return select(ancestors.c.id)
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
def truncate_name(name: str, max_len: int = 63) -> str:
|
|
523
|
+
# https://github.com/sqlalchemy/sqlalchemy/blob/e263825e3c5060bf4f47eed0e833c6660a31658e/lib/sqlalchemy/sql/compiler.py#L7844-L7845
|
|
524
|
+
if len(name) > max_len:
|
|
525
|
+
return name[0 : max_len - 8] + "_" + util.md5_hex(name)[-4:]
|
|
526
|
+
return name
|
|
@@ -44,6 +44,7 @@ async def insert_dataset(
|
|
|
44
44
|
description: Optional[str] = None,
|
|
45
45
|
metadata: Optional[Mapping[str, Any]] = None,
|
|
46
46
|
created_at: Optional[datetime] = None,
|
|
47
|
+
user_id: Optional[int] = None,
|
|
47
48
|
) -> DatasetId:
|
|
48
49
|
id_ = await session.scalar(
|
|
49
50
|
insert(models.Dataset)
|
|
@@ -52,6 +53,7 @@ async def insert_dataset(
|
|
|
52
53
|
description=description,
|
|
53
54
|
metadata_=metadata,
|
|
54
55
|
created_at=created_at,
|
|
56
|
+
user_id=user_id,
|
|
55
57
|
)
|
|
56
58
|
.returning(models.Dataset.id)
|
|
57
59
|
)
|
|
@@ -64,6 +66,7 @@ async def insert_dataset_version(
|
|
|
64
66
|
description: Optional[str] = None,
|
|
65
67
|
metadata: Optional[Mapping[str, Any]] = None,
|
|
66
68
|
created_at: Optional[datetime] = None,
|
|
69
|
+
user_id: Optional[int] = None,
|
|
67
70
|
) -> DatasetVersionId:
|
|
68
71
|
id_ = await session.scalar(
|
|
69
72
|
insert(models.DatasetVersion)
|
|
@@ -72,6 +75,7 @@ async def insert_dataset_version(
|
|
|
72
75
|
description=description,
|
|
73
76
|
metadata_=metadata,
|
|
74
77
|
created_at=created_at,
|
|
78
|
+
user_id=user_id,
|
|
75
79
|
)
|
|
76
80
|
.returning(models.DatasetVersion.id)
|
|
77
81
|
)
|
|
@@ -152,6 +156,7 @@ async def add_dataset_examples(
|
|
|
152
156
|
description: Optional[str] = None,
|
|
153
157
|
metadata: Optional[Mapping[str, Any]] = None,
|
|
154
158
|
action: DatasetAction = DatasetAction.CREATE,
|
|
159
|
+
user_id: Optional[int] = None,
|
|
155
160
|
) -> Optional[DatasetExampleAdditionEvent]:
|
|
156
161
|
created_at = datetime.now(timezone.utc)
|
|
157
162
|
dataset_id: Optional[DatasetId] = None
|
|
@@ -167,6 +172,7 @@ async def add_dataset_examples(
|
|
|
167
172
|
description=description,
|
|
168
173
|
metadata=metadata,
|
|
169
174
|
created_at=created_at,
|
|
175
|
+
user_id=user_id,
|
|
170
176
|
)
|
|
171
177
|
except Exception:
|
|
172
178
|
logger.exception(f"Failed to insert dataset: {name=}")
|
|
@@ -176,6 +182,7 @@ async def add_dataset_examples(
|
|
|
176
182
|
session=session,
|
|
177
183
|
dataset_id=dataset_id,
|
|
178
184
|
created_at=created_at,
|
|
185
|
+
user_id=user_id,
|
|
179
186
|
)
|
|
180
187
|
except Exception:
|
|
181
188
|
logger.exception(f"Failed to insert dataset version for {dataset_id=}")
|
{arize_phoenix-11.38.0 → arize_phoenix-12.2.0}/src/phoenix/db/insertion/document_annotation.py
RENAMED
|
@@ -181,7 +181,7 @@ def _key(p: Received[Precursors.DocumentAnnotation]) -> _Key:
|
|
|
181
181
|
|
|
182
182
|
|
|
183
183
|
def _unique_by(p: Received[Insertables.DocumentAnnotation]) -> _UniqueBy:
|
|
184
|
-
return p.item.obj.name, p.item.span_rowid, p.item.document_position, p.item.identifier
|
|
184
|
+
return p.item.obj.name, p.item.span_rowid, p.item.document_position, p.item.obj.identifier
|
|
185
185
|
|
|
186
186
|
|
|
187
187
|
def _time(p: Received[Any]) -> datetime:
|
|
@@ -12,7 +12,7 @@ from sqlalchemy.sql.elements import KeyedColumnElement
|
|
|
12
12
|
from typing_extensions import TypeAlias, assert_never
|
|
13
13
|
|
|
14
14
|
from phoenix.db import models
|
|
15
|
-
from phoenix.db.helpers import SupportedSQLDialect
|
|
15
|
+
from phoenix.db.helpers import SupportedSQLDialect, truncate_name
|
|
16
16
|
from phoenix.db.models import Base
|
|
17
17
|
from phoenix.trace.attributes import get_attribute_value
|
|
18
18
|
|
|
@@ -53,7 +53,7 @@ def insert_on_conflict(
|
|
|
53
53
|
unique_records.append(v)
|
|
54
54
|
seen.add(k)
|
|
55
55
|
records = tuple(reversed(unique_records))
|
|
56
|
-
constraint = constraint_name or "_".join(("uq", table.__tablename__, *unique_by))
|
|
56
|
+
constraint = constraint_name or truncate_name("_".join(("uq", table.__tablename__, *unique_by)))
|
|
57
57
|
if dialect is SupportedSQLDialect.POSTGRESQL:
|
|
58
58
|
stmt_postgresql = insert_postgresql(table).values(records)
|
|
59
59
|
if on_conflict is OnConflict.DO_NOTHING:
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from datetime import datetime
|
|
3
|
+
from typing import Any, NamedTuple, Optional
|
|
4
|
+
|
|
5
|
+
from sqlalchemy import Row, Select, and_, select, tuple_
|
|
6
|
+
from sqlalchemy.ext.asyncio import AsyncSession
|
|
7
|
+
from typing_extensions import TypeAlias
|
|
8
|
+
|
|
9
|
+
from phoenix.db import models
|
|
10
|
+
from phoenix.db.helpers import dedup
|
|
11
|
+
from phoenix.db.insertion.helpers import as_kv
|
|
12
|
+
from phoenix.db.insertion.types import (
|
|
13
|
+
Insertables,
|
|
14
|
+
Postponed,
|
|
15
|
+
Precursors,
|
|
16
|
+
QueueInserter,
|
|
17
|
+
Received,
|
|
18
|
+
)
|
|
19
|
+
from phoenix.server.dml_event import ProjectSessionAnnotationDmlEvent
|
|
20
|
+
|
|
21
|
+
# Type alias for consistency with other annotation patterns
|
|
22
|
+
SessionAnnotationDmlEvent = ProjectSessionAnnotationDmlEvent
|
|
23
|
+
|
|
24
|
+
_Name: TypeAlias = str
|
|
25
|
+
_SessionId: TypeAlias = str
|
|
26
|
+
_SessionRowId: TypeAlias = int
|
|
27
|
+
_AnnoRowId: TypeAlias = int
|
|
28
|
+
_Identifier: TypeAlias = str
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class _Key(NamedTuple):
|
|
32
|
+
annotation_name: _Name
|
|
33
|
+
annotation_identifier: _Identifier
|
|
34
|
+
session_id: _SessionId
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
_UniqueBy: TypeAlias = tuple[_Name, _SessionRowId, _Identifier]
|
|
38
|
+
_Existing: TypeAlias = tuple[
|
|
39
|
+
_SessionRowId,
|
|
40
|
+
_SessionId,
|
|
41
|
+
Optional[_AnnoRowId],
|
|
42
|
+
Optional[_Name],
|
|
43
|
+
Optional[datetime],
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class SessionAnnotationQueueInserter(
|
|
48
|
+
QueueInserter[
|
|
49
|
+
Precursors.SessionAnnotation,
|
|
50
|
+
Insertables.SessionAnnotation,
|
|
51
|
+
models.ProjectSessionAnnotation,
|
|
52
|
+
SessionAnnotationDmlEvent,
|
|
53
|
+
],
|
|
54
|
+
table=models.ProjectSessionAnnotation,
|
|
55
|
+
unique_by=("name", "project_session_id", "identifier"),
|
|
56
|
+
):
|
|
57
|
+
async def _events(
|
|
58
|
+
self,
|
|
59
|
+
session: AsyncSession,
|
|
60
|
+
*insertions: Insertables.SessionAnnotation,
|
|
61
|
+
) -> list[SessionAnnotationDmlEvent]:
|
|
62
|
+
records = [{**dict(as_kv(ins.row)), "updated_at": ins.row.updated_at} for ins in insertions]
|
|
63
|
+
stmt = self._insert_on_conflict(*records).returning(self.table.id)
|
|
64
|
+
ids = tuple([_ async for _ in await session.stream_scalars(stmt)])
|
|
65
|
+
return [SessionAnnotationDmlEvent(ids)]
|
|
66
|
+
|
|
67
|
+
async def _partition(
|
|
68
|
+
self,
|
|
69
|
+
session: AsyncSession,
|
|
70
|
+
*parcels: Received[Precursors.SessionAnnotation],
|
|
71
|
+
) -> tuple[
|
|
72
|
+
list[Received[Insertables.SessionAnnotation]],
|
|
73
|
+
list[Postponed[Precursors.SessionAnnotation]],
|
|
74
|
+
list[Received[Precursors.SessionAnnotation]],
|
|
75
|
+
]:
|
|
76
|
+
to_insert: list[Received[Insertables.SessionAnnotation]] = []
|
|
77
|
+
to_postpone: list[Postponed[Precursors.SessionAnnotation]] = []
|
|
78
|
+
to_discard: list[Received[Precursors.SessionAnnotation]] = []
|
|
79
|
+
|
|
80
|
+
stmt = self._select_existing(*map(_key, parcels))
|
|
81
|
+
existing: list[Row[_Existing]] = [_ async for _ in await session.stream(stmt)]
|
|
82
|
+
existing_sessions: Mapping[str, _SessionAttr] = {
|
|
83
|
+
e.session_id: _SessionAttr(e.session_rowid) for e in existing
|
|
84
|
+
}
|
|
85
|
+
existing_annos: Mapping[_Key, _AnnoAttr] = {
|
|
86
|
+
_Key(
|
|
87
|
+
annotation_name=e.name,
|
|
88
|
+
annotation_identifier=e.identifier,
|
|
89
|
+
session_id=e.session_id,
|
|
90
|
+
): _AnnoAttr(e.session_rowid, e.id, e.updated_at)
|
|
91
|
+
for e in existing
|
|
92
|
+
if e.id is not None and e.name is not None and e.updated_at is not None
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
for p in parcels:
|
|
96
|
+
if (anno := existing_annos.get(_key(p))) is not None:
|
|
97
|
+
if p.item.updated_at <= anno.updated_at:
|
|
98
|
+
to_discard.append(p)
|
|
99
|
+
else:
|
|
100
|
+
to_insert.append(
|
|
101
|
+
Received(
|
|
102
|
+
received_at=p.received_at,
|
|
103
|
+
item=p.item.as_insertable(
|
|
104
|
+
project_session_rowid=anno.session_rowid,
|
|
105
|
+
),
|
|
106
|
+
)
|
|
107
|
+
)
|
|
108
|
+
elif (existing_session := existing_sessions.get(p.item.session_id)) is not None:
|
|
109
|
+
to_insert.append(
|
|
110
|
+
Received(
|
|
111
|
+
received_at=p.received_at,
|
|
112
|
+
item=p.item.as_insertable(
|
|
113
|
+
project_session_rowid=existing_session.session_rowid,
|
|
114
|
+
),
|
|
115
|
+
)
|
|
116
|
+
)
|
|
117
|
+
elif isinstance(p, Postponed):
|
|
118
|
+
if p.retries_left > 1:
|
|
119
|
+
to_postpone.append(p.postpone(p.retries_left - 1))
|
|
120
|
+
else:
|
|
121
|
+
to_discard.append(p)
|
|
122
|
+
elif isinstance(p, Received):
|
|
123
|
+
to_postpone.append(p.postpone(self._retry_allowance))
|
|
124
|
+
else:
|
|
125
|
+
to_discard.append(p)
|
|
126
|
+
|
|
127
|
+
assert len(to_insert) + len(to_postpone) + len(to_discard) == len(parcels)
|
|
128
|
+
to_insert = dedup(sorted(to_insert, key=_time, reverse=True), _unique_by)[::-1]
|
|
129
|
+
return to_insert, to_postpone, to_discard
|
|
130
|
+
|
|
131
|
+
def _select_existing(self, *keys: _Key) -> Select[_Existing]:
|
|
132
|
+
anno = self.table
|
|
133
|
+
session = (
|
|
134
|
+
select(models.ProjectSession.id, models.ProjectSession.session_id)
|
|
135
|
+
.where(models.ProjectSession.session_id.in_({k.session_id for k in keys}))
|
|
136
|
+
.cte()
|
|
137
|
+
)
|
|
138
|
+
onclause = and_(
|
|
139
|
+
session.c.id == anno.project_session_id,
|
|
140
|
+
anno.name.in_({k.annotation_name for k in keys}),
|
|
141
|
+
tuple_(anno.name, anno.identifier, session.c.session_id).in_(keys),
|
|
142
|
+
)
|
|
143
|
+
return select(
|
|
144
|
+
session.c.id.label("session_rowid"),
|
|
145
|
+
session.c.session_id,
|
|
146
|
+
anno.id,
|
|
147
|
+
anno.name,
|
|
148
|
+
anno.identifier,
|
|
149
|
+
anno.updated_at,
|
|
150
|
+
).outerjoin_from(session, anno, onclause)
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
class _SessionAttr(NamedTuple):
|
|
154
|
+
session_rowid: _SessionRowId
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
class _AnnoAttr(NamedTuple):
|
|
158
|
+
session_rowid: _SessionRowId
|
|
159
|
+
id_: _AnnoRowId
|
|
160
|
+
updated_at: datetime
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
def _key(p: Received[Precursors.SessionAnnotation]) -> _Key:
|
|
164
|
+
return _Key(
|
|
165
|
+
annotation_name=p.item.obj.name,
|
|
166
|
+
annotation_identifier=p.item.obj.identifier,
|
|
167
|
+
session_id=p.item.session_id,
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
def _unique_by(p: Received[Insertables.SessionAnnotation]) -> _UniqueBy:
|
|
172
|
+
return p.item.obj.name, p.item.project_session_rowid, p.item.obj.identifier
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def _time(p: Received[Any]) -> datetime:
|
|
176
|
+
return p.received_at
|
|
@@ -167,7 +167,7 @@ def _key(p: Received[Precursors.SpanAnnotation]) -> _Key:
|
|
|
167
167
|
|
|
168
168
|
|
|
169
169
|
def _unique_by(p: Received[Insertables.SpanAnnotation]) -> _UniqueBy:
|
|
170
|
-
return p.item.obj.name, p.item.span_rowid, p.item.identifier
|
|
170
|
+
return p.item.obj.name, p.item.span_rowid, p.item.obj.identifier
|
|
171
171
|
|
|
172
172
|
|
|
173
173
|
def _time(p: Received[Any]) -> datetime:
|
|
@@ -166,7 +166,7 @@ def _key(p: Received[Precursors.TraceAnnotation]) -> _Key:
|
|
|
166
166
|
|
|
167
167
|
|
|
168
168
|
def _unique_by(p: Received[Insertables.TraceAnnotation]) -> _UniqueBy:
|
|
169
|
-
return p.item.obj.name, p.item.trace_rowid, p.item.identifier
|
|
169
|
+
return p.item.obj.name, p.item.trace_rowid, p.item.obj.identifier
|
|
170
170
|
|
|
171
171
|
|
|
172
172
|
def _time(p: Received[Any]) -> datetime:
|