games.hold_em.engine_logging¶

Enhanced engine invocation with Rich logging and debugging.

Classes¶

EngineInvocationLogger

Rich logging for engine invocations with debugging capabilities.

LoggedAugLLMConfig

AugLLMConfig with enhanced logging capabilities.

Functions¶

enhance_game_engines(engines[, logger])

Enhance game engines with logging.

enhance_player_engines(engines[, logger])

Enhance player engines with logging.

Module Contents¶

class games.hold_em.engine_logging.EngineInvocationLogger(console=None, debug_mode=True)¶

Rich logging for engine invocations with debugging capabilities.

Init .

Parameters:
  • console (rich.console.Console | None) – [TODO: Add description]

  • debug_mode (bool) – [TODO: Add description]

create_enhanced_invoke(engine)¶

Create an enhanced invoke method with logging.

Parameters:

engine (haive.core.engine.aug_llm.AugLLMConfig)

Return type:

collections.abc.Callable

enhance_engine(engine)¶

Enhance an engine with logging capabilities.

Parameters:

engine (haive.core.engine.aug_llm.AugLLMConfig)

Return type:

haive.core.engine.aug_llm.AugLLMConfig

enhance_engines_dict(engines)¶

Enhance all engines in a dictionary.

Parameters:

engines (dict[str, haive.core.engine.aug_llm.AugLLMConfig])

Return type:

dict[str, haive.core.engine.aug_llm.AugLLMConfig]

invocation_context(engine_name, input_data)¶

Context manager for engine invocations.

Parameters:
  • engine_name (str)

  • input_data (Any)

log_invocation_end(invocation_info, result, error=None)¶

Log the end of an engine invocation.

Parameters:
log_invocation_start(engine_name, input_data)¶

Log the start of an engine invocation.

Parameters:
  • engine_name (str)

  • input_data (Any)

Return type:

dict[str, Any]

print_invocation_tree()¶

Print a tree view of all invocations.

print_timing_summary()¶

Print a summary of engine timing statistics.

class games.hold_em.engine_logging.LoggedAugLLMConfig(*args, logger=None, **kwargs)¶

Bases: haive.core.engine.aug_llm.AugLLMConfig

AugLLMConfig with enhanced logging capabilities.

Init .

Parameters:

logger (EngineInvocationLogger | None)

create_runnable(runnable_config=None)¶

Create runnable with logging enhancement.

games.hold_em.engine_logging.enhance_game_engines(engines, logger=None)¶

Enhance game engines with logging.

Parameters:
Return type:

dict[str, haive.core.engine.aug_llm.AugLLMConfig]

games.hold_em.engine_logging.enhance_player_engines(engines, logger=None)¶

Enhance player engines with logging.

Parameters:
Return type:

dict[str, haive.core.engine.aug_llm.AugLLMConfig]