haive.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 haive.games.hold_em.engine_logging.EngineInvocationLogger(console=None, debug_mode=True)[source]¶

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)[source]¶

Create an enhanced invoke method with logging.

Parameters:

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

Return type:

collections.abc.Callable

enhance_engine(engine)[source]¶

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)[source]¶

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)[source]¶

Context manager for engine invocations.

Parameters:
  • engine_name (str)

  • input_data (Any)

log_invocation_end(invocation_info, result, error=None)[source]¶

Log the end of an engine invocation.

Parameters:
log_invocation_start(engine_name, input_data)[source]¶

Log the start of an engine invocation.

Parameters:
  • engine_name (str)

  • input_data (Any)

Return type:

dict[str, Any]

print_invocation_tree()[source]¶

Print a tree view of all invocations.

print_timing_summary()[source]¶

Print a summary of engine timing statistics.

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

Bases: haive.core.engine.aug_llm.AugLLMConfig

AugLLMConfig with enhanced logging capabilities.

Init .

Parameters:

logger (EngineInvocationLogger | None)

create_runnable(runnable_config=None)[source]¶

Create runnable with logging enhancement.

haive.games.hold_em.engine_logging.enhance_game_engines(engines, logger=None)[source]¶

Enhance game engines with logging.

Parameters:
Return type:

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

haive.games.hold_em.engine_logging.enhance_player_engines(engines, logger=None)[source]¶

Enhance player engines with logging.

Parameters:
Return type:

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