From be9774a76b4b6dcdb8cc2147a93d7c8676438292 Mon Sep 17 00:00:00 2001 From: Richard Zang Date: Mon, 17 Jun 2019 10:36:27 -0700 Subject: [PATCH] Refine new metrics UI controls (#1427) * remove title * smoothness tooltip * lint * style changes requested by joy * address tooltip text --- .../server/js/src/components/MetricView.css | 20 +++- .../js/src/components/MetricsPlotControls.js | 108 ++++++++++-------- 2 files changed, 82 insertions(+), 46 deletions(-) diff --git a/mlflow/server/js/src/components/MetricView.css b/mlflow/server/js/src/components/MetricView.css index 2ceff8103f17f..05c714727a33c 100644 --- a/mlflow/server/js/src/components/MetricView.css +++ b/mlflow/server/js/src/components/MetricView.css @@ -34,13 +34,31 @@ div.MetricView .recharts-tooltip-item-value, .recharts-tooltip-item-separator { .metrics-plot-container .plot-controls .metrics-select { width: 300px; + display: block; } .metrics-plot-container .plot-controls .metrics-select input[type=text] { padding: 0; } -.metrics-plot-container .plot-controls h3 { +.metrics-plot-container .plot-controls { + display: flex; + flex-direction: column; + justify-content: center; + min-height: 500px; +} + +.metrics-plot-container .plot-controls .inline-control { + margin-top: 25px; + display: flex; + align-items: center; +} + +.metrics-plot-container .plot-controls .inline-control .control-label { + margin-right: 10px; +} + +.metrics-plot-container .plot-controls .block-control { margin-top: 25px; } diff --git a/mlflow/server/js/src/components/MetricsPlotControls.js b/mlflow/server/js/src/components/MetricsPlotControls.js index a71c4dd705c52..cc16fb007f67b 100644 --- a/mlflow/server/js/src/components/MetricsPlotControls.js +++ b/mlflow/server/js/src/components/MetricsPlotControls.js @@ -1,6 +1,6 @@ import React from 'react'; import _ from 'lodash'; -import { Radio, Switch, TreeSelect } from 'antd'; +import { Radio, Switch, TreeSelect, Icon, Tooltip } from 'antd'; import PropTypes from 'prop-types'; import { CHART_TYPE_LINE } from './MetricsPlotPanel'; import { LineSmoothSlider } from './LineSmoothSlider'; @@ -39,56 +39,74 @@ export class MetricsPlotControls extends React.Component { render() { const { chartType } = this.props; + const lineSmoothnessTooltipText = + 'Make the line between points "smoother" based on generalized Catmull-Rom splines. ' + + 'Smoothing can be useful for displaying the ' + + 'overall trend when the logging frequency is high.'; return (
-

Plot Settings

{chartType === CHART_TYPE_LINE ? (
-

Points:

- -

Line Smoothness

- -

X-axis:

- - - Step - - - Time (Wall) - - - Time (Relative) - - +
+
Points:
+ +
+
+
+ Line Smoothness {' '} + + + +
+ +
+
+
X-axis:
+ + + Step + + + Time (Wall) + + + Time (Relative) + + +
) : null} -

Y-axis:

- -

Log Scale:

- +
+
Y-axis:
+ +
+
+
Y-axis Log Scale:
+ +
); }