Skip to content

Add run_id for single-turn workflows#152

Merged
hiyuchang merged 2 commits intoagentscope-ai:mainfrom
hiyuchang:feat/fix_eidrun
Jul 31, 2025
Merged

Add run_id for single-turn workflows#152
hiyuchang merged 2 commits intoagentscope-ai:mainfrom
hiyuchang:feat/fix_eidrun

Conversation

@hiyuchang
Copy link
Collaborator

Description

As the title says.

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has passed all tests
  • Docstrings have been added/updated in Google Style
  • Documentation has been updated
  • Code is ready for review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 @hiyuchang, 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 primarily introduces a standardized mechanism for assigning a unique, sequential run_id to each generated response within several single-turn workflow implementations. This enhancement improves the traceability and identification of individual responses, which can be crucial for logging, debugging, and analysis. Additionally, it includes a minor update to the add_strategy module to expose newly defined strategy classes.

Highlights

  • Run ID Assignment: Implemented the assignment of a sequential run_id to each response generated within single-turn workflows by utilizing enumerate during iteration over responses. This run_id is stored in response.eid.run.
  • Workflow Standardization: Applied the run_id assignment logic consistently across customized_math_workflows.py, customized_toolcall_workflows.py, math_rm_workflow.py, and workflow.py to ensure uniform tracking of individual runs within a batch.
  • Strategy Module Updates: Updated trinity/algorithm/add_strategy/__init__.py to import and expose GRPOAddStrategy and OPMDAddStrategy, making these new strategy classes available for use.
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 or fill out our survey to provide feedback.

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

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

@hiyuchang
Copy link
Collaborator Author

/unittest-module-explorer

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 adds a run_id to experiences generated in single-turn workflows. The changes are consistently applied across multiple workflow files. Consider addressing the comment about the scope of the PR in trinity/algorithm/add_strategy/__init__.py. Also, consider adding comments to explain the purpose of the run_id variable and how it relates to the experience being generated.

@hiyuchang
Copy link
Collaborator Author

/unittest-module-explorer

@hiyuchang
Copy link
Collaborator Author

/unittest-module-explorer

@github-actions
Copy link

Summary

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
18 18 0 0 0 0 317ms

Tests

Test Name Status Flaky Duration
tests/explorer/explorer_test.py::BaseExplorerCase::test_explorer 2ms
tests/explorer/explorer_test.py::TestExplorerCountdownEval::test_explorer 87ms
tests/explorer/explorer_test.py::TestExplorerCountdownNoEval::test_explorer 95ms
tests/explorer/explorer_test.py::TestExplorerWithAddStrategy::test_explorer 53ms
tests/explorer/scheduler_test.py::SchedulerTest::test_concurrent_operations 4ms
tests/explorer/scheduler_test.py::SchedulerTest::test_get_results 19ms
tests/explorer/scheduler_test.py::SchedulerTest::test_scheduler_all_methods 14ms
tests/explorer/scheduler_test.py::SchedulerTest::test_scheduler_restart_after_stop 8ms
tests/explorer/scheduler_test.py::SchedulerTest::test_split_tasks 8ms
tests/explorer/scheduler_test.py::SchedulerTest::test_wait_all 7ms
tests/explorer/scheduler_test.py::SchedulerTest::test_wait_all_timeout_with_multi_batch 13ms
tests/explorer/workflow_test.py::WorkflowTest::test_gsm8k_workflow 1ms
tests/explorer/workflow_test.py::WorkflowTest::test_math_boxed_workflow 1ms
tests/explorer/workflow_test.py::WorkflowTest::test_math_complex_workflow 1ms
tests/explorer/workflow_test.py::WorkflowTest::test_math_fraction_workflow 1ms
tests/explorer/workflow_test.py::WorkflowTest::test_math_workflow 1ms
tests/explorer/workflow_test.py::WorkflowTest::test_rm_gallery_workflow 1ms
tests/explorer/workflow_test.py::WorkflowTest::test_workflow_resettable 1ms

Github Test Reporter by CTRF 💚

@hiyuchang hiyuchang merged commit cf1453f into agentscope-ai:main Jul 31, 2025
1 check passed
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.

2 participants

Comments