Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add total and working time to model, tool, and subtask events #1415

Merged
merged 17 commits into from
Feb 27, 2025

Conversation

jjallaire
Copy link
Collaborator

@jjallaire jjallaire commented Feb 26, 2025

All events currently carry a timestamp for the clock time when they start, with this PR we add several fields to events to track the working time at which they start as well as the duration of clock and working time consumed by events which occur over a span (ModelEvent,ToolEvent,SubtaskEvent).

Here are the fields and which events they apply to:

Event Description Events
timestamp Clock time at which event occurred. All
completed Clock time at which event completed. ModelEvent, ToolEvent, SubtaskEvent
working_start   Working time (within sample) when the event occurred. All
working_time Working time consumed by the event ModelEvent, ToolEvent, SubtaskEvent

ForToolEvent and SubtaskEvent the completed/working tracking is trivial as we start execution, create the event, and update the event all in the same stack frame.

For ModelEvent, we start execution outside of a semaphore and then potentially several ModelEvent instances can be added to the transcript (none of which are visible in the outer stack frame). We navigate this by searching for and updating the last ModelEvent in the transcript from the outer stack frame.

@dragonstyle We need to figure out how to display this data in the viewer.

Viewer Changes

Timing In model event (all subsection)
Screenshot 2025-02-26 at 8 15 46 PM
Event titles now include working time (model, tool calls, subtask)
Screenshot 2025-02-26 at 8 15 28 PM Screenshot 2025-02-26 at 8 15 23 PM
Working start time for all events
Screenshot 2025-02-26 at 8 17 23 PM

@jjallaire jjallaire merged commit fe1372d into main Feb 27, 2025
11 checks passed
@jjallaire jjallaire deleted the feature/event-working branch February 27, 2025 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants