Log the start of a submodule invocation.
(
logger,
step_id: Union[int, str],
tool_name: str,
spec: SubmoduleFunctionSpec,
parent_step_id: Union[int, str, None] = None,
parent_iteration: Optional[int] = None,
)
| 66 | |
| 67 | |
| 68 | def log_submodule_start( |
| 69 | logger, |
| 70 | step_id: Union[int, str], |
| 71 | tool_name: str, |
| 72 | spec: SubmoduleFunctionSpec, |
| 73 | parent_step_id: Union[int, str, None] = None, |
| 74 | parent_iteration: Optional[int] = None, |
| 75 | ) -> None: |
| 76 | """Log the start of a submodule invocation.""" |
| 77 | step_id_str = str(step_id) |
| 78 | logger.log_event( |
| 79 | logger, |
| 80 | "step_start", |
| 81 | { |
| 82 | "step_id": step_id_str, |
| 83 | "step_number": step_id_str, |
| 84 | "name": tool_name, |
| 85 | "step_type": "submodule_call", |
| 86 | "instruction": spec.description or "", |
| 87 | "depth": get_step_depth(step_id_str), |
| 88 | "parent_step_id": ( |
| 89 | str(parent_step_id) if parent_step_id is not None else None |
| 90 | ), |
| 91 | "parent_iteration": parent_iteration, |
| 92 | }, |
| 93 | ) |
| 94 | |
| 95 | |
| 96 | def log_submodule_end( |
nothing calls this directly
no test coverage detected