Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show latest, minimum and maximum metric values on metric page #5574

Merged
merged 12 commits into from
Apr 28, 2022

Conversation

adamreeve
Copy link
Contributor

What changes are proposed in this pull request?

Displays a table of the latest, minimum and maximum metric values in the metric view, as discussed in #5517. This partly addresses #4750. This handles the case when the metric view is used to show data for a single run and when comparing multiple runs.

Single run

single-run-multi-metric

Multiple runs

multi-run-single-metric

Multiple runs and multiple metrics

multi-run-multi-metric

How is this patch tested?

New unit tests added.

Does this PR change the documentation?

  • No. You can skip the rest of this section.
  • Yes. Make sure the changed pages / sections render correctly by following the steps below.
  1. Check the status of the ci/circleci: build_doc check. If it's successful, proceed to the
    next step, otherwise fix it.
  2. Click Details on the right to open the job page of CircleCI.
  3. Click the Artifacts tab.
  4. Click docs/build/html/index.html.
  5. Find the changed pages / sections and make sure they render correctly.

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release notes for MLflow users.

The metric view now includes a table showing the latest, minimum and maximum metric values for runs.

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

Components

  • area/artifacts: Artifact stores and artifact logging
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages
  • area/examples: Example code
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/projects: MLproject format, project running backends
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/server-infra: MLflow Tracking server backend
  • area/tracking: Tracking Service, tracking client APIs, autologging

Interface

  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • area/docker: Docker use across MLflow's components, such as MLflow Projects and MLflow Models
  • area/sqlalchemy: Use of SQLAlchemy in the Tracking Service or Model Registry
  • area/windows: Windows support

Language

  • language/r: R APIs and clients
  • language/java: Java APIs and clients
  • language/new: Proposals for new client languages

Integrations

  • integrations/azure: Azure and Azure ML integrations
  • integrations/sagemaker: SageMaker integrations
  • integrations/databricks: Databricks integrations

How should the PR be classified in the release notes? Choose one:

  • rn/breaking-change - The PR will be mentioned in the "Breaking Changes" section
  • 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
  • rn/feature - A new user-facing feature worth mentioning in the release notes
  • rn/bug-fix - A user-facing bug fix worth mentioning in the release notes
  • rn/documentation - A user-facing documentation change worth mentioning in the release notes

Signed-off-by: Adam Reeve <adreeve@gmail.com>
Signed-off-by: Adam Reeve <adreeve@gmail.com>
@github-actions github-actions bot added area/uiux Front-end, user experience, plotting, JavaScript, JavaScript dev server rn/feature Mention under Features in Changelogs. labels Apr 1, 2022
Copy link
Collaborator

@dbczumar dbczumar left a comment

Choose a reason for hiding this comment

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

@adamreeve This is really awesome! Tried it out locally and it works great! I have a few small suggestions; let me know what you think of them:

  1. Can we turn the Run <id> entries in the table into links that users can click on?
  2. Can we display the step associated with each metric min / max / latest value in parentheses?

E.g.

Latest            |            Max      |               ....

0.355 (step=17).  |     0.4 (step=15)   |               ....
  1. Can we make the table columns sortable so that users can easily identify the run with the smallest or largest latest / max / min value for a particular metric?

  2. Can we make the tables fixed height and scrollable to conserve page space when there are many metrics being plotted?

Looking forward to shipping this! Thanks so much for your contribution!

@sunishsheth2009 Can you take a look as well and provide feedback?

Signed-off-by: Adam Reeve <adreeve@gmail.com>
Signed-off-by: Adam Reeve <adreeve@gmail.com>
Signed-off-by: Adam Reeve <adreeve@gmail.com>
Signed-off-by: Adam Reeve <adreeve@gmail.com>
Signed-off-by: Adam Reeve <adreeve@gmail.com>
Signed-off-by: Adam Reeve <adreeve@gmail.com>
Signed-off-by: Adam Reeve <adreeve@gmail.com>
@adamreeve
Copy link
Contributor Author

Thanks for the feedback @dbczumar, all good suggestions and I've had a go at addressing those points. Making the tables fixed height was a bit awkward and meant I had to make the column widths fixed sizes, but I think that's okay and works well now. I also allowed sorting by the run or metric name for completeness, but I'm not sure if that would be used much.

Related to not taking up too much space, I'm also interested in being able to show multiple separate plots on the metric page (#5397 (comment)), so if that's something that might be accepted I'd have to think about how it fits in with this change, eg. making the summary table views collapsible, or maybe having the tables separate to the plots and being able to control the set of metrics in tables separate to the plots. Probably not worth worrying about that too much right now though, I can address that if and when it's needed.

Copy link
Collaborator

@dbczumar dbczumar left a comment

Choose a reason for hiding this comment

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

@adamreeve Apologies for the delay. This is fantastic! Just a couple of tiny alignment / titling things, then this is ready to go from my perspective. Thank you for your contribution!

  1. When there's only one metric selected, can we still show the title for it on the associated table?
  2. I noticed that the width of the runs column causes certain run IDs to overflow on to the next line; can we expand the column width slightly?

Screen Shot 2022-04-12 at 2 56 10 PM

@sunishsheth2009 Can you take a look from a code correctness / frontend best practices perspective?

Copy link
Collaborator

@sunishsheth2009 sunishsheth2009 left a comment

Choose a reason for hiding this comment

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

LGTM.

@@ -414,9 +425,8 @@ describe('unit tests', () => {
});
test('should render the number of completed runs correctly', () => {
Copy link
Collaborator

@sunishsheth2009 sunishsheth2009 Apr 12, 2022

Choose a reason for hiding this comment

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

Can we add a test to verify that the metric summary table is rendered as expected in the metric plot panel component?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep I've added a test for this now

});
}

dataColumns() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason that this needs to be a function rather than just a const?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It depends on this.props.intl for formatting column titles, so I think it needs to be a function?

Signed-off-by: Adam Reeve <adreeve@gmail.com>
Signed-off-by: Adam Reeve <adreeve@gmail.com>
Signed-off-by: Adam Reeve <adreeve@gmail.com>
Copy link
Collaborator

@dbczumar dbczumar left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks so much, @adamreeve !

@sunishsheth2009 Can you give this one more look so that we can get it merged?

Copy link
Collaborator

@sunishsheth2009 sunishsheth2009 left a comment

Choose a reason for hiding this comment

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

LGTM

@dbczumar dbczumar merged commit 37c6783 into mlflow:master Apr 28, 2022
ahlag pushed a commit to ahlag/mlflow that referenced this pull request Apr 30, 2022
…#5574)

* Show latest, minimum and maximum metric values on metric page

Signed-off-by: Adam Reeve <adreeve@gmail.com>

* Consistent behaviour when no metrics selected

Signed-off-by: Adam Reeve <adreeve@gmail.com>

* Show corresponding step numbers next to metric values

Signed-off-by: Adam Reeve <adreeve@gmail.com>

* Link to runs when showing metrics for multiple runs

Signed-off-by: Adam Reeve <adreeve@gmail.com>

* Make metric summary columns sortable

Signed-off-by: Adam Reeve <adreeve@gmail.com>

* Fix metric table height and make it scrollable

Signed-off-by: Adam Reeve <adreeve@gmail.com>

* Fix after merge: Handle multiple experiment ids in metrics plot panel

Signed-off-by: Adam Reeve <adreeve@gmail.com>

* Test for presence of run links

Signed-off-by: Adam Reeve <adreeve@gmail.com>

* Always show metric name header

Signed-off-by: Adam Reeve <adreeve@gmail.com>

* Bump header column width to avoid run ids overflowing

Signed-off-by: Adam Reeve <adreeve@gmail.com>

* Test MetricsSummaryTable is rendered by MetricsPlotPanel

Signed-off-by: Adam Reeve <adreeve@gmail.com>
@adamreeve adamreeve deleted the metric_view_min_max branch May 8, 2022 22:05
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/feature Mention under Features in Changelogs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants