Skip to content

Commit a0d22f6

Browse files
committed
Merge branch 'feat/evo-search-param' of https://github.com/AI-Enabled-Software-Testing/Hyperparameter-Tuning-Search-Project into feat/evo-search-param
2 parents 7d16825 + 827a0d3 commit a0d22f6

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

search/genetic_algorithm.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,8 @@ def evaluate_population(evals_done, params, eval_cache):
205205
offspring.append(child)
206206
attempts += 1
207207
# A Brief Checking
208-
assert len(offspring) < max_offspring, "Number of Offsprings should not exceed the allowed maximum"
209-
assert len(offspring) <= len(all_params), f"Evolved {len(offspring)} Offsprings should not exceed the total population of {len(all_params)}"
210-
208+
assert len(offspring) <= max_offspring, f"Number of Offsprings {len(offspring)} should not exceed the allowed maximum of {max_offspring}"
209+
211210
# 3. Mutation
212211
# We get a list of mutated children from crossover offsprings
213212
mutated_offspring: List[Dict[str, Any]] = []

0 commit comments

Comments
 (0)