[tune] Use public methods for trainable (#9184)

This commit is contained in:
Richard Liaw
2020-07-01 11:00:00 -07:00
committed by GitHub
parent 1491508859
commit d35f0e40d0
40 changed files with 350 additions and 220 deletions
+3 -3
View File
@@ -99,7 +99,7 @@ You can do this in the trainable, as shown below:
.. code-block:: python
class CustomLogging(tune.Trainable)
def _setup(self, config):
def setup(self, config):
trial_id = self.trial_id
library.init(
name=trial_id,
@@ -109,10 +109,10 @@ You can do this in the trainable, as shown below:
allow_val_change=True)
library.set_log_path(self.logdir)
def _train(self):
def step(self):
library.log_model(...)
def _log_result(self, result):
def log_result(self, result):
res_dict = {
str(k): v
for k, v in result.items()