Skip to content

Commit

Permalink
test warm_start_configs
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigo-arenas committed Sep 12, 2024
1 parent a84e7ba commit 265cda8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sklearn_genetic/space/space.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def sample_warm_start(self, warm_start_values: dict):
if param in warm_start_values:
sampled_params[param] = warm_start_values[param]
else:
sampled_params[param] = dimension.sample() # Random sample if no warm-start value
sampled_params[param] = dimension.sample()
return sampled_params

@property
Expand Down
2 changes: 2 additions & 0 deletions sklearn_genetic/tests/test_genetic_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,8 @@ def test_expected_ga_schedulers():
"average": Categorical([True, False]),
"max_iter": Integer(700, 1000),
},
warm_start_configs=[{"l1_ratio": 0.5, "alpha": 0.5, "average": False, "max_iter": 400},
{"l1_ratio": 0.2, "alpha": 0.8, "average": True, "max_iter": 400}],
verbose=False,
algorithm="eaSimple",
n_jobs=-1,
Expand Down

0 comments on commit 265cda8

Please sign in to comment.