[tune] Experiment Management API (#1328)

* init for exposing external interface

* revisions

* http server

* small

* simplify

* ui

* fixes

* test

* nit

* nit

* merge

* untested

* nits

* nit

* init tests

* tests

* more tests

* nit

* fix hyperband

* cleanup

* nits

* good stuff

* cleanup

* comments and need to test

* nit

* notebook

* testing

* test and expose server

* server_tests

* docs

* periods

* fix tests

* committing test

* fi
This commit is contained in:
Richard Liaw
2018-01-24 13:45:10 -08:00
committed by Eric Liang
parent 1d2a28ab07
commit a7d544424c
15 changed files with 599 additions and 88 deletions
+15 -2
View File
@@ -26,14 +26,24 @@ class TrialScheduler(object):
"""Called on each intermediate result returned by a trial.
At this point, the trial scheduler can make a decision by returning
one of CONTINUE, PAUSE, and STOP."""
one of CONTINUE, PAUSE, and STOP. This will only be called when the
trial is in the RUNNING state."""
raise NotImplementedError
def on_trial_complete(self, trial_runner, trial, result):
"""Notification for the completion of trial.
This will only be called when the trial completes naturally."""
This will only be called when the trial is in the RUNNING state and
either completes naturally or by manual termination."""
raise NotImplementedError
def on_trial_remove(self, trial_runner, trial):
"""Called to remove trial.
This is called when the trial is in PAUSED or PENDING state. Otherwise,
call `on_trial_complete`."""
raise NotImplementedError
@@ -66,6 +76,9 @@ class FIFOScheduler(TrialScheduler):
def on_trial_complete(self, trial_runner, trial, result):
pass
def on_trial_remove(self, trial_runner, trial):
pass
def choose_trial_to_run(self, trial_runner):
for trial in trial_runner.get_trials():
if (trial.status == Trial.PENDING and