MCPcopy Index your code
hub / github.com/DEAP/deap / record

Method record

deap/tools/support.py:333–347  ·  view source on GitHub ↗

Enter a record of event in the logbook as a list of key-value pairs. The information are appended chronologically to a list as a dictionary. When the value part of a pair is a dictionary, the information contained in the dictionary are recorded in a chapter entitled as the na

(self, **infos)

Source from the content-addressed store, hash-verified

331 """
332
333 def record(self, **infos):
334 """Enter a record of event in the logbook as a list of key-value pairs.
335 The information are appended chronologically to a list as a dictionary.
336 When the value part of a pair is a dictionary, the information contained
337 in the dictionary are recorded in a chapter entitled as the name of the
338 key part of the pair. Chapters are also Logbook.
339 """
340 apply_to_all = {k: v for k, v in infos.items() if not isinstance(v, dict)}
341 for key, value in list(infos.items()):
342 if isinstance(value, dict):
343 chapter_infos = value.copy()
344 chapter_infos.update(apply_to_all)
345 self.chapters[key].record(**chapter_infos)
346 del infos[key]
347 self.append(infos)
348
349 def select(self, *names):
350 """Return a list of values associated to the *names* provided

Callers 15

harmFunction · 0.95
eaSimpleFunction · 0.95
eaMuPlusLambdaFunction · 0.95
eaMuCommaLambdaFunction · 0.95
eaGenerateUpdateFunction · 0.95
test_pickle_logbookMethod · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95

Calls 2

appendMethod · 0.80
updateMethod · 0.45

Tested by 5

test_pickle_logbookMethod · 0.76
test_multi_chaptersMethod · 0.64
test_one_chapterMethod · 0.64
test_one_big_chapterMethod · 0.64
test_no_chaptersMethod · 0.64