Debug Mode for workflow developers#314
Conversation
Summary of ChangesHello @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 introduces a comprehensive debug mode aimed at enhancing the developer experience for workflow creation and verification. It provides a new command-line interface for debugging specific modules, integrates a performance profiling tool, and establishes a dedicated environment for running and inspecting inference models and workflows. The changes streamline the process of identifying issues and optimizing performance during workflow development. Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces a debug mode for workflow developers, which is a great addition for improving the development and testing experience. The implementation looks solid, with a new debug command, supporting logic for creating and managing debug models, and a DebugWorkflowRunner. I've added a few suggestions to improve the robustness and clarity of the tests and type hints. Specifically, I've pointed out the use of a fixed time.sleep in tests, which can be flaky, and a minor type hint inconsistency.
|
/unittest-diff |
Summary
Failed Tests
Tests
Github Test Reporter by CTRF 💚 |
|
/unittest-module-cli |
Summary
Tests
Github Test Reporter by CTRF 💚 |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a debug mode for workflow developers to quickly test and verify their workflows without running the full training pipeline. The debug mode includes two components: starting inference models in a debug namespace and running workflows with performance profiling.
Key changes:
- Added
DebugWorkflowRunnerclass for debugging workflows with viztracer profiling - Implemented debug inference model creation and retrieval functions
- Added CLI commands for debugging both inference models and workflows
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| trinity/explorer/workflow_runner.py | Added DebugWorkflowRunner class for workflow debugging with viztracer integration |
| trinity/common/models/init.py | Added debug inference model functions and named actor support |
| trinity/common/constants.py | Added DEBUG_NAMESPACE_ENV_VAR constant |
| trinity/common/config.py | Added get_envs() method to extract environment variables from config |
| trinity/cli/launcher.py | Added debug command with inference_model and workflow module support |
| tests/cli/launcher_test.py | Added test coverage for debug mode functionality |
| pyproject.toml | Added viztracer dependency for performance profiling |
| docs/sphinx_doc/source_zh/tutorial/develop_workflow.md | Added Chinese documentation for debug mode |
| docs/sphinx_doc/source/tutorial/develop_workflow.md | Added English documentation for debug mode |
Comments suppressed due to low confidence (1)
tests/cli/launcher_test.py:1
- The main block has been removed but the function definition for
debug_inference_model_processwas added outside the test class. This function should be moved inside the test class or kept as a module-level helper with proper organization.
import multiprocessing
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
/unittest-module-trainer |
Summary
Skipped
Tests
Github Test Reporter by CTRF 💚 |
Description
This PR adds a debug mode, which allows workflow developers to quickly test and verify their workflows.
Checklist
Please check the following items before code is ready to be reviewed.