[tune] Allow None values in TBX logger (#12262)

This commit is contained in:
Sumanth Ratna
2020-11-23 15:57:23 -05:00
committed by GitHub
parent c816a44667
commit 6346ea0be6
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -199,8 +199,8 @@ class TBXLogger(Logger):
{"a": {"b": 1, "c": 2}} -> {"a/b": 1, "a/c": 2}
"""
# NoneType is not supported on the last TBX release yet.
VALID_HPARAMS = (str, bool, np.bool8, int, np.integer, float, list)
VALID_HPARAMS = (str, bool, np.bool8, int, np.integer, float, list,
type(None))
def _init(self):
try:
+2 -1
View File
@@ -147,7 +147,8 @@ class LoggerSuite(unittest.TestCase):
}
},
"d": np.int64(1),
"e": np.bool8(True)
"e": np.bool8(True),
"f": None,
}
t = Trial(
evaluated_params=config, trial_id="tbx", logdir=self.test_dir)