Skip to content

Commit

Permalink
Fix Parameter Sensitivity Plot Layout (facebook#3109)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#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
  • Loading branch information
Sunny Shen authored and facebook-github-bot committed Nov 23, 2024
1 parent bea6e67 commit 7f2c4a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ax/plot/feature_importances.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 7f2c4a0

Please sign in to comment.