paraqeet.file_logger.FileLogger#

class paraqeet.file_logger.FileLogger(logdir='.')#

Bases: Logger

Logger that writes messages to a file.

Parameters:

logdir (str=".") – Destination directory to store the logs.

__init__(logdir='.')#
Parameters:

logdir (str)

Return type:

None

Methods

__init__([logdir])

log(params, infidelity)

Write the formatted parameters and the goal to the log file.

start()

Start logging.

stop([result_message])

Stop logging and end the log file with the run information.

Attributes

logdir

Returns the current log directory.

log(params, infidelity)#

Write the formatted parameters and the goal to the log file.

Parameters:
  • params (list[Quantity]) – List of quantities to be written to the log file.

  • infidelity (float) – Goal value to be written to the log file.

property logdir: str#

Returns the current log directory.

start()#

Start logging.

stop(result_message=None)#

Stop logging and end the log file with the run information.

Parameters:

result_message (str | None = None) – The message that the user wants to write at the end of the log file.