Keep dimensions stored in hyperopt class
There is no point in regenerating them and it will cause some overhead as all space classes will be recreated for every epoch.
This commit is contained in:
@@ -695,7 +695,8 @@ def test_generate_optimizer(mocker, hyperopt_conf) -> None:
|
||||
hyperopt = Hyperopt(hyperopt_conf)
|
||||
hyperopt.min_date = Arrow(2017, 12, 10)
|
||||
hyperopt.max_date = Arrow(2017, 12, 13)
|
||||
hyperopt.dimensions = hyperopt.hyperopt_space()
|
||||
hyperopt.init_spaces()
|
||||
hyperopt.dimensions = hyperopt.dimensions
|
||||
generate_optimizer_value = hyperopt.generate_optimizer(list(optimizer_param.values()))
|
||||
assert generate_optimizer_value == response_expected
|
||||
|
||||
|
Reference in New Issue
Block a user