-
Notifications
You must be signed in to change notification settings - Fork 54
Add examples for frozenlake and emailsearch #94
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
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.
Pull request overview
This PR adds two comprehensive examples demonstrating AgentScope-Tuner usage for reinforcement learning fine-tuning: FrozenLake (a grid navigation task) and Email Search (an information retrieval task). Both examples showcase multi-step agent-environment interactions with proper documentation and configuration.
Changes:
- Added FrozenLake example with agent, environment, utilities, data generation, configuration, and bilingual documentation
- Added Email Search example with agent, tools, database setup, judge function, configuration, and bilingual documentation
- Included training result visualizations (PNG files) for both examples
Reviewed changes
Copilot reviewed 15 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tuner/frozen_lake/main.py | Workflow function implementing multi-step agent-environment interaction for FrozenLake navigation |
| tuner/frozen_lake/get_frozenlake_data.py | Data generation script creating training/test datasets with random map configurations |
| tuner/frozen_lake/_frozenlake_env.py | Environment wrapper extending Gymnasium's FrozenLake with custom rendering and action handling |
| tuner/frozen_lake/_frozenlake_agent.py | ReActAgent implementation for FrozenLake with action parsing and state management |
| tuner/frozen_lake/_utils.py | Utility functions including map generation, validation, and prompt templates |
| tuner/frozen_lake/config.yaml | Training configuration with GRPO algorithm settings and model parameters |
| tuner/frozen_lake/README.md | English documentation explaining task, setup, and execution |
| tuner/frozen_lake/README_zh.md | Chinese documentation explaining task, setup, and execution |
| tuner/frozen_lake/critic_rewards_mean.png | Training reward visualization |
| tuner/email_search/main.py | Workflow and judge functions with LLM-as-a-Judge for email search tasks |
| tuner/email_search/prepare_data.py | Database setup script downloading and processing Enron email dataset |
| tuner/email_search/_email_search_agent.py | ReActAgent with email search and read tools |
| tuner/email_search/_utils.py | Tool implementations for searching/reading emails and data models |
| tuner/email_search/config.yaml | Training configuration with auxiliary judge model settings |
| tuner/email_search/README.md | English documentation with task description and example outputs |
| tuner/email_search/README_zh.md | Chinese documentation with task description and example outputs |
Comments suppressed due to low confidence (1)
tuner/email_search/prepare_data.py:1
- The path construction uses multiple '..' which makes it fragile and unclear. Consider using a more robust approach with
os.path.normpath()or defining a clear base directory constant to improve code clarity and maintainability.
# -*- coding: utf-8 -*-
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📝 PR Type
📚 Description
Add examples for frozenlake and emailsearch to show the usage of Agentscope-Tuner.
🧪 Testing Validation
Follow the README to run the examples.
✅ Checklist
Please complete the following checks before submitting the PR:
pre-commit run --all-filespytest tests/)agentscopebest practices (e.g., config management, logging)agentscope-sampleshas been updated (e.g.,README.md)