Ignore:
Timestamp:
05/08/21 12:42:58 (3 years ago)
Author:
Maciej Komosinski
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • framspy/evolalg/base/step.py

    r1113 r1139  
     1import logging
    12from abc import abstractmethod
    23
     
    78
    89    """
     10
     11    def __init__(self, name=None):
     12        self.name = name
     13        if name is None:
     14            self.name = type(self).__name__
     15
     16
    917    def pre(self):
    1018        pass
    1119
    1220    @abstractmethod
    13     def call(self, *args, **kwargs):
    14         pass
     21    def call(self, population, *args, **kwargs):
     22        logging.getLogger(self.name).debug(f"Population size {len(population)}")
    1523
    1624    def post(self):
Note: See TracChangeset for help on using the changeset viewer.