mirror of
https://github.com/wassname/ray.git
synced 2026-09-12 12:51:15 +08:00
[tune] Use public methods for trainable (#9184)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user