MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / log_submodule_start

Function log_submodule_start

src/harness/submodules/invoker.py:68–93  ·  view source on GitHub ↗

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,
)

Source from the content-addressed store, hash-verified

66
67
68def 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
96def log_submodule_end(

Callers

nothing calls this directly

Calls 2

get_step_depthFunction · 0.85
log_eventMethod · 0.80

Tested by

no test coverage detected