[tune] hyperband (#1156)

* trial scheduler interface

* remove

* wip median stopping

* remove

* median stopping rule

* update

* docs

* update

* Revrt

* update

* hyperband untested

* small changes before moving on

* added endpoints

* good changes

* init tests

* smore tests

* unfinished tests

* testing

* testing code

* morbugs

* fixes

* end

* tests and typo

* nit

* try this

* tests

* testing

* lint

* lint

* lint

* comments and docs

* almost screwed up

* lint
This commit is contained in:
Richard Liaw
2017-11-06 22:30:25 -08:00
committed by GitHub
parent 7215f7d228
commit 6222ec3bd7
6 changed files with 578 additions and 9 deletions
+13 -4
View File
@@ -142,12 +142,21 @@ class Trial(object):
experiment. This results in a state similar to TERMINATED."""
assert self.status == Trial.RUNNING, self.status
self.checkpoint()
self.stop()
self.status = Trial.PAUSED
try:
self.checkpoint()
self.stop()
self.status = Trial.PAUSED
except Exception:
print("Error pausing agent:", traceback.format_exc())
self.status = Trial.ERROR
def unpause(self):
"""Sets PAUSED trial to pending to allow scheduler to start."""
assert self.status == Trial.PAUSED, self.status
self.status = Trial.PENDING
def resume(self):
"""Resume PAUSED tasks. This is a blocking call."""
"""Resume PAUSED trials. This is a blocking call."""
assert self.status == Trial.PAUSED, self.status
self.start()