logger.Logger
Class Logger
Class for maintaining a dictionary of data to log.
Methods
init
__init__(logging_dir)
Initializes Logger.
Args:
logging_dir
: str, Directory to which logs are written.
setitem
__setitem__(
key,
value
)
This method will set an entry at key with value in the dictionary.
It will effectively overwrite any previous data at the same key.
Args:
key
: str, indicating key where to write the entry.value
: A python object to store.
is_logging_enabled
is_logging_enabled()
Return if logging is enabled.
log_to_file
log_to_file(
filename_prefix,
iteration_number
)
Save the pickled dictionary to a file.
Args:
filename_prefix
: str, name of the file to use (without iteration
number).iteration_number
: int, the iteration number, appended to the end of
filename_prefix.