[tune] Fix get_best_logdir behaviour (#5429)

* Fix get_best_logdir behaviour

* addtest
This commit is contained in:
Tom
2019-08-12 14:28:09 -07:00
committed by Richard Liaw
parent 158567b952
commit 3218ee389a
2 changed files with 8 additions and 1 deletions
@@ -75,7 +75,7 @@ class Analysis(object):
mode (str): One of [min, max].
"""
df = self.dataframe()
df = self.dataframe(metric=metric, mode=mode)
if mode == "max":
return df.iloc[df[metric].idxmax()].logdir
elif mode == "min":