Logger#

(hivenas.utils.logger)

Main event logging methods

class Logger[source]#

Bases: object

Wrapper for debug- and info-logging methods

EVALUATION_LOGGING = False#
static debug(msg=None)[source]#

Debugging messages

Parameters

msg (str, optional) – debug message, defaults to “MARK” to indicate whether the statement is reached

static end_log()[source]#

Logs total time taken upon optimization end

static evaluation_log(type, id, candidate_pos)[source]#

Logs pre-evaluation info for every candidate

Parameters
  • type (str) – bee type (Employee/Onlooker)

  • id (int) – bee ID

  • candidate_pos (str) – candidate position on the solution surface (the string-encoded architecture in the case of NAS)

static filesave_log(candidate, filename)[source]#

Logs candidate info upon file-save

Parameters
  • candidate (str) – candidate string representation (architecture in the case of NAS)

  • filename (str) – output filename

static momentum_evaluation_log(candidate, fitness, epochs)[source]#

Logs momentum evaluation augmentation info

Parameters
  • candidate (str) – candidate string representation (architecture in the case of NAS)

  • fitness (float) – fitness value

  • epochs (int) – number of additional momentum epochs assigned

static start_log()[source]#

Logs the start msg and intializes the global timer

static status(itr, msg=None)[source]#

Generic logging

Parameters
  • itr (int) – current optimization iteration

  • msg (str, optional) – status message, defaults to “MARK” to indicate whether the statement is reached