[tune] Doc: Autofilled, StatusReporter (#3294)

* autofill and revise doc page for things

* lint

* comments
This commit is contained in:
Richard Liaw
2018-11-13 13:15:56 -08:00
committed by Eric Liang
parent 6ee7a3b571
commit c3a2c7ebed
4 changed files with 101 additions and 77 deletions
+7 -3
View File
@@ -14,11 +14,12 @@ logger = logging.getLogger(__name__)
class StatusReporter(object):
"""Object passed into your main() that you can report status through.
"""Object passed into your function that you can report status through.
Example:
>>> reporter = StatusReporter()
>>> reporter(timesteps_total=1)
>>> def trainable_function(config, reporter):
>>> assert isinstance(reporter, StatusReporter)
>>> reporter(timesteps_total=1)
"""
def __init__(self):
@@ -33,6 +34,9 @@ class StatusReporter(object):
Args:
kwargs: Latest training result status.
Example:
>>> reporter(mean_accuracy=1, training_iteration=4)
"""
with self._lock: