高效创建工作流,可实现类似unreal engine的蓝图效果,内部使用多线程高效执行节点函数

文章目录

前言(Introduction)

GraphExecuter 是一款基于 NodeGraphQt 开发的开源软件,采用 多线程图执行 架构,用户只需编写节点逻辑并通过连线构建图,即可自动调度并运行复杂的工作流。

该系统结合了 可视化节点编辑 和 高效并行计算,适用于数据处理、自动化任务、分布式计算等场景。开发者无需关心线程管理,只需专注于节点功能的实现,即可快速搭建高性能工作流。GraphExecuter 为需要 灵活、可扩展、可视化编排 的用户提供了便捷的解决方案,适用于从实验到生产的各种需求。

GraphExecuter is an open-source software built on NodeGraphQt, designed to simplify complex workflow execution through a node-based graph system. By utilizing multi-threading, it efficiently processes connected nodes, allowing users to focus on defining individual node logic while the framework handles task scheduling and parallel execution.

With an intuitive node-based interface, users can easily design, connect, and execute workflows for tasks like data processing, automation, or distributed computing. GraphExecuter is ideal for developers and researchers who need a flexible, visual, and high-performance way to manage complex workflows without dealing with low-level concurrency control.

code: GraphExecuter

video: 高效创建工作流,可实现类似unreal engine的蓝图效果,内部使用多线程高效执行节点函数

开发环境搭建(Development environment setup)

shell 复制代码
pip install -r .\requirements.txt

## 强制重新安装模块
pip install --force-reinstall --no-cache-dir pyside6

运行(Run test)

shell 复制代码
python main.py

❇️创建节点

❇️连接节点

❇️从选中节点开始运行图

开发者(Developer)

❇️编写节点(Create node type)

❇️注册节点(Register node type)

编译(Compile)

shell 复制代码
./compile.bat

生成的可执行文件存放在dist文件夹下

报错

❌框选节点的时候报错

shell 复制代码
Error calling Python override of QGraphicsView::mouseMoveEvent(): Traceback (most recent call last):
  File "D:\ProgramData\anaconda3\envs\DataProcessUI\Lib\site-packages\NodeGraphQt\widgets\viewer.py", line 619, in mouseMoveEvent
    self.scene().setSelectionArea(
TypeError: 'PySide6.QtWidgets.QGraphicsScene.setSelectionArea' called with wrong argument types:
  PySide6.QtWidgets.QGraphicsScene.setSelectionArea(QPainterPath, ItemSelectionMode)
Supported signatures:
  PySide6.QtWidgets.QGraphicsScene.setSelectionArea(path: PySide6.QtGui.QPainterPath, /, selectionOperation: PySide6.QtCore.Qt.ItemSelectionOperation = Instance(Qt.ReplaceSelection), mode: PySide6.QtCore.Qt.ItemSelectionMode = Instance(Qt.IntersectsItemShape), deviceTransform: PySide6.QtGui.QTransform = Default(QTransform))
  PySide6.QtWidgets.QGraphicsScene.setSelectionArea(path: PySide6.QtGui.QPainterPath, deviceTransform: PySide6.QtGui.QTransform, /)

✔️Pyside6和nodegraphqt版本不适配导致,更改viewer.py以下位置即可:

shell 复制代码
# "D:\ProgramData\anaconda3\envs\XXXXXXXX\Lib\site-packages\NodeGraphQt\widgets\viewer.py"

# self.scene().setSelectionArea(
#     path, QtCore.Qt.IntersectsItemShape
# )
self.scene().setSelectionArea(
    path,
    selectionOperation=QtCore.Qt.ItemSelectionOperation.ReplaceSelection,
    mode=QtCore.Qt.ItemSelectionMode.IntersectsItemShape
)
相关推荐
梅雅达编程笔记8 小时前
Day 18 · 综合实战 B:AI 客服 Agent(专栏收官)
python·智能客服·ai agent·意图识别·ai客服·大模型应用·ai办公自动化
测试老哥8 小时前
Pytest自动化测试框架tep环境变量、fixtures、用例三者之间的关系
自动化测试·软件测试·python·测试工具·测试用例·pytest·职场发展
Buke..9 小时前
【APP 逆向】哔哩哔哩 sign 参数逆向(下):OLLVM 混淆还原 sign 算法
java·javascript·爬虫·python·算法
JacksonMx9 小时前
Java CompletableFuture 异步编程实战:从入门到架构师避坑指南
linux·数据库·python
W_326009 小时前
Python-OpenCV HSV颜色空间与inRange颜色分割:按颜色提取目标物体
图像处理·人工智能·python·opencv·机器学习
Buke..10 小时前
【APP 逆向】哔哩哔哩 sign 参数逆向(上):Frida 反调试绕过与 unidbg 调用
java·开发语言·爬虫·python·安卓
头发够用的程序员10 小时前
ImportError: libopenblas.so.0: cannot open shared object file 完整复盘与解决方案
python·ubuntu
梦痕长情10 小时前
记一次关于AI在数仓中的应用
开发语言·人工智能·python·ai
何以解忧,唯有..10 小时前
Python 线程编程:从入门到实战
开发语言·python