Implement session-level progress tracking
Add progress tracking to simulation sessions so users can monitor simulation progress and access completed conversations before the session finishes.
Suggested Requirements (not final)
Progress Object on Session
- Track completed/failed conversations during simulation
- Store current stage and counts
- Accessible from session object for querying
Failed Conversations
- Store failed conversations (just the conversation object for now)
- Separate collection from successful ones
Logging
- Periodic progress logging (max every 30 seconds)
- Log at start/end of each stage (intent extraction, conversations, adversarial test)
- No progress bars (due to intermitten text output)
Integration
- Use existing ProgressHandler callbacks to update progress object
- Single-threaded async flow (no thread safety needed)
- Compatible with future parallel execution (or even better, implement after the flow is already parallel)
Implementation Notes
- Progress object lives on SimulationSession
- Runners update via callbacks
- Simple logging, no fancy progress bars
@leonidb what exactly is missing?
- We need to add the ProgressCallback parameter to SimulationSession/Builder
- We should add a convenient method
on_conversation_started, instead of forcing the caller to detect it by remembering what conversations were reported on
Other than that, doesn't the callback work already? All the callback methods are passed the Conversation as an argument, so the same callback can be used with multiple conversations.
The callback is at conversation level. I'd like to have an aggregated progress logging, of each stage start/stop, and number of finished/in progress/not started conversations
The callback is at conversation level. I'd like to have an aggregated progress logging, of each stage start/stop, and number of finished/in progress/not started conversations
Yes, that makes sense. I'll add that.