Skip to content

EventRecorder changes to support evaluators and reasoning strings#48

Merged
nv-alicheng merged 9 commits intomainfrom
feature/alicheng-eventdb-update
Dec 16, 2025
Merged

EventRecorder changes to support evaluators and reasoning strings#48
nv-alicheng merged 9 commits intomainfrom
feature/alicheng-eventdb-update

Conversation

@nv-alicheng
Copy link
Copy Markdown
Collaborator

What does this PR do?

  • Moves output logging to EventDB from output JSONL file
  • Extends output logging functionality to allow tracking reasoning sequences for Issuers+Endpoints that support it
  • Adds STOP_PERFORMANCE_TRACKING event to mark a timestamp which removes any samples issued after it from performance metrics calculation

Type of change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor/cleanup

Related issues

Testing

  • Tests added/updated
  • All tests pass locally
  • Manual testing completed

Checklist

  • Code follows project style
  • Pre-commit hooks pass
  • Documentation updated (if needed)

@nv-alicheng nv-alicheng requested a review from a team as a code owner December 11, 2025 20:58
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 11, 2025

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @nv-alicheng, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refactors the event recording and reporting system to improve the robustness and utility of performance and accuracy metrics. By transitioning from a simple JSONL file to a SQLite database for event storage, the system can now capture more detailed information, including reasoning sequences. Furthermore, the introduction of a dedicated event to stop performance tracking allows for more accurate and controlled measurement of performance, ensuring that only relevant samples contribute to the final metrics.

Highlights

  • Event Logging Refactor: Output logging has been moved from a flat JSONL file to a more structured SQLite EventDB, enhancing data integrity and query capabilities.
  • Reasoning Sequence Tracking: The event logging functionality is extended to support tracking reasoning sequences for Issuers and Endpoints that provide this information, allowing for richer evaluation data.
  • Performance Tracking Control: A new STOP_PERFORMANCE_TRACKING event has been introduced. This event marks a timestamp after which any issued samples will be excluded from performance metrics calculations, providing more precise control over performance evaluation windows.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the event recording system to use a SQLite database (EventDB) instead of a JSONL file for logging outputs. This change supports more structured data, including 'reasoning' sequences for evaluators. A new STOP_PERFORMANCE_TRACKING event is introduced to allow for more precise performance measurement by excluding samples issued after a certain point. The changes are extensive, touching event generation, session management, and metrics reporting. My review focuses on the correctness and maintainability of these new implementations. I've found a critical bug in the session logic and a couple of medium-severity issues related to type hints and code duplication that should be addressed.

Comment thread src/inference_endpoint/load_generator/session.py Outdated
Comment thread src/inference_endpoint/load_generator/load_generator.py Outdated
Comment thread src/inference_endpoint/metrics/recorder.py Outdated
Copy link
Copy Markdown
Collaborator

@arekay-nv arekay-nv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial review. Will followup later.

Comment thread src/inference_endpoint/load_generator/session.py Outdated
Comment thread src/inference_endpoint/load_generator/session.py
Comment thread tests/performance/test_recorder.py
Comment thread src/inference_endpoint/metrics/reporter.py Outdated
Comment thread src/inference_endpoint/metrics/reporter.py
Copy link
Copy Markdown
Collaborator

@arekay-nv arekay-nv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Comment thread tests/unit/metrics/test_reporter.py
@nv-alicheng nv-alicheng force-pushed the feature/alicheng-eventdb-update branch from 3f99805 to 5bcdd3e Compare December 15, 2025 20:10
Comment thread src/inference_endpoint/metrics/reporter.py Fixed
Comment thread src/inference_endpoint/metrics/reporter.py Fixed
@nv-alicheng nv-alicheng force-pushed the feature/alicheng-eventdb-update branch from 5bcdd3e to 32dab76 Compare December 15, 2025 20:39
@nvzhihanj nvzhihanj requested a review from viraatc December 15, 2025 21:38
Comment thread src/inference_endpoint/load_generator/load_generator.py
@nv-alicheng nv-alicheng force-pushed the feature/alicheng-eventdb-update branch from ae1b500 to 07a6d50 Compare December 16, 2025 20:56
Comment thread src/inference_endpoint/metrics/reporter.py Outdated
Comment thread src/inference_endpoint/metrics/reporter.py
Comment thread src/inference_endpoint/metrics/reporter.py
Comment thread src/inference_endpoint/metrics/reporter.py
@nv-alicheng nv-alicheng merged commit e74bf6c into main Dec 16, 2025
4 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 16, 2025
@arekay-nv arekay-nv deleted the feature/alicheng-eventdb-update branch April 2, 2026 03:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants