Skip to content

[UI] Reduce complexity of isEmptyChartCard in RunsCharts rendering#20488

Merged
serena-ruan merged 1 commit intomlflow:masterfrom
mdalvz0000:agi-chart-performance
Feb 26, 2026
Merged

[UI] Reduce complexity of isEmptyChartCard in RunsCharts rendering#20488
serena-ruan merged 1 commit intomlflow:masterfrom
mdalvz0000:agi-chart-performance

Conversation

@mdalvz0000
Copy link
Contributor

@mdalvz0000 mdalvz0000 commented Feb 1, 2026

Related Issues/PRs

What changes are proposed in this pull request?

This commit optimizes the performance of empty chart detection in RunsCharts when dealing with high metric counts. It introduces a predicate factory pattern that pre-computes which metrics are available across runs once, then reuses that information when evaluating multiple charts. The implementation replaces expensive array operations with efficient Set-based lookups, significantly reducing redundant computation when filtering large numbers of chart cards.

How is this PR tested?

  • Existing unit/integration tests
  • New unit/integration tests
  • Manual tests

Before:

Before.mp4

After:

Big1_small.mp4

Does this PR require documentation update?

  • No. You can skip the rest of this section.

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.

What component(s), interfaces, languages, and integrations does this PR affect?

Components

  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server

How 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" section

Should this PR be included in the next patch release?

Yes should be selected for bug fixes, documentation updates, and other small changes. No should 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?
  • Minor release: a release that increments the second part of the version number (e.g., 1.2.0 -> 1.3.0).
    Bug fixes, doc updates and new features usually go into minor releases.
  • Patch release: a release that increments the third part of the version number (e.g., 1.2.0 -> 1.2.1).
    Bug fixes and doc updates usually go into patch releases.
  • Yes (this PR will be cherry-picked and included in the next patch release)
  • No (this PR will be included in the next minor release)

@github-actions
Copy link
Contributor

github-actions bot commented Feb 1, 2026

🛠 DevTools 🛠

Install mlflow from this PR

# mlflow
pip install git+https://github.com/mlflow/mlflow.git@refs/pull/20488/merge
# mlflow-skinny
pip install git+https://github.com/mlflow/mlflow.git@refs/pull/20488/merge#subdirectory=libs/skinny

For Databricks, use the following command:

%sh curl -LsSf https://raw.githubusercontent.com/mlflow/mlflow/HEAD/dev/install-skinny.sh | sh -s pull/20488/merge

@github-actions github-actions bot added area/uiux Front-end, user experience, plotting, JavaScript, JavaScript dev server rn/none List under Small Changes in Changelogs. v3.9.1 labels Feb 1, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

Documentation preview for 26a3d33 is available at:

More info
  • Ignore this comment if this PR does not change the documentation.
  • The preview is updated when a new commit is pushed to this PR.
  • This comment was created by this workflow run.
  • The documentation was built by this workflow run.

@BriannaRoskind BriannaRoskind added the team-review Trigger a team review request label Feb 17, 2026
@harupy harupy removed the v3.9.1 label Feb 18, 2026
@daniellok-db daniellok-db self-assigned this Feb 20, 2026
@mdalvz0000 mdalvz0000 force-pushed the agi-chart-performance branch from cc441b1 to ad9ec91 Compare February 23, 2026 21:25
@serena-ruan
Copy link
Collaborator

Thanks @mdalvz0000 ! The implementation looks solid, for the screen recording you shared could you attach before v.s after so it's more visible about the performance change?

@mdalvz0000
Copy link
Contributor Author

Thanks @mdalvz0000 ! The implementation looks solid, for the screen recording you shared could you attach before v.s after so it's more visible about the performance change?

Thanks, I just added the "Before" video to the description.

Copy link
Collaborator

@serena-ruan serena-ruan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mdalvz0000 mdalvz0000 force-pushed the agi-chart-performance branch from d405c86 to ad9ec91 Compare February 25, 2026 19:24
… and RunsChartsDraggableCardsGridSection

Signed-off-by: Malcolm Alvarez <mdalvz@amazon.com>
@serena-ruan
Copy link
Collaborator

Hi @hubertzub-db could you take another look at this? if it's good would like to merge it :D

Copy link
Collaborator

@hubertzub-db hubertzub-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lg!
OOC: do you have any metrics about the performance improvement? 🙂

@serena-ruan serena-ruan added this pull request to the merge queue Feb 26, 2026
Merged via the queue into mlflow:master with commit 62e3556 Feb 26, 2026
18 checks passed
@github-actions github-actions bot added the size/L Large PR (200-499 LoC) label Feb 26, 2026
@mdalvz0000
Copy link
Contributor Author

I don't have specific metrics, but the above before / after configuration can be achieved with an experiment containing runs with 8000 unique metrics.

daniellok-db pushed a commit to daniellok-db/mlflow that referenced this pull request Mar 5, 2026
daniellok-db pushed a commit to daniellok-db/mlflow that referenced this pull request Mar 5, 2026
daniellok-db pushed a commit that referenced this pull request Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/uiux Front-end, user experience, plotting, JavaScript, JavaScript dev server rn/none List under Small Changes in Changelogs. size/L Large PR (200-499 LoC) team-review Trigger a team review request v3.10.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants