source: framspy/evolalg/utils/ @ 1139

Last change on this file since 1139 was 1139, checked in by Maciej Komosinski, 3 years ago

Added --debug mode that prints names of steps; final multiple evaluation now evaluates genotypes in hall of fame instead of the last population

File size: 441 bytes
1from typing import Iterable, Union, List
3from evolalg.base.step import Step
4import copy
6def propagate_names(step: Step, prefix=""):
8    if isinstance(step, Iterable):
9        for s in step:
10            if hasattr(step, "name"):
11                propagate_names(s, prefix=prefix + "." +
12            else:
13                propagate_names(s, prefix=prefix)
14    if hasattr(step, "name"):
15 = f"{prefix}.{}"
Note: See TracBrowser for help on using the repository browser.