nemo_gym.trajectory.tool_timing
nemo_gym.trajectory.tool_timing
Normalize adapter evidence into attempt-owned tool measurements and exact capture joins.
Module Contents
Functions
API
Import the complete raw span namespace once, before generating any diagnostics.
Canonical tools already own qualified IDs. Only raw observations participate in raw-gap lookup; model/failure IDs and conversation call references are untouched. Gaps carry no producer ID, so an ambiguous local reference stays explicitly unresolved.
Retain an unattributable diagnostic without asserting a canonical span reference.
Salvage usable native measurements without clamping invalid endpoints or inventing time.
Resolve one record per attempt after capture merge, retaining uncertainty as scoped gaps.
Input-only producer identity/message/model references stay in bundles for replay. Native call IDs verify an exact model reference; by themselves they never select a model attempt. Pass raw bundle diagnostics via observation_gaps so they cross the same import boundary. Returned span-scoped gaps resolve to retained tools; unresolved references keep their raw span and reason in detail without claiming a canonical span. Canonical input gaps stay with their trajectory and do not cross this raw import boundary again.
Derive a replay-stable ID from persisted operation identity, never timestamp or content.
A more definite outcome can replace a partial snapshot, never the reverse.
Read one explicitly linked output from the same source snapshot as the tool.