INNER CODE UNIT · Python
__init__
joeddav/devol · devol/devol.py:40
def __init__(self, genome_handler, data_path=""):
"""
Initialize a DEvol object which carries out the training and evaluation
of a genetic search.
Args:
genome_handler (GenomeHandler): the genome handler object defining
the restrictions for the architecture search space
data_path (str): the file which the genome encodings and metric data
will be stored in
"""
self.genome_handler = genome_handler
self.datafile = data_path or (datetime.now().ctime() + '.csv')
self._bssf = -1
if os.path.isfile(data_path) and os.stat(data_path).st_size > 1:
raise ValueError(('Non-empty file %s already exists. Please change'
'file path to prevent overwritten genome data.'