Skip to content

Commit

Permalink
Fix parameter plot prematurely using scientific notation
Browse files Browse the repository at this point in the history
  • Loading branch information
kiudee committed Feb 11, 2022
1 parent 78ae62c commit 176d340
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tune/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,8 @@ def plot_optima(
ls="--",
alpha=0.6,
)
min_y, max_y = np.abs(a.get_ylim())
abs_optima = np.abs(optima[:, i])
min_y, max_y = np.min(abs_optima), np.max(abs_optima)
with np.errstate(divide="ignore"):
if min_y < 1e-4 or max_y / min_y > 1e3:
s = np.format_float_scientific(optima[-1, i], precision=2)
Expand Down

0 comments on commit 176d340

Please sign in to comment.