From 12750cb7655ff6de9c0916c6da77e2e4821cff0f Mon Sep 17 00:00:00 2001 From: MoonGem <34537029+MoonGem@users.noreply.github.com> Date: Fri, 23 Mar 2018 00:33:59 -0500 Subject: [PATCH] Update hyperopt.py --- freqtrade/optimize/hyperopt.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/freqtrade/optimize/hyperopt.py b/freqtrade/optimize/hyperopt.py index 5e13ad47a..2a4131efe 100644 --- a/freqtrade/optimize/hyperopt.py +++ b/freqtrade/optimize/hyperopt.py @@ -538,8 +538,7 @@ class Hyperopt(Backtesting): self.current_tries, self.total_tries ) - - def Tests(): + try: best_parameters = fmin( fn=self.generate_optimizer, space=self.hyperopt_space(), @@ -547,11 +546,8 @@ class Hyperopt(Backtesting): max_evals=self.total_tries, trials=MongoTrials(arg='mongo://127.0.0.1:1234/freqtrade_hyperopt/jobs', exp_key='exp1') ) - return best_parameters - try: # change the Logging format self.logging.set_format('\n%(message)s') - best_parameters = Tests() results = sorted(self.trials.results, key=itemgetter('loss')) best_result = results[0]['result'] # Improve best parameter logging display