-
Notifications
You must be signed in to change notification settings - Fork 1
Pre-commit fix #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Former-commit-id: 84192c2dec51311450d1653e97979a50f39354cf
Title: Fix review suggestions https://aliyuque.antfin.com/bayotg/vpbyh0/pguna8cwykkggv0h Link: https://code.alibaba-inc.com/DAIL-LLM/astune/codereview/24622110 Former-commit-id: 38a4ab61dedcf8a0dd8214e25f85d7df60d89998
Former-commit-id: d20ebec369ce1abbf40b9684bf412b50599c1937
Title: remove trash and remove chinese Link: https://code.alibaba-inc.com/DAIL-LLM/astune/codereview/24641938 Former-commit-id: c4c183ad7d47c21dc969f151a86edc859bde6641
Added detailed observations on agent behavior and performance in werewolf simulations, including win rates and strategies.
Added a centered image and a tagline to the README.
Added detailed explanation of the Werewolves role-playing game as a multi-agent environment, including terms, workflow setup, configuration, debugging, and training instructions.
* Dev werewolves: change yaml and retry logic (#3) * Expand Werewolves documentation with multi-agent setup (#2) Added detailed explanation of the Werewolves role-playing game as a multi-agent environment, including terms, workflow setup, configuration, debugging, and training instructions. * rpg werewolves yaml update * werewolf expected_steps=3 (there are 3 werewolves, meaning usually 3 samples are generated per run) * fix all pre-commit (#4) * Document Math Agent training process This document outlines the steps to prepare data, build an Agent and Workflow, set up Rewards, and train a Math Agent from scratch, including code snippets and configuration details. * Revise AppWorld training documentation This update enhances the documentation for the AppWorld training process, providing detailed steps on preparing the environment, configuring the AgentScope workflow, and setting up the reward module. It also includes instructions for debugging and starting training, along with reference results and case observations. * Add Data Generator Reader (#5) * Add data generator reader --------- Co-authored-by: Xuchen Pan <32844285+pan-x-c@users.noreply.github.com> Co-authored-by: Yorick He <908536269@qq.com>
* rpg werewolves yaml update * werewolf expected_steps=3 (there are 3 werewolves, meaning usually 3 samples are generated per run) * for no-eos message, pad eos but loss_mask=0 * align math * add swanlab
* feat: add deduplication filter * fix: spacing in deduplication filter db_path configuration * refactor: remove unused chroma_id variable in embedding client
* docs: update docs * docs: fix images, formats, typos * docs: add hyperlinks to documentation sections in quickstart
* commit bad math agent * benchmark successful * connect test bot to test data server * patch native rollout * simplify tool call logging * enforce ray kill in autokill
feat: Add comprehensive metric tracking and trajectory persistence
Summary of ChangesHello @binary-husky, 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 rebrands the project from 'AgentScope Tune' to 'AgentJet' and introduces a comprehensive refactoring and expansion of its core functionalities. The changes focus on enhancing the agent training framework by updating development dependencies, improving configuration management, and modularizing various components related to task reading, judging, and model tuning. The new structure supports multiple training backbones (VERL, Trinity, and a debug VLLM mode) and introduces advanced features for data generation, context tracking, and experimental interchange servers. 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. Ignored Files
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
|
ae3ca83 to
0dfbc58
Compare
There was a problem hiding this 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 major refactoring, renaming the project from "ASTune" to "AgentJet" and restructuring it into a proper Python package. The changes significantly improve the project's organization, clarity, and user-friendliness, especially with the updated README and the introduction of a programmatic API. My review focuses on a few key areas: the pre-commit configuration, a placeholder in the documentation, and potential issues in the rollout and data processing logic that could impact functionality and user experience.
| hooks: | ||
| - id: black | ||
| language_version: python3.10 | ||
| args: [--line-length=999999] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting the line length to an extremely high value like 999999 effectively disables line length checking. This can lead to code that is difficult to read and review. It's a standard practice to enforce a reasonable line length to ensure code consistency and maintainability. I recommend setting this to a more conventional value, such as 120.
args: [--line-length=120]| if config.astune.rollout.mode == "async" | ||
| else ActorRolloutRefWorker | ||
| ) | ||
| actor_rollout_cls = AsyncActorRolloutRefWorker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic for selecting actor_rollout_cls has been simplified to always use AsyncActorRolloutRefWorker. The previous implementation allowed for a synchronous ActorRolloutRefWorker based on config.astune.rollout.mode. If synchronous rollouts are still intended to be supported, this change represents a regression in functionality. Please clarify if this change was intentional.
| if len(self.prompt_ids) > self.max_prompt_len: | ||
| truncate_any = True | ||
| print(f"-------------------------------------------------------------------------------------------------------") | ||
| print(f"Warning: prompt_ids length {len(self.prompt_ids)} exceeds max_prompt_len {self.max_prompt_len}, truncating.") | ||
| print(f"-------------------------------------------------------------------------------------------------------") | ||
| raise RuntimeError("Prompt length exceeds maximum allowed length. Please adjust the input data.") | ||
| self.prompt_ids = self.prompt_ids[-self.max_prompt_len:] | ||
| self.prompt_attention_mask = self.prompt_attention_mask[-self.max_prompt_len:] | ||
| self.prompt_position_ids = self.prompt_position_ids[-self.max_prompt_len:] | ||
| self.prompt_loss_mask = self.prompt_loss_mask[-self.max_prompt_len:] | ||
| self.prompt_logprobs = self.prompt_logprobs[-self.max_prompt_len:] | ||
|
|
||
| raise RuntimeError(f"Warning: prompt_ids length {len(self.prompt_ids)} exceeds max_prompt_len {self.max_prompt_len}, truncating.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code raises a RuntimeError if the prompt length exceeds max_prompt_len, but the error message misleadingly says "truncating." A hard crash can provide a poor user experience. Consider either implementing truncation as the commented-out code in the previous version suggested, or at least improving the error message to guide the user on how to resolve the issue (e.g., by suggesting they adjust max_prompt_length in their config or shorten their input data).
| author = {The AgentJet Team}, | ||
| url = {https://modelscope.github.io/AgentJet/}, | ||
| month = {01}, | ||
| year = {2026} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cf6110e to
1fc0663
Compare
No description provided.