geometor.arcprize.solvers.gemini_logger

class geometor.arcprize.solvers.gemini_logger.PuzzleSession(output_dir: str, puzzle_id: str, timestamp: str | None = None)[source]

Bases: object

A central object to hold all data related to a puzzle solving session.

to_dict()[source]

Return the entire session data as a dictionary.

save_session_json()[source]

Save the current session as a JSON file.

add_step(step_data: dict)[source]

Add a step to the session.

log_error(error_message: str, details: str = '')[source]

Log an error to the session.

class geometor.arcprize.solvers.gemini_logger.Indexer(output_dir: str, puzzle_id: str, timestamp: str)[source]

Bases: object

Manages the creation and updating of session, puzzle, and main index files.

update_session_results()[source]

Generate and update session results summary.

update_indices()[source]

Update all indices including results summary.

write_detailed_results(puzzle_dir: Path)[source]

Generate detailed results page for a puzzle.

class geometor.arcprize.solvers.gemini_logger.Logger(puzzle_session: PuzzleSession)[source]

Bases: object

save_response(response: dict, call_count: int)[source]

Save raw response data as JSON.

write_rst_log(log_list: list, log_type: str, call_count: int, description='')[source]

Write log as RST file and handle any images.

save_grid_image(grid_image, call_count: int, context: str) Path[source]

Save a grid image with deduplication.

parameters

grid_image :

PIL Image to save

call_count :

Current call number

context :

Image context (e.g., ‘example_1_input’, ‘working’)

returns

rel_pathPath

Relative path to the image file