[tune] Stop-gap fix for PBT checkpointing (#7794)

* Fix PBT

* lint

* reset

* rm

* tests

Co-authored-by: Richard Liaw <rliaw@berkeley.edu>
This commit is contained in:
Ujval Misra
2020-04-20 15:10:36 -07:00
committed by GitHub
co-authored by Richard Liaw
parent 213d3894ca
commit 708dff6d8f
8 changed files with 157 additions and 31 deletions
+11 -1
View File
@@ -186,7 +186,7 @@ class Trainable:
def default_resource_request(cls, config):
"""Provides a static resource requirement for the given configuration.
This can be overriden by sub-classes to set the correct trial resource
This can be overridden by sub-classes to set the correct trial resource
allocation, so the user does not need to.
.. code-block:: python
@@ -555,6 +555,16 @@ class Trainable:
"""
return self._iteration
@property
def training_iteration(self):
"""Current training iteration (same as `self.iteration`).
This value is automatically incremented every time `train()` is called
and is automatically inserted into the training result dict.
"""
return self._iteration
def get_config(self):
"""Returns configuration passed in by Tune."""
return self.config