Skip to content

[Refactor] Add Fixed Workflow Execution Engine: Flow, Node, and Scheduler Architecture#302

Merged
imbajin merged 5 commits intoapache:mainfrom
hugegraph:agenticrag/dev
Oct 23, 2025
Merged

[Refactor] Add Fixed Workflow Execution Engine: Flow, Node, and Scheduler Architecture#302
imbajin merged 5 commits intoapache:mainfrom
hugegraph:agenticrag/dev

Conversation

@weijinglin
Copy link
Collaborator

No description provided.

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. enhancement New feature or request labels Sep 30, 2025
@github-actions github-actions bot added the ml label Oct 12, 2025
@imbajin imbajin requested a review from Copilot October 20, 2025 10:10
Copy link
Contributor

Copilot AI left a 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 pull request refactors the HugeGraph-AI workflow execution system by introducing a fixed workflow execution engine with a new scheduler-based architecture.

  • Introduces new scheduler architecture with Flow, Node, and operator separation
  • Upgrades project version from 1.5.0 to 1.7.0 across multiple modules
  • Migrates existing workflows to use the new Node/Operator pattern for better modularity

Reviewed Changes

Copilot reviewed 134 out of 135 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pyproject.toml Updates version to 1.7.0
spec/hugegraph-llm/fixed_flow/*.md Design documents for new workflow architecture
hugegraph-llm/src/hugegraph_llm/flows/ New scheduler and flow implementations
hugegraph-llm/src/hugegraph_llm/nodes/ New Node layer for operator lifecycle management
hugegraph-llm/src/hugegraph_llm/state/ai_state.py Workflow state management classes
hugegraph-python-client/ Code formatting improvements and version updates

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

pipeline_pool: Dict[str, Any]
max_pipeline: int

def __init__(self, max_pipeline: int = 10):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Important: 新增大量flow文件缺少单元测试覆盖

本PR新增了以下核心flow实现:

  • RAGRawFlow, RAGVectorOnlyFlow, RAGGraphOnlyFlow, RAGGraphVectorFlow
  • Text2GremlinFlow, BuildExampleIndexFlow
  • 以及多个其他flow类

但从diff来看,缺少对应的测试文件。

建议:

  1. 为每个flow类添加单元测试
  2. 测试应覆盖:
    • 正常执行路径
    • 错误处理路径
    • 边界条件(空输入、超大输入等)
    • Pipeline状态转换
  3. 集成测试验证flow之间的协作
  4. 考虑添加性能基准测试

这对于如此大规模的架构重构至关重要!

weijinglin and others added 3 commits October 23, 2025 21:14
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Linyu <94553312+weijinglin@users.noreply.github.com>
weijinglin and others added 2 commits October 23, 2025 21:27
… to Pipeline(old design) & refactor some operator's design and implementation & code format
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 23, 2025
@imbajin imbajin merged commit edae389 into apache:main Oct 23, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer llm ml python-client size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants