From 7f2c4a0fec7dc1f6cee953db56332039ffe19398 Mon Sep 17 00:00:00 2001 From: Sunny Shen Date: Sat, 23 Nov 2024 09:33:58 -0800 Subject: [PATCH] Fix Parameter Sensitivity Plot Layout (#3109) Summary: Pull Request resolved: https://github.com/facebook/Ax/pull/3109 As titled, fix parameter sensitivity plot layout. 1) Makes sure the height is enough to show all parameters 2) Shows the title of the plot sample sweeps with weird sensitivity plot display: f666814066, f666666748, f666034938 Reviewed By: Balandat Differential Revision: D66395421 fbshipit-source-id: 861c5888a1b07cb4a1c9b5f1684e1366ba27ed78 --- ax/plot/feature_importances.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ax/plot/feature_importances.py b/ax/plot/feature_importances.py index e7cd4e751f8..8fc6cd7248f 100644 --- a/ax/plot/feature_importances.py +++ b/ax/plot/feature_importances.py @@ -244,10 +244,11 @@ def plot_feature_importance_by_feature_plotly( longest_label = max(len(f) for f in features) longest_metric = max(len(m) for m in sensitivity_values.keys()) layout = go.Layout( - height=len(features) * 20, + height=200 + len(features) * 20, width=10 * longest_label + max(10 * longest_metric, 400), hovermode="closest", annotations=compose_annotation(caption=caption), + title=f"Parameter Sensitivity by {importance_measure}", ) if relative: