-
Notifications
You must be signed in to change notification settings - Fork 47
Add Step-wise Workflow #130
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
Add Step-wise Workflow #130
Conversation
|
/run-unittest |
Summary
Failed Tests
Tests
Github Test Reporter by CTRF 💚 |
|
/run-unittest |
Summary
Failed Tests
Tests
Github Test Reporter by CTRF 💚 |
|
/run-unittest |
Summary
Tests
Github Test Reporter by CTRF 💚 |
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 introduces a comprehensive step-wise workflow system for fine-grained experience management and reward calculation. The main changes enhance the framework's capability to handle step-by-step task execution with improved experience tracking and grouping functionality.
- Introduces step-wise workflow base classes that decouple task execution from the framework and enable low-cost migration from OpenAI API usage
- Restructures the experience tracking system with a new EID (Experience ID) mechanism for better grouping and identification
- Refactors the workflow runner and scheduler to support optional experience collection and pre-processing through add strategies
Reviewed Changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| trinity/common/experience.py | Major refactoring with new EID class and enhanced Experience structure |
| trinity/common/workflows/step_wise_workflow.py | New step-wise workflow base classes for step-by-step reward calculation |
| trinity/explorer/workflow_runner.py | Modified to return experiences and support configurable experience collection |
| trinity/explorer/scheduler.py | Updated to handle experience collection and return experiences alongside statuses |
| trinity/explorer/explorer.py | Enhanced with add strategy support and experience count tracking |
| trinity/algorithm/add_strategy/ | New add strategy system for pre-processing experiences before buffer storage |
Comments suppressed due to low confidence (1)
trinity/common/experience.py:2
- The module docstring describes "Workflow Runner Module" but this is the experience.py module. The docstring should be corrected to describe the experience module.
"""Experience Class."""
|
/run-unittest |
Summary
Tests
Github Test Reporter by CTRF 💚 |
|
/unittest-module-common |
Summary
Tests
Github Test Reporter by CTRF 💚 |
|
/unittest-diff |
Description
This PR introduces a series of Step-wise Workflows to support step-wise reward calculations for tasks. Here are the main changes:
StepWiseRewardWorkflowandRewardPropagationWorkflowclasses as a base for all step-wise reward workflows, defining the basic workflow structure and reward calculation methods. The task execution (Agent application) part is completely decoupled from the framework, allowing users to directly use the OpenAI API to write applications with low migration costs.ExperienceStructure: The Experience structure now supports recording the current step of execution, facilitating grouping during training.WorkflowRunnerRefactoring: TheWorkflowRunnerno longer directly writes the Experience obtained from running the Workflow into theBuffer. Instead, it sends the results back to theExplorerfor aggregation and grouping before unified writing, thus supporting finer-grained management.AddStrategy: Explorer can pre-process the collected experiences before writing them into the experience buffer.Checklist
Please check the following items before code is ready to be reviewed.