Skip to content

Conversation

@addsubmuldiv
Copy link
Collaborator

PR type

  • Bug Fix
  • New Feature
  • Document Updates
  • More Models or Datasets Support

PR information

Write the detail information belongs to this PR.

Experiment results

Paste your experiment result here(if needed).

Copilot AI review requested due to automatic review settings November 18, 2025 12:13
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @addsubmuldiv, 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 addresses a bug within a specific test case, test_qwen2_5_math_reward, related to template encoding. The primary goal is to ensure the test accurately reflects the expected behavior of the template system by correcting a variable usage error and enhancing the test's coverage with an additional user message, which also necessitated an update to the expected output length.

Highlights

  • Test Case Correction: Fixed a bug in the test_qwen2_5_math_reward function where the template.print_inputs method was called with an incorrect variable (res instead of res2) when testing the jinja backend.
  • Test Case Enhancement: Expanded the test_qwen2_5_math_reward test case by adding an additional user message to the input, ensuring the template handles multi-turn conversations correctly.
  • Assertion Update: Updated the expected length of the encoded input IDs from 364 to 380 in test_qwen2_5_math_reward to reflect the addition of the new user message.
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
Contributor

@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 addresses a bug within the test_qwen2_5_math_reward test case. The changes involve updating the test's input data by adding another user turn to the conversation, which subsequently adjusts the expected token count in the assertion. A notable correction is the fix for a debug print statement that was previously printing an incorrect variable. These changes are accurate and enhance the correctness of the test.

template.template_backend = 'jinja'
res2 = template.encode(inputs)
template.print_inputs(res)
template.print_inputs(res2)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This change corrects a bug where the result of the first encoding (res) was being printed instead of the result from the jinja-backend encoding (res2). This ensures the debug output is accurate when comparing the two encoding methods.

Copy link

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 fixes a bug in the test_qwen2_5_math_reward test case where the wrong variable was being printed, and updates the test to include an additional user message in the conversation flow.

  • Fixed incorrect variable reference in print statement (was printing res instead of res2)
  • Added an additional user message to make the test more comprehensive
  • Updated expected input_ids length from 364 to 380 to account for the additional message

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

@Jintao-Huang
Copy link
Collaborator

#6656

This issue has been fixed in this PR.

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