Initial query trace metrics for traces view#19191
Conversation
|
Documentation preview for 0469093 is available at: More info
|
18a9982 to
e12e73a
Compare
899e657 to
e853752
Compare
|
/review ✅ Review completed. Review OutputPerfect! I've completed the PR review and added comments for all the issues I found. Let me provide a summary: PR Review SummaryI've reviewed PR #19191 "Initial query trace metrics for traces view" and found 3 code quality issues: Issues Found:
All comments have been posted to the PR with specific suggestions for fixes. The review focused on:
The overall implementation looks solid - these are relatively minor issues around edge cases and code clarity. |
0614e63 to
b6b9f84
Compare
e853752 to
3dee3ba
Compare
8530dd4 to
c6da702
Compare
c6da702 to
0469093
Compare
| if time_interval_seconds and (start_time_ms is None or end_time_ms is None): | ||
| raise MlflowException.invalid_parameter_value( | ||
| "start_time_ms and end_time_ms are required if time_interval_seconds is set" | ||
| ) |
There was a problem hiding this comment.
just curious, what's the reason start / end time is required if interval is set?
There was a problem hiding this comment.
I think it's good to keep control of the time frame when we want to get time series results, otherwise the result could be unpredictable based on the overall dataset. BTW it's good to align with the UI I think, there should always be a time frame. If we have requests to remove start/end_time constraint then we can remove this later
| TIME_BUCKET_LABEL = "time_bucket" | ||
|
|
||
|
|
||
| def get_percentile_aggregation(db_type: str, percentile_value: float, column): |
There was a problem hiding this comment.
nit: if we have some expected types for this, should we use Literal?
| def get_percentile_aggregation(db_type: str, percentile_value: float, column): | |
| def get_percentile_aggregation(db_type: Literal["postgresql", "mssql", "mysql", "sqlite"], percentile_value: float, column): |
There was a problem hiding this comment.
This is internal function so I think it's fine to keep as string, e.g. if we want to drop mssql in the future then we don't need to update this :)
🛠 DevTools 🛠
Install mlflow from this PR
For Databricks, use the following command:
Related Issues/PRs
#xxxWhat changes are proposed in this pull request?
Initial query_trace_metrics implementation. This PR supports below:
Refactored test fixtures a bit so it can be reused.
Added tests for above metrics.
How is this PR tested?
Does this PR require documentation update?
Release Notes
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.