Skip to content

Output

output

Helper functions for output formatting and logging.

get_output_format(cost_str: str, time_limit: Optional[int], max_steps: Optional[int]) -> tuple[str, str]

Get output format string for logging.

Parameters:

Name Type Description Default
cost_str str

String representation of the cost.

required
time_limit Optional[int]

Time limit in seconds (or None for unlimited).

required
max_steps Optional[int]

Maximum number of steps (or None for unlimited).

required

Returns:

Type Description
tuple[str, str]

Tuple containing header format and iteration format strings.