Skip to content

fix : Fix test non-determinism:#52

Merged
arekay-nv merged 1 commit intomainfrom
arekay/fix_probe_test
Dec 12, 2025
Merged

fix : Fix test non-determinism:#52
arekay-nv merged 1 commit intomainfrom
arekay/fix_probe_test

Conversation

@arekay-nv
Copy link
Copy Markdown
Collaborator

@arekay-nv arekay-nv commented Dec 12, 2025

What does this PR do?

The probe command truncates the responses to the probe requests and only keeps the first 10 responses. This can cause test failures as the responses are out of order and particularly in CI the probe-0 would be missing in the first 10 requests.
The fix is to not truncate the responses which can be verbose but it prevents failures such as this one from creeping.

Closes #47

TODO

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)

Signed-off-by: Rashid Kaleem <230885705+arekay-nv@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 12, 2025 16:34
@arekay-nv arekay-nv requested a review from a team as a code owner December 12, 2025 16:34
@github-actions
Copy link
Copy Markdown

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

@github-actions github-actions Bot requested a review from nvzhihanj December 12, 2025 16:35
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @arekay-nv, 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 focuses on improving the debugging process for test non-determinism. It achieves this by adjusting the probe.py command to log all sample responses, providing a more thorough output that should aid in pinpointing the root causes of inconsistent test results.

Highlights

  • Enhanced Debugging Visibility: The probe.py command has been modified to display all collected sample responses during probing, rather than just the first ten. This change aims to provide a more comprehensive view for debugging.
  • Addressing Test Non-Determinism: This modification is specifically intended to assist in diagnosing and resolving non-deterministic test failures by offering a complete log of responses, which can help uncover subtle inconsistencies.
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

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses test non-determinism by modifying how probe responses are displayed. The change removes the artificial limit of showing only the first 10 responses, instead displaying all collected responses to aid in debugging.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/inference_endpoint/commands/probe.py
Comment thread src/inference_endpoint/commands/probe.py
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 aims to fix test non-determinism by changing how sample responses are logged. The current change removes the limit on the number of logged responses, which can lead to excessive output. I've suggested an alternative approach that sorts the responses before logging a subset, which fixes the non-determinism while keeping the logs concise.

Comment thread src/inference_endpoint/commands/probe.py
@arekay-nv arekay-nv merged commit c82b166 into main Dec 12, 2025
7 checks passed
@arekay-nv arekay-nv deleted the arekay/fix_probe_test branch December 12, 2025 18:07
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 12, 2025
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.

bug: probe test test_probe_shows_multiple_responses is failing non-deterministically

3 participants