[Bug fix] Traces UI: Support filtering on assessments with multiple values (e.g. error and boolean)#19262
Conversation
Signed-off-by: dbczumar <corey.zumar@databricks.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where assessments containing errors could not be used in search filters. The fix enables backend filtering for assessments that have multiple values (some with errors, some without).
- Changed assessment dtype determination to iterate through all assessments instead of just checking the first one
- Disabled client-side filtering for assessments in OSS MLflow, moving filtering to the backend
- Updated tests to verify backend filtering behavior
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| AggregationUtils.ts | Modified dtype determination and unique value collection to iterate through all assessments, properly handling cases where some assessments have errors and others have values |
| useMlflowTraces.tsx | Disabled client-side filtering for assessments in OSS MLflow by hardcoding useClientSideFiltering to false, ensuring all filters including assessments are sent to the backend |
| useMlflowTraces.test.tsx | Updated tests to verify assessment filters are sent to backend instead of being filtered client-side, and added separate test for search query filtering |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ...retrievalAssessmentsByName, | ||
| ]) { | ||
| assessmentNames.add(assessmentName); | ||
| const assessment = assessments[0]; |
There was a problem hiding this comment.
Previously, because we only looked at the first assessment when computing the available values for filtering, if the first value logged for an assessment as an error and the second value was something else (e.g. true / false) due to a retry, the UI wouldn't allow you to filter by the second value.
(See PR description for before / after)
| // Client-side filtering is always disabled in OSS MLflow. It is only used in Databricks. | ||
| const useClientSideFiltering = false; |
There was a problem hiding this comment.
Since the OSS backend now supports assessment filtering, we don't need client side filtering in OSS anymore.
Since we still require client side filtering on Databricks, I kept the useClientSideFiltering logic and set the value to false in OSS (we can set a different value on Databricks in an edge block).
| ? runValue.overallAssessments ?? [] | ||
| : runValue.responseAssessmentsByName[assessmentName] ?? []; |
There was a problem hiding this comment.
For client-side filtering logic (still applicable on Databricks), we should be looking at all values of an assessment when applying a filter, not just the first.
|
Documentation preview for a7ad0a4 is available at: More info
|
Signed-off-by: dbczumar <corey.zumar@databricks.com>
The filter dropdown for assessments now shows the Error option when assessmentInfo.containsErrors is true, similar to how bar charts already handle it. Signed-off-by: dbczumar <corey.zumar@databricks.com>
getAssessmentValueLabel now handles error value at the start of the function, before checking dtype. Previously, for boolean dtype assessments, ERROR_KEY would fall through to the else branch and render as "null" instead of "Error". Uses a local constant to avoid circular dependency with AggregationUtils. Signed-off-by: dbczumar <corey.zumar@databricks.com>
Tests verify that ERROR_VALUE ('Error') is handled correctly regardless
of the assessment dtype (boolean, pass-fail, etc).
Signed-off-by: dbczumar <corey.zumar@databricks.com>
🛠 DevTools 🛠
Install mlflow from this PR
For Databricks, use the following command:
Related Issues/PRs
#xxxWhat changes are proposed in this pull request?
Traces UI: Support filtering on assessments with multiple values (e.g. error and boolean)
How is this PR tested?
Before
Screen.Recording.2025-12-07.at.4.44.37.PM.mov
After
Screen.Recording.2025-12-07.at.4.43.32.PM.mov
Does this PR require documentation update?
Release Notes
Fixed a bug that prevented assessments from being used in search filters if they contained errors
Is this a user-facing change?
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.