FlatFile

class ioh.iohcpp.logger.FlatFile(self, triggers: collections.abc.Sequence[ioh.iohcpp.logger.trigger.Trigger], properties: collections.abc.Sequence[ioh.iohcpp.logger.property.AbstractProperty], filename: str = 'IOH.dat', output_directory: str | os.PathLike = './', separator: str = '\t', comment: str = '#', no_value: str = 'None', end_of_line: str = '\n', repeat_header: bool = False, store_positions: bool = False, common_header_titles: collections.abc.Sequence[str] = ['suite_name', 'problem_name', 'problem_id', 'problem_instance', 'optimization_type', 'dimension', 'run'])

Bases: AbstractLogger

A logger which stores all tracked properties to a file.

Parameters:
  • triggers (list[Trigger]) – List of triggers, i.e. when to trigger logging

  • properties (list[Property]) – The list of properties to keep track of

  • filename (str = "IOH.dat") – The file to log to

  • output_directory (str = "./") – The path to which to write the file

  • separator (str = "t") – The column seperator

  • comment (str = "#") – The comment character

  • no_value (str = "None") – The NaN character

  • end_of_line (str = "n") – The eol character

  • repeat_header (bool = false) – Boolean value which indicates whether to repeat the header for every new run.

  • store_positions (bool = false) – Boolean value which indicates whether to store the x-positions in the file

Attributes Summary

filename

(self) -> str

full_precision

Write values with round-trip precision (%.17g) instead of %.10f.

output_directory

(self) -> str

problem

Reference to the currently attached problem

Methods Summary

add_trigger(self, arg, /)

Add a trigger to the logger

attach_problem(self, problem)

attach a problem (MetaData) to a logger

call(self, arg, /)

Performs logging behaviour

reset(self)

Reset the state of the logger

watch(-> None -> None)

Attributes Documentation

filename

(self) -> str

full_precision

Write values with round-trip precision (%.17g) instead of %.10f. Set it before the first problem is attached.

output_directory

(self) -> str

problem

Reference to the currently attached problem

Methods Documentation

add_trigger(self, arg: ioh.iohcpp.logger.trigger.Trigger, /) → None

Add a trigger to the logger

attach_problem(self, problem: ioh.iohcpp.MetaData) → None

attach a problem (MetaData) to a logger

call(self, arg: ioh.iohcpp.LogInfo, /) → None

Performs logging behaviour

reset(self) → None

Reset the state of the logger

watch(self, arg: ioh.iohcpp.logger.property.AbstractProperty, /) → None
watch(self, arg0: object, arg1: str, /) → None
watch(self, arg0: object, arg1: collections.abc.Sequence[str], /) → None