Skip to content

Commit

Permalink
first checkpointing test to only compare active population
Browse files Browse the repository at this point in the history
  • Loading branch information
oskar-taubert committed Sep 18, 2024
1 parent 40c688d commit 91738de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_island.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def test_islands_checkpointing(
# Run actual optimization.
islands.propulate(debug=2)

old_population = copy.deepcopy(islands.propulator.population)
old_population = copy.deepcopy(islands.propulator._get_active_individuals()[0])
del islands

islands = Islands(
Expand All @@ -190,7 +190,7 @@ def test_islands_checkpointing(
checkpoint_path=mpi_tmp_path,
)

assert len(deepdiff.DeepDiff(old_population, islands.propulator.population, ignore_order=True)) == 0
assert len(deepdiff.DeepDiff(old_population, list(islands.propulator.population.values()), ignore_order=True)) == 0
islands.propulate()
log.handlers.clear()

Expand Down

0 comments on commit 91738de

Please sign in to comment.