Fix small merge mistake
This commit is contained in:
parent
688d657fe2
commit
77541935a8
@ -183,17 +183,17 @@ def _hyperopt_filter_epochs(epochs: List, filteroptions: dict) -> List:
|
|||||||
if x['results_metrics']['profit'] < filteroptions['filter_max_total_profit']
|
if x['results_metrics']['profit'] < filteroptions['filter_max_total_profit']
|
||||||
]
|
]
|
||||||
if filteroptions['filter_min_objective'] is not None:
|
if filteroptions['filter_min_objective'] is not None:
|
||||||
trials = [x for x in trials if x['results_metrics']['trade_count'] > 0]
|
epochs = [x for x in epochs if x['results_metrics']['trade_count'] > 0]
|
||||||
# trials = [x for x in trials if x['loss'] != 20]
|
# epochs = [x for x in epochs if x['loss'] != 20]
|
||||||
trials = [
|
epochs = [
|
||||||
x for x in trials
|
x for x in epochs
|
||||||
if x['loss'] < filteroptions['filter_min_objective']
|
if x['loss'] < filteroptions['filter_min_objective']
|
||||||
]
|
]
|
||||||
if filteroptions['filter_max_objective'] is not None:
|
if filteroptions['filter_max_objective'] is not None:
|
||||||
trials = [x for x in trials if x['results_metrics']['trade_count'] > 0]
|
epochs = [x for x in epochs if x['results_metrics']['trade_count'] > 0]
|
||||||
# trials = [x for x in trials if x['loss'] != 20]
|
# epochs = [x for x in epochs if x['loss'] != 20]
|
||||||
trials = [
|
epochs = [
|
||||||
x for x in trials
|
x for x in epochs
|
||||||
if x['loss'] > filteroptions['filter_max_objective']
|
if x['loss'] > filteroptions['filter_max_objective']
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -736,7 +736,8 @@ def test_hyperopt_list(mocker, capsys, caplog, hyperopt_results):
|
|||||||
|
|
||||||
args = [
|
args = [
|
||||||
"hyperopt-list",
|
"hyperopt-list",
|
||||||
"--no-details"
|
"--no-details",
|
||||||
|
"--no-color",
|
||||||
]
|
]
|
||||||
pargs = get_args(args)
|
pargs = get_args(args)
|
||||||
pargs['config'] = None
|
pargs['config'] = None
|
||||||
@ -749,7 +750,8 @@ def test_hyperopt_list(mocker, capsys, caplog, hyperopt_results):
|
|||||||
args = [
|
args = [
|
||||||
"hyperopt-list",
|
"hyperopt-list",
|
||||||
"--best",
|
"--best",
|
||||||
"--no-details"
|
"--no-details",
|
||||||
|
"--no-color",
|
||||||
]
|
]
|
||||||
pargs = get_args(args)
|
pargs = get_args(args)
|
||||||
pargs['config'] = None
|
pargs['config'] = None
|
||||||
@ -763,7 +765,8 @@ def test_hyperopt_list(mocker, capsys, caplog, hyperopt_results):
|
|||||||
args = [
|
args = [
|
||||||
"hyperopt-list",
|
"hyperopt-list",
|
||||||
"--profitable",
|
"--profitable",
|
||||||
"--no-details"
|
"--no-details",
|
||||||
|
"--no-color",
|
||||||
]
|
]
|
||||||
pargs = get_args(args)
|
pargs = get_args(args)
|
||||||
pargs['config'] = None
|
pargs['config'] = None
|
||||||
@ -776,7 +779,8 @@ def test_hyperopt_list(mocker, capsys, caplog, hyperopt_results):
|
|||||||
" 11/12", " 12/12"])
|
" 11/12", " 12/12"])
|
||||||
args = [
|
args = [
|
||||||
"hyperopt-list",
|
"hyperopt-list",
|
||||||
"--profitable"
|
"--profitable",
|
||||||
|
"--no-color",
|
||||||
]
|
]
|
||||||
pargs = get_args(args)
|
pargs = get_args(args)
|
||||||
pargs['config'] = None
|
pargs['config'] = None
|
||||||
@ -792,7 +796,8 @@ def test_hyperopt_list(mocker, capsys, caplog, hyperopt_results):
|
|||||||
"hyperopt-list",
|
"hyperopt-list",
|
||||||
"--no-details",
|
"--no-details",
|
||||||
"--no-color",
|
"--no-color",
|
||||||
"--min-trades", "20"
|
"--min-trades", "20",
|
||||||
|
"--no-color",
|
||||||
]
|
]
|
||||||
pargs = get_args(args)
|
pargs = get_args(args)
|
||||||
pargs['config'] = None
|
pargs['config'] = None
|
||||||
@ -806,7 +811,8 @@ def test_hyperopt_list(mocker, capsys, caplog, hyperopt_results):
|
|||||||
"hyperopt-list",
|
"hyperopt-list",
|
||||||
"--profitable",
|
"--profitable",
|
||||||
"--no-details",
|
"--no-details",
|
||||||
"--max-trades", "20"
|
"--max-trades", "20",
|
||||||
|
"--no-color",
|
||||||
]
|
]
|
||||||
pargs = get_args(args)
|
pargs = get_args(args)
|
||||||
pargs['config'] = None
|
pargs['config'] = None
|
||||||
@ -821,7 +827,8 @@ def test_hyperopt_list(mocker, capsys, caplog, hyperopt_results):
|
|||||||
"hyperopt-list",
|
"hyperopt-list",
|
||||||
"--profitable",
|
"--profitable",
|
||||||
"--no-details",
|
"--no-details",
|
||||||
"--min-avg-profit", "0.11"
|
"--min-avg-profit", "0.11",
|
||||||
|
"--no-color",
|
||||||
]
|
]
|
||||||
pargs = get_args(args)
|
pargs = get_args(args)
|
||||||
pargs['config'] = None
|
pargs['config'] = None
|
||||||
@ -835,7 +842,8 @@ def test_hyperopt_list(mocker, capsys, caplog, hyperopt_results):
|
|||||||
args = [
|
args = [
|
||||||
"hyperopt-list",
|
"hyperopt-list",
|
||||||
"--no-details",
|
"--no-details",
|
||||||
"--max-avg-profit", "0.10"
|
"--max-avg-profit", "0.10",
|
||||||
|
"--no-color",
|
||||||
]
|
]
|
||||||
pargs = get_args(args)
|
pargs = get_args(args)
|
||||||
pargs['config'] = None
|
pargs['config'] = None
|
||||||
@ -849,7 +857,8 @@ def test_hyperopt_list(mocker, capsys, caplog, hyperopt_results):
|
|||||||
args = [
|
args = [
|
||||||
"hyperopt-list",
|
"hyperopt-list",
|
||||||
"--no-details",
|
"--no-details",
|
||||||
"--min-total-profit", "0.4"
|
"--min-total-profit", "0.4",
|
||||||
|
"--no-color",
|
||||||
]
|
]
|
||||||
pargs = get_args(args)
|
pargs = get_args(args)
|
||||||
pargs['config'] = None
|
pargs['config'] = None
|
||||||
@ -863,7 +872,8 @@ def test_hyperopt_list(mocker, capsys, caplog, hyperopt_results):
|
|||||||
args = [
|
args = [
|
||||||
"hyperopt-list",
|
"hyperopt-list",
|
||||||
"--no-details",
|
"--no-details",
|
||||||
"--max-total-profit", "0.4"
|
"--max-total-profit", "0.4",
|
||||||
|
"--no-color",
|
||||||
]
|
]
|
||||||
pargs = get_args(args)
|
pargs = get_args(args)
|
||||||
pargs['config'] = None
|
pargs['config'] = None
|
||||||
@ -877,7 +887,8 @@ def test_hyperopt_list(mocker, capsys, caplog, hyperopt_results):
|
|||||||
args = [
|
args = [
|
||||||
"hyperopt-list",
|
"hyperopt-list",
|
||||||
"--no-details",
|
"--no-details",
|
||||||
"--min-objective", "0.1"
|
"--min-objective", "0.1",
|
||||||
|
"--no-color",
|
||||||
]
|
]
|
||||||
pargs = get_args(args)
|
pargs = get_args(args)
|
||||||
pargs['config'] = None
|
pargs['config'] = None
|
||||||
@ -891,7 +902,8 @@ def test_hyperopt_list(mocker, capsys, caplog, hyperopt_results):
|
|||||||
args = [
|
args = [
|
||||||
"hyperopt-list",
|
"hyperopt-list",
|
||||||
"--no-details",
|
"--no-details",
|
||||||
"--max-objective", "0.1"
|
"--max-objective", "0.1",
|
||||||
|
"--no-color",
|
||||||
]
|
]
|
||||||
pargs = get_args(args)
|
pargs = get_args(args)
|
||||||
pargs['config'] = None
|
pargs['config'] = None
|
||||||
@ -906,7 +918,8 @@ def test_hyperopt_list(mocker, capsys, caplog, hyperopt_results):
|
|||||||
"hyperopt-list",
|
"hyperopt-list",
|
||||||
"--profitable",
|
"--profitable",
|
||||||
"--no-details",
|
"--no-details",
|
||||||
"--min-avg-time", "2000"
|
"--min-avg-time", "2000",
|
||||||
|
"--no-color",
|
||||||
]
|
]
|
||||||
pargs = get_args(args)
|
pargs = get_args(args)
|
||||||
pargs['config'] = None
|
pargs['config'] = None
|
||||||
@ -920,7 +933,8 @@ def test_hyperopt_list(mocker, capsys, caplog, hyperopt_results):
|
|||||||
args = [
|
args = [
|
||||||
"hyperopt-list",
|
"hyperopt-list",
|
||||||
"--no-details",
|
"--no-details",
|
||||||
"--max-avg-time", "1500"
|
"--max-avg-time", "1500",
|
||||||
|
"--no-color",
|
||||||
]
|
]
|
||||||
pargs = get_args(args)
|
pargs = get_args(args)
|
||||||
pargs['config'] = None
|
pargs['config'] = None
|
||||||
@ -934,7 +948,7 @@ def test_hyperopt_list(mocker, capsys, caplog, hyperopt_results):
|
|||||||
args = [
|
args = [
|
||||||
"hyperopt-list",
|
"hyperopt-list",
|
||||||
"--no-details",
|
"--no-details",
|
||||||
"--export-csv", "test_file.csv"
|
"--export-csv", "test_file.csv",
|
||||||
]
|
]
|
||||||
pargs = get_args(args)
|
pargs = get_args(args)
|
||||||
pargs['config'] = None
|
pargs['config'] = None
|
||||||
|
Loading…
Reference in New Issue
Block a user