[ MLflow Demo ] UI updates for MLflow Demo interfaces#20162
[ MLflow Demo ] UI updates for MLflow Demo interfaces#20162B-Step62 merged 11 commits intomlflow:masterfrom
Conversation
🛠 DevTools 🛠
Install mlflow from this PRFor Databricks, use the following command: |
There was a problem hiding this comment.
Pull request overview
This PR introduces a comprehensive demo data framework for MLflow, featuring UI enhancements, backend API endpoints, CLI commands, and a complete demo data generation system. The changes enable users to explore MLflow's GenAI features through pre-populated sample data.
Changes:
- Added demo data generation framework with support for traces, prompts, and evaluation datasets
- Implemented new home page UI with feature cards and demo banner for easy onboarding
- Created
mlflow demoCLI command for launching demo servers - Added demo management API endpoints for generating and deleting demo data
- Enhanced logging configuration to reduce noise from alembic and huey
Reviewed changes
Copilot reviewed 35 out of 36 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
mlflow/demo/ |
Core demo framework with base classes, registry, and generators for traces/prompts/evaluation |
mlflow/cli/demo.py |
New CLI command for launching demo servers with interactive setup |
mlflow/server/handlers.py |
API endpoints for demo generation and deletion |
mlflow/server/js/src/home/ |
React components for demo banner and feature cards on home page |
mlflow/server/js/src/settings/SettingsPage.tsx |
UI for clearing demo data from settings |
mlflow/utils/ |
Port availability checking and logging improvements |
tests/demo/ |
Comprehensive test suite for demo functionality |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bd6c186 to
a7d99d3
Compare
|
Documentation preview for 1c72aff is available at: More info
|
beaa393 to
c2dc6ed
Compare
c2dc6ed to
d8ca42e
Compare
4582c9b to
79d71ad
Compare
86d8908 to
17cde10
Compare
|
@BenWilson2 The generation flow looks so smooth! Very easy to access each feature. Before reviewing the implementation closely, a few minor thoughts:
|
66ea277 to
3ceb48c
Compare
|
c050bd3 to
7de585e
Compare
| export const featureDefinitions: FeatureDefinition[] = [ | ||
| { | ||
| id: 'tracing', | ||
| icon: WorkflowsIcon, |
| <Button | ||
| componentId="mlflow.settings.demo.clear-all-button" | ||
| onClick={handleClearAllDemoData} | ||
| disabled={isCleaningDemo} |
There was a problem hiding this comment.
Can we have a confirmation pop up before deleting the demo data?
| onExperimentCreated={handleExperimentCreated} | ||
| /> | ||
| <LogTracesDrawerLoader /> | ||
| <LogTracesDrawer /> |
There was a problem hiding this comment.
Are we showing this drawer somewhere?
| from mlflow.demo.generators.traces import TracesDemoGenerator | ||
| from mlflow.demo.registry import demo_registry | ||
|
|
||
| # NB: Order matters here. Prompts must be created before traces (for linking), |
| navigate(data.navigation_url || '/experiments'); | ||
| } catch (error) { | ||
| console.error('Failed to generate demo:', error); | ||
| navigate('/experiments'); |
There was a problem hiding this comment.
I wonder if re-directing to experiment page on failure is confusing to users, they will see the default experiment with no data. Shall we we show a notice "Failed to generate demo" (a similar popup to the one shown when clicking copy button) and keep users on the current page?
| console.error('Failed to generate demo:', error); | ||
| navigate(feature.navigationPath); | ||
| } finally { |
There was a problem hiding this comment.
Same comment as the DemoBanner error handling.
| navigate(feature.navigationPath); | ||
| }, [feature.navigationPath, navigate]); | ||
|
|
||
| const cardStyles = { |
There was a problem hiding this comment.
I'm not sure if this is the common pattern in the repo. Shall we inline to avoid regenerating these on render or have a separate css file?
There was a problem hiding this comment.
Can we add some test coverage to these new components?
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
b870f6d to
5fedc56
Compare
…plates - Add timestamp distribution across 7 days (v1 in days 0-3.5, v2 in days 3.5-7) - Add token count estimation as span attributes (SpanAttributeKey.CHAT_USAGE) - Add prompt-based traces with template rendering and variables - Restructure sessions to have 2-4 turns each across 3 sessions - Fix trace metadata by using InMemoryTraceManager directly - Update test expectations for new trace counts (34 total: 4 RAG, 4 agent, 12 prompt, 14 session) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
…plates - Add timestamp distribution across 7 days (v1 in days 0-3.5, v2 in days 3.5-7) - Add token count estimation as span attributes (SpanAttributeKey.CHAT_USAGE) - Add prompt-based traces with template rendering and variables - Restructure sessions to have 2-4 turns each across 3 sessions - Fix trace metadata by using InMemoryTraceManager directly - Update test expectations for new trace counts (34 total: 4 RAG, 4 agent, 12 prompt, 14 session) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Signed-off-by: B-Step62 <yuki.watanabe@databricks.com>

🥞 Stacked PR
Use this link to review incremental changes.
Related Issues/PRs
#xxxWhat changes are proposed in this pull request?
Adds the UI navigation elements to go to the demo content. Adds the ability to clear demo data from an existing server if desired (without soft deletion of an experiment and the requirement to use gc commands).
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.