Fixes derive_duration calculation bug introduced by the adding of STOP_PERFORMANCE_TRACKING event#70
Conversation
…b integrity checks since many queries are needed to be executed
…re removed in PR#55
|
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
Summary of ChangesHello @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 resolves a critical bug in the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request effectively addresses a bug in the derive_duration calculation by correctly identifying the final performance sample completion time, rather than relying on the STOP_PERFORMANCE_TRACKING event's timestamp. The new logic is more robust, and the detailed docstring is very helpful. The addition of comprehensive unit tests, including those for the new check_malformed parameter, is excellent and significantly improves confidence in the change. The cleanup of obsolete method calls in the performance tests is also a welcome improvement. I've identified one potential edge case that could lead to a TypeError and a minor style issue in the tests.
…db and derive_duration is called
arekay-nv
left a comment
There was a problem hiding this comment.
Thanks for the quick fix and the comprehensive tests!
What does this PR do?
When STOP_PERFORMANCE_TRACKING was implemented, the algorithm for derive_duration incorrectly assumed that the event would only be recorded after all performance samples were completed. This change fixes the algorithm to correctly search for the timestamp of the final SampleEvent.COMPLETE among the sample_uuids issued before STOP_PERFORMANCE_TRACKING.
In addition, also adds a minor bugfix to remove calls to no longer existing methods in performance tests, which were not caught by CICD.
Type of change
Related issues
Testing
Checklist