Skip to content

Conversation

@garyzhang99
Copy link
Collaborator

Description

As the title says. Referenced from https://github.com/NVlabs/Tool-N1.

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has passed all tests
  • Docstrings have been added/updated in Google Style
  • Documentation has been updated
  • Code is ready for review

@garyzhang99 garyzhang99 requested a review from pan-x-c July 22, 2025 06:44
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.

Summary of Changes

Hello @garyzhang99, 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 introduces a complete pipeline for training models on tool-calling tasks, specifically leveraging the ToolAce dataset. It encompasses a new workflow that handles prompt formatting and reward computation, a dedicated script for data preparation, and example configurations to facilitate the setup and execution of GRPO-based training runs. The changes aim to expand the framework's capabilities for advanced model training scenarios involving external tools.

Highlights

  • New Tool-Calling Workflow: I've added a ToolCallWorkflow to enable training models on tool-calling tasks. This workflow integrates prompt construction and reward calculation logic adapted from the NVlabs/Tool-N1 project.
  • ToolAce Dataset Support: This PR introduces full support for the ToolAce dataset, including a dedicated data preprocessing script (scripts/data_prepare/get_toolace_data.py) to prepare the data for the new workflow.
  • Example Configuration: I've provided comprehensive example configuration files (examples/grpo_toolcall/toolace.yaml and examples/grpo_toolcall/train_toolace.yaml) for running GRPO (Generative Reinforcement Learning with Policy Optimization) training on the ToolAce dataset.
  • Documentation: A new README.md file (examples/grpo_toolcall/README.md) has been added to guide users on how to set up and run the tool-calling training example.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 or fill out our survey to provide feedback.

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 introduces a new workflow and example for tool-call training using the ToolAce dataset. The changes include data preparation scripts, workflow implementation, and configuration files. The code is generally well-structured and follows the project's patterns. I've provided some suggestions to improve robustness, clarity, and adherence to best practices, including fixing a potential IndexError, improving exception handling, and cleaning up some redundant code. Overall, this is a solid contribution.

garyzhang99 and others added 5 commits July 22, 2025 14:52
Apply some gemini code review suggestions.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@garyzhang99 garyzhang99 merged commit b7a89f8 into agentscope-ai:main Jul 22, 2025
2 checks passed
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