-
Notifications
You must be signed in to change notification settings - Fork 47
AsymRE #187
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
AsymRE #187
Conversation
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.
Summary of Changes
Hello @yaochaorui, 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 the AsymRE (Asymmetric Reward Engineering) algorithm, integrating its core components into the system. It includes a practical example demonstrating AsymRE's application on the MATH dataset and enhances the existing compute_score utility to support raw dataset formats, ensuring robust evaluation capabilities.
Highlights
- AsymRE Algorithm Implementation: The core AsymRE algorithm has been integrated, including new AsymREAddStrategy for experience grouping and advantage calculation, and ASYMREAdvantageFn for computing advantages based on outcome rewards with a configurable baseline shift.
- MATH Dataset Example: A new example directory (examples/asymre_math/) has been added, complete with README.md and configuration files (math.yaml, train_math.yaml), to showcase how to use the AsymRE algorithm with the MATH dataset.
- Enhanced compute_score Utility: The compute_score function in trinity/utils/eval_utils.py has been updated to correctly process ground truth values that are either 'boxed' or raw strings, improving its flexibility and accuracy for evaluation.
- New Unit Tests for compute_score: Comprehensive unit tests have been added for the compute_score function in tests/utils/eval_utils_test.py, covering various scenarios to ensure its reliability and correctness across different input formats.
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. 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
-
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. ↩
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 the AsymRE algorithm, complete with its core logic, an example using the MATH dataset, and necessary updates to utility functions. The implementation is well-structured. My review includes suggestions for improving configuration file maintainability, enhancing test suite clarity, refining error handling practices, and adding valuable metrics, all aimed at increasing the robustness and quality of the codebase.
022d8eb to
136a66d
Compare
|
/unittest-all |
Summary
Failed Tests
Tests
Github Test Reporter by CTRF 💚 |
46348fd to
e7dc121
Compare
|
/unittest-module-common |
Summary
Failed Tests
Tests
Github Test Reporter by CTRF 💚 |
|
/unittest-module-common |
1 similar comment
|
/unittest-module-common |
Summary
Tests
Github Test Reporter by CTRF 💚 |
yanxi-chen
left a comment
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.
lgtm
Description
This PR implemented the AsymRE algorithm.
Summary of Changes:
Implemented the core AsymRE algorithm.
Added an example demonstrating AsymRE on the MATH dataset.
Extended the compute_score utility to support the raw dataset.
Included necessary adaptations and fixes for integration.
Checklist
Please check the following items before code is ready to be reviewed.