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

Function log_submodule_end

src/harness/submodules/invoker.py:96–112  ·  view source on GitHub ↗

Log the end of a submodule invocation.

(
    logger,
    step_id: Union[int, str],
    tokens: int,
    status: str = "completed",
    error: Optional[str] = None,
)

Source from the content-addressed store, hash-verified

94
95
96def log_submodule_end(
97 logger,
98 step_id: Union[int, str],
99 tokens: int,
100 status: str = "completed",
101 error: Optional[str] = None,
102) -> None:
103 """Log the end of a submodule invocation."""
104 step_id_str = str(step_id)
105 event_data = {
106 "step_id": step_id_str,
107 "tokens": tokens,
108 "status": status,
109 }
110 if error:
111 event_data["error"] = error
112 logger.log_event(logger, "step_end", event_data)

Callers

nothing calls this directly

Calls 1

log_eventMethod · 0.80

Tested by

no test coverage detected