高效创建工作流,可实现类似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
)
相关推荐
菜包eo1 小时前
二维码驱动的独立站视频集成方案
网络·python·音视频
Yo_Becky1 小时前
【PyTorch】PyTorch预训练模型缓存位置迁移,也可拓展应用于其他文件的迁移
人工智能·pytorch·经验分享·笔记·python·程序人生·其他
yzx9910131 小时前
关于网络协议
网络·人工智能·python·网络协议
fangeqin1 小时前
ubuntu源码安装python3.13遇到Could not build the ssl module!解决方法
linux·python·ubuntu·openssl
文哥工具箱22 小时前
免费文件管理 智能转换GC-Prevue:PDF 转 Word 多种格式 一键完成
电脑·软件工程·开源软件
Jay Kay2 小时前
TensorFlow源码深度阅读指南
人工智能·python·tensorflow
会的全对٩(ˊᗜˋ*)و2 小时前
【数据挖掘】数据挖掘综合案例—银行精准营销
人工智能·经验分享·python·数据挖掘
小赖同学啊2 小时前
物联网中的Unity/Unreal引擎集成:数字孪生与可视化控制
物联网·unity·游戏引擎
___波子 Pro Max.3 小时前
GitHub Actions配置python flake8和black
python·black·flake8
阿蒙Amon3 小时前
【Python小工具】使用 OpenCV 获取视频时长的详细指南
python·opencv·音视频