mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 19:52:02 +00:00
feat: add concurrent runner for batch CLI execution
Add a Python-based concurrent runner that executes multiple Qwen CLI tasks
across different models in parallel using isolated git worktrees.
Features:
- Execute N tasks × M models concurrently with configurable concurrency
- Create isolated git worktrees for each run under ~/.qwen/worktrees
- Real-time progress display with Rich library
- Capture stdout, stderr, and OpenAI API logs per run
- Atomic JSON tracking of all runs with status and metadata
- Automatic cleanup of worktrees after each run
Structure:
- runner.py: Main implementation with asyncio
- requirements.txt: Python dependencies
- README.md: Documentation and usage
- config.example.json: Configuration template
- examples/: Toy example with sample config and project
Usage:
python runner.py config.json
Each run creates an isolated output directory:
outputs/{run_id}/
├── stdout.txt
├── stderr.txt
└── logs/openai-*.json
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
dd97337914
commit
4ac3df1b63
6 changed files with 902 additions and 0 deletions
34
integration-tests/concurrent-runner/config.example.json
Normal file
34
integration-tests/concurrent-runner/config.example.json
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"concurrency": 3,
|
||||
"yolo": true,
|
||||
"source_repo": ".",
|
||||
"worktree_base": "~/.qwen/worktrees",
|
||||
"outputs_dir": "./outputs",
|
||||
"results_file": "./results.json",
|
||||
"tasks": [
|
||||
{
|
||||
"id": "code-review",
|
||||
"name": "Security Code Review",
|
||||
"prompts": [
|
||||
"Review the codebase for security vulnerabilities.",
|
||||
"Focus on input validation, authentication, and data handling."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "refactor",
|
||||
"name": "Refactoring Suggestions",
|
||||
"prompts": [
|
||||
"Analyze the code structure and suggest refactoring improvements.",
|
||||
"Prioritize changes that improve maintainability and performance."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "docs",
|
||||
"name": "Documentation Generation",
|
||||
"prompts": [
|
||||
"Generate comprehensive API documentation for the main modules."
|
||||
]
|
||||
}
|
||||
],
|
||||
"models": ["claude-3-5-sonnet-20241022", "qwen3-coder-plus"]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue