Loggers¶
- class llamea.loggers.ExperimentLogger(name='')¶
Bases:
object
- create_log_dir(name='')¶
Creates a new directory for logging experiments based on the current date and time. Also creates subdirectories for IOH experimenter data and code files.
- Returns:
str: The name of the created directory.
- log_code(attempt, algorithm_name, code)¶
Logs the provided code into a file, uniquely named based on the attempt number and algorithm name.
- Args:
attempt (int): The attempt number of the code execution. algorithm_name (str): The name of the algorithm used. code (str): The source code to be logged.
- log_configspace(attempt, algorithm_name, config_space)¶
Logs the provided configuration space (str) into a file, uniquely named based on the attempt number and algorithm name.
- Args:
attempt (int): The attempt number of the code execution. algorithm_name (str): The name of the algorithm used. config_space (ConfigSpace): The Config space to be logged.
- log_conversation(role, content)¶
Logs the given conversation content into a conversation log file.
- Args:
role (str): Who (the llm or user) said the content. content (str): The conversation content to be logged.
- log_individual(individual)¶
Logs the given individual in a general logfile.
- Args:
individual (Individual): potential solution to be logged.
- log_population(population)¶
- set_attempt(attempt)¶
- llamea.loggers.convert_to_serializable(data)¶