Add an SDK for search sessions to get complete sessions#20288
Add an SDK for search sessions to get complete sessions#20288B-Step62 merged 8 commits intomlflow:masterfrom
Conversation
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
🛠 DevTools 🛠
Install mlflow from this PRFor Databricks, use the following command: |
|
@B-Step62 I'm going to do docs as a follow-up, but curious if you think we should document this standalone (similar to the search traces page) or if we should just reference it in multi-turn docs and rely on API reference? It is not the most efficient API + is experimental. |
|
Documentation preview for 5f358ee is available at: More info
|
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
|
|
||
| # Flatten sessions for evaluation if needed | ||
| all_traces = [trace for session in sessions for trace in session] | ||
| mlflow.genai.evaluate(data=all_traces) |
There was a problem hiding this comment.
@B-Step62 one thought here - should we make evaluate take a list[list[trace]]? Not sure if I'll keep this example in the current state as it requires flattening.
There was a problem hiding this comment.
I think that's a good idea, maybe not too urgent tho given list[trace] doesn't have a lot of usage today.
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
Signed-off-by: Samraj Moorjani <samraj.moorjani@databricks.com>
B-Step62
left a comment
There was a problem hiding this comment.
LGTM! Can you address #20288 (comment) in a follow-up?
Related Issues/PRs
#xxxWhat changes are proposed in this pull request?
This PR introduces a
search_sessionsAPI proposed to ensure we can get full conversations which is a gap in the currentsearch_tracesAPI which does not guarantee completeness.How is this PR tested?
Result:

Does this PR require documentation update?
Release Notes
Is this a user-facing change?
Add an SDK for search sessions to get complete sessions from an experiment.
What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/tracking: Tracking Service, tracking client APIs, autologgingarea/models: MLmodel format, model serialization/deserialization, flavorsarea/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registryarea/scoring: MLflow Model server, model deployment tools, Spark UDFsarea/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflowsarea/gateway: MLflow AI Gateway client APIs, server, and third-party integrationsarea/prompts: MLflow prompt engineering features, prompt templates, and prompt managementarea/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionalityarea/projects: MLproject format, project running backendsarea/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/build: Build and test infrastructure for MLflowarea/docs: MLflow documentation pagesHow should the PR be classified in the release notes? Choose one:
rn/none- No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" sectionrn/breaking-change- The PR will be mentioned in the "Breaking Changes" sectionrn/feature- A new user-facing feature worth mentioning in the release notesrn/bug-fix- A user-facing bug fix worth mentioning in the release notesrn/documentation- A user-facing documentation change worth mentioning in the release notesShould this PR be included in the next patch release?
Yesshould be selected for bug fixes, documentation updates, and other small changes.Noshould be selected for new features and larger changes. If you're unsure about the release classification of this PR, leave this unchecked to let the maintainers decide.What is a minor/patch release?
Bug fixes, doc updates and new features usually go into minor releases.
Bug fixes and doc updates usually go into patch releases.