Add documentation for custom hyperopt

This commit is contained in:
Matthias
2019-07-15 21:36:01 +02:00
parent 2a20423be6
commit 710443d200
2 changed files with 48 additions and 8 deletions

View File

@@ -75,7 +75,7 @@ class Hyperopt(Backtesting):
self.calculate_loss = hyperopt_loss_legacy
elif (self.config['loss_function'] == 'custom' and
hasattr(self.custom_hyperopt, 'hyperopt_loss_custom')):
self.calculate_loss = self.custom_hyperopt.hyperopt_loss_custom
self.calculate_loss = self.custom_hyperopt.hyperopt_loss_custom # type: ignore
# Implement fallback to avoid odd crashes when custom-hyperopt fails to load.
# TODO: Maybe this should just stop hyperopt completely?