Skip to content

Conversation

@hiyuchang
Copy link

📝 PR Type

  • Add new sample
  • Update existing sample
  • Add new test cases
  • Fix test failures
  • Documentation/Configuration update

📚 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:

  • All sample code has been formatted with pre-commit run --all-files
  • All new/modified test cases have passed (run pytest tests/)
  • Test coverage has not decreased (if applicable)
  • Sample code follows agentscope best practices (e.g., config management, logging)
  • Related documentation in agentscope-samples has been updated (e.g., README.md)

@hiyuchang hiyuchang requested a review from a team January 9, 2026 02:33
@cla-assistant
Copy link

cla-assistant bot commented Jan 9, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

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 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.

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.

1 participant