Skip to content

Conversation

@pan-x-c
Copy link
Collaborator

@pan-x-c pan-x-c commented Dec 4, 2025

Description

Add a streamlit viewer to help debugging workflows.

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

@pan-x-c pan-x-c changed the title Feature/exp viewer Add Experience Viewer Dec 4, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @pan-x-c, 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 significantly enhances the debugging capabilities for workflows by integrating a new Streamlit-powered Experience Viewer. This viewer provides a visual interface to inspect prompt-response pairs, token log probabilities, and action masks, offering a clearer understanding of workflow execution. The existing command-line interface for debugging has been extended to support launching this viewer and includes new options for managing output directories during workflow debugging.

Highlights

  • New Experience Viewer: Introduced a Streamlit-based Experience Viewer to visualize generated workflow experiences, making debugging more intuitive and user-friendly.
  • Enhanced Debugging CLI: The trinity debug command now supports a new --module viewer option to launch the Streamlit viewer and a --disable-overwrite flag for workflow debugging to prevent accidental output directory overwrites.
  • Documentation Updates: Updated both English and Chinese documentation to reflect the new Experience Viewer and the additional debugging options.
  • MLflow Metric Handling: Improved MLflow logging by replacing unsupported characters (like '@') in metric names to ensure compatibility.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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

  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.

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 introduces an Experience Viewer, a Streamlit application for debugging workflows, along with related CLI commands and documentation. The changes are well-structured, adding the viewer, updating the CLI launcher, and providing documentation in both English and Chinese. The tests have also been updated to cover the new CLI options.

My review has identified a few issues. There is a critical typo (disable_ovrwrite instead of disable_overwrite) in the new CLI option that will cause a runtime error. This typo is present in both trinity/cli/launcher.py and trinity/explorer/workflow_runner.py. Additionally, the new viewer code in trinity/buffer/viewer.py does not handle cases where logprobs or action_mask are None, which could lead to a TypeError. Finally, there's a minor typo in a comment in trinity/utils/monitor.py. I've provided suggestions to fix these issues.

@pan-x-c
Copy link
Collaborator Author

pan-x-c commented Dec 4, 2025

/unittest-module-cli

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

Summary

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
5 5 0 0 0 0 1m 26s

Tests

Test Name Status Flaky Duration
tests/cli/launcher_test.py::TestLauncherMain::test_debug_mode 58.1s
tests/cli/launcher_test.py::TestLauncherMain::test_main_run_command 6.6s
tests/cli/launcher_test.py::TestLauncherMain::test_main_run_in_dlc 1.4s
tests/cli/launcher_test.py::TestLauncherMain::test_main_studio_command 312ms
tests/cli/launcher_test.py::TestLauncherMain::test_multi_stage_run 1.7s

Github Test Reporter by CTRF 💚

@hiyuchang hiyuchang merged commit 8648d4d into modelscope:main Dec 5, 2025
2 checks 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.

3 participants