Hyperopt: use results from previous runs
This commit is contained in:
parent
ca8cab0ce9
commit
a48840509b
@ -119,6 +119,7 @@ def read_trials(trials_path=TRIALS_FILE):
|
|||||||
# os.remove(trials_path)
|
# os.remove(trials_path)
|
||||||
return trials
|
return trials
|
||||||
|
|
||||||
|
|
||||||
def log_results(results):
|
def log_results(results):
|
||||||
""" log results if it is better than any previous evaluation """
|
""" log results if it is better than any previous evaluation """
|
||||||
global CURRENT_BEST_LOSS
|
global CURRENT_BEST_LOSS
|
||||||
@ -270,7 +271,11 @@ def start(args):
|
|||||||
# read trials file if we have one
|
# read trials file if we have one
|
||||||
if os.path.exists(TRIALS_FILE):
|
if os.path.exists(TRIALS_FILE):
|
||||||
TRIALS = read_trials()
|
TRIALS = read_trials()
|
||||||
_CURRENT_TRIES = len([result for result in TRIALS.results if result['status'] == 'ok'])
|
_CURRENT_TRIES = len(TRIALS.results)
|
||||||
|
TOTAL_TRIES = TOTAL_TRIES + _CURRENT_TRIES
|
||||||
|
logger.info(
|
||||||
|
'Continuing with trials. Current: {}, Total: {}'
|
||||||
|
.format(_CURRENT_TRIES, TOTAL_TRIES))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
best_parameters = fmin(
|
best_parameters = fmin(
|
||||||
|
Loading…
Reference in New Issue
Block a user