[tune] logger refactor part 3: Add ExperimentLogger class (#11749)

This commit is contained in:
Kai Fricke
2020-11-05 08:55:38 -08:00
committed by GitHub
parent f6717b8b03
commit 603accf1c2
17 changed files with 389 additions and 95 deletions
+11
View File
@@ -123,6 +123,17 @@ class Experiment:
max_failures=0,
restore=None):
if loggers is not None:
# Most users won't run into this as `tune.run()` does not pass
# the argument anymore. However, we will want to inform users
# if they instantiate their `Experiment` objects themselves.
raise ValueError(
"Passing `loggers` to an `Experiment` is deprecated. Use "
"an `ExperimentLogger` callback instead, e.g. by passing the "
"`Logger` classes to `tune.logger.LegacyExperimentLogger` and "
"passing this as part of the `callback` parameter to "
"`tune.run()`.")
config = config or {}
if callable(run) and detect_checkpoint_function(run):
if checkpoint_at_end: