mirror of
https://github.com/wassname/ray.git
synced 2026-09-10 12:38:43 +08:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user