Support display in progress traces#19265
Conversation
Signed-off-by: B-Step62 <yuki.watanabe@databricks.com>
Signed-off-by: B-Step62 <yuki.watanabe@databricks.com>
Signed-off-by: B-Step62 <yuki.watanabe@databricks.com>
Signed-off-by: B-Step62 <yuki.watanabe@databricks.com>
Signed-off-by: B-Step62 <yuki.watanabe@databricks.com>
|
Documentation preview for e2cfa2e is available at: More info
|
mlflow/server/js/src/shared/web-shared/model-trace-explorer/ModelTraceExplorerDetailView.tsx
Outdated
Show resolved
Hide resolved
.../js/src/shared/web-shared/genai-traces-table/components/GenAiEvaluationTracesReviewModal.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: B-Step62 <yuki.watanabe@databricks.com>
| // Stop polling if trace is completed | ||
| const traceState = data && isV3ModelTraceInfo(data.info) ? data.info.state : undefined; | ||
| return traceState === 'IN_PROGRESS' ? 1000 : false; |
There was a problem hiding this comment.
I wonder if this works well, if root_span is logged before child spans (e.g. concurrent span logging) then trace info status will be updated as OK and we stop polling.
Similar for databricks, if the trace info status is also generated from root span status then it's possible child spans are not logged?
There was a problem hiding this comment.
Hmm that's true. If the root span is there, we can actually compare the span count and keep polling.
There was a problem hiding this comment.
We still say status "OK", in that case, but I think it is valid since the traced operation itself is indeed completed, just trace logging is not complete.
Also there can be a case where a child span completely gets lost due to network issue, then this keep polling. But I think it is fine - we only poll while the trace modal is open and users will likely close it after waiting for a while.
There was a problem hiding this comment.
Yeah the thing I want to avoid is that we stop polling and some spans are not logged, the user closes this page and then clicks into it again finding the structure changed. I previously discussed this with Daniel a bit, and feel like adding a refresh button may work better.
| // Stop polling if trace is completed | ||
| const traceState = data && isV3ModelTraceInfo(data.info) ? data.info.state : undefined; | ||
| return traceState === 'IN_PROGRESS' ? 1000 : false; |
There was a problem hiding this comment.
I wonder if this works well, if root_span is logged before child spans (e.g. concurrent span logging) then trace info status will be updated as OK and we stop polling.
Similar for databricks, if the trace info status is also generated from root span status then it's possible child spans are not logged?
There was a problem hiding this comment.
Hmm that's true. If the root span is there, we can actually compare the span count and keep polling.
There was a problem hiding this comment.
We still say status "OK", in that case, but I think it is valid since the traced operation itself is indeed completed, just trace logging is not complete.
Also there can be a case where a child span completely gets lost due to network issue, then this keep polling. But I think it is fine - we only poll while the trace modal is open and users will likely close it after waiting for a while.
There was a problem hiding this comment.
Yeah the thing I want to avoid is that we stop polling and some spans are not logged, the user closes this page and then clicks into it again finding the structure changed. I previously discussed this with Daniel a bit, and feel like adding a refresh button may work better.
Signed-off-by: B-Step62 <yuki.watanabe@databricks.com>
🛠 DevTools 🛠
Install mlflow from this PR
For Databricks, use the following command:
Related Issues
#16244
What changes are proposed in this pull request?
Current trace detail UI can only render a completed trace. However, now MLflow (SQL backend) support ingesting spans incrementally and the new
GetTraceAPI can return spans from in-progress traces. This PR adds support to show in-progress trace.The change can be broke down into three:
How is this PR tested?
In-progress.trace.mp4
Does this PR require documentation update?
Release Notes
Is this a user-facing change?
Support displaying spans in a in-progress trace incrementally.
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.