celestialflow 3.2.3__tar.gz → 3.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. {celestialflow-3.2.3 → celestialflow-3.2.4}/PKG-INFO +75 -64
  2. {celestialflow-3.2.3 → celestialflow-3.2.4}/README.md +74 -61
  3. {celestialflow-3.2.3 → celestialflow-3.2.4}/pyproject.toml +3 -3
  4. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/__init__.py +6 -15
  5. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/graph/core_graph.py +68 -132
  6. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/observability/__init__.py +1 -2
  7. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/observability/core_observer.py +0 -16
  8. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/observability/core_report.py +88 -105
  9. {celestialflow-3.2.3/src/celestialflow/graph → celestialflow-3.2.4/src/celestialflow/observability}/util_types.py +5 -4
  10. celestialflow-3.2.4/src/celestialflow/persistence/__init__.py +10 -0
  11. celestialflow-3.2.4/src/celestialflow/persistence/core_fallback.py +225 -0
  12. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/persistence/core_log.py +6 -18
  13. celestialflow-3.2.4/src/celestialflow/persistence/util_payload.py +24 -0
  14. celestialflow-3.2.4/src/celestialflow/persistence/util_sqlite.py +536 -0
  15. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/runtime/core_dispatch.py +22 -9
  16. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/runtime/core_envelope.py +3 -18
  17. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/runtime/core_metrics.py +5 -27
  18. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/runtime/core_queue.py +11 -15
  19. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/runtime/util_constant.py +4 -4
  20. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/runtime/util_errors.py +52 -0
  21. celestialflow-3.2.4/src/celestialflow/runtime/util_event.py +63 -0
  22. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/runtime/util_types.py +0 -37
  23. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/stage/__init__.py +0 -6
  24. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/stage/core_executor.py +111 -125
  25. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/stage/core_stage.py +240 -242
  26. celestialflow-3.2.4/src/celestialflow/stage/core_stages.py +293 -0
  27. celestialflow-3.2.4/src/celestialflow/stage/util_callable.py +31 -0
  28. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/utils/util_clone.py +5 -10
  29. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/config.json +3 -3
  30. celestialflow-3.2.4/src/celestialflow/web/core_server.py +421 -0
  31. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/routes/pull_routes.py +135 -137
  32. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/routes/push_routes.py +48 -89
  33. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/dashboard_analysis.js +5 -4
  34. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/dashboard_history.js +6 -1
  35. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/errors.js +8 -6
  36. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/i18n.js +3 -0
  37. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/main.js +7 -0
  38. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/web_config.js +4 -0
  39. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/dashboard_analysis.ts +6 -3
  40. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/dashboard_history.ts +8 -1
  41. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/errors.ts +13 -9
  42. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/globals.d.ts +155 -155
  43. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/i18n.ts +3 -0
  44. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/main.ts +7 -0
  45. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/web_config.ts +4 -0
  46. celestialflow-3.2.4/src/celestialflow/web/util_error.py +30 -0
  47. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/util_models.py +5 -10
  48. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow.egg-info/PKG-INFO +75 -64
  49. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow.egg-info/SOURCES.txt +6 -4
  50. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow.egg-info/requires.txt +0 -2
  51. celestialflow-3.2.3/src/celestialflow/persistence/__init__.py +0 -12
  52. celestialflow-3.2.3/src/celestialflow/persistence/core_fail.py +0 -179
  53. celestialflow-3.2.3/src/celestialflow/persistence/core_success.py +0 -43
  54. celestialflow-3.2.3/src/celestialflow/persistence/util_jsonl.py +0 -214
  55. celestialflow-3.2.3/src/celestialflow/stage/core_stages.py +0 -559
  56. celestialflow-3.2.3/src/celestialflow/web/core_server.py +0 -219
  57. celestialflow-3.2.3/src/celestialflow/web/util_error.py +0 -86
  58. {celestialflow-3.2.3 → celestialflow-3.2.4}/setup.cfg +0 -0
  59. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/funnel/__init__.py +0 -0
  60. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/funnel/core_inlet.py +0 -0
  61. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/funnel/core_spout.py +0 -0
  62. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/graph/__init__.py +0 -0
  63. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/graph/core_structure.py +0 -0
  64. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/graph/util_analysis.py +0 -0
  65. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/graph/util_serialize.py +0 -0
  66. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/observability/core_progress.py +0 -0
  67. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/runtime/__init__.py +0 -0
  68. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/runtime/util_estimators.py +0 -0
  69. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/runtime/util_hash.py +0 -0
  70. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/stage/util_types.py +0 -0
  71. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/utils/__init__.py +0 -0
  72. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/utils/util_benchmark.py +0 -0
  73. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/utils/util_collections.py +0 -0
  74. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/utils/util_format.py +0 -0
  75. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/__init__.py +0 -0
  76. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/routes/__init__.py +0 -0
  77. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/_colors.css +0 -0
  78. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/base.css +0 -0
  79. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/dashboard.css +0 -0
  80. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/dashboard_analysis.css +0 -0
  81. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/dashboard_history.css +0 -0
  82. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/dashboard_statuses.css +0 -0
  83. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/dashboard_structure.css +0 -0
  84. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/dashboard_summary.css +0 -0
  85. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/errors.css +0 -0
  86. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/injection_editor.css +0 -0
  87. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/injection_layout.css +0 -0
  88. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/injection_nodes.css +0 -0
  89. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/injection_preview.css +0 -0
  90. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/favicon.ico +0 -0
  91. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/dashboard_statuses.js +0 -0
  92. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/dashboard_structure.js +0 -0
  93. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/dashboard_summary.js +0 -0
  94. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/injection.js +0 -0
  95. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/layout_editor.js +0 -0
  96. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/utils.js +0 -0
  97. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/dashboard_statuses.ts +0 -0
  98. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/dashboard_structure.ts +0 -0
  99. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/dashboard_summary.ts +0 -0
  100. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/injection.ts +0 -0
  101. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/layout_editor.ts +0 -0
  102. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/utils.ts +0 -0
  103. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/templates/index.html +0 -0
  104. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/util_cal.py +0 -0
  105. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/util_config.py +0 -0
  106. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow.egg-info/dependency_links.txt +0 -0
  107. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow.egg-info/entry_points.txt +0 -0
  108. {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: celestialflow
3
- Version: 3.2.3
3
+ Version: 3.2.4
4
4
  Summary: A flexible GRAPH-based task orchestration framework.
5
5
  Author-email: Mr-xiaotian <mingxiaomingtian@gmail.com>
6
6
  License: MIT
@@ -19,9 +19,7 @@ Requires-Dist: fastapi
19
19
  Requires-Dist: uvicorn
20
20
  Requires-Dist: requests
21
21
  Requires-Dist: networkx
22
- Requires-Dist: redis
23
22
  Requires-Dist: jinja2
24
- Requires-Dist: celestialtree>=0.1.3
25
23
 
26
24
  # CelestialFlow ——一个轻量级、可并行、基于图结构的 Python 任务调度框架
27
25
 
@@ -39,8 +37,8 @@ Requires-Dist: celestialtree>=0.1.3
39
37
  <p align="center">
40
38
  <img src="https://img.shields.io/badge/Task%20Graph-DAG-blueviolet">
41
39
  <img src="https://img.shields.io/badge/Workflow-Orchestrator-7c3aed">
42
- <img src="https://img.shields.io/badge/IPC-Redis%20Ready-red">
43
- <img src="https://img.shields.io/badge/Distributed-Worker%20Friendly-orange">
40
+ <img src="https://img.shields.io/badge/Event%20Tracing-CelestialTree-0ea5e9">
41
+ <img src="https://img.shields.io/badge/Web-Dashboard-FastAPI-ec4899">
44
42
  </p>
45
43
 
46
44
  <p align="center">
@@ -73,7 +71,7 @@ TaskGraph 能构建完整的 **有向图结构(Directed Graph)**,不仅支
73
71
 
74
72
  在执行与调度之外,CelestialFlow 进一步引入 **CelestialTree(简称: ctree) 事件追踪系统**,为每一个任务及其衍生行为(成功、失败、重试、拆分、路由等)记录明确的因果关系。借助 ctree,可以从任意一个初始任务出发,完整还原其在 TaskGraph 中的传播路径与执行轨迹,使任务系统可以进行完整的**追溯、分析、解释**。
75
73
 
76
- 在此基础上,CelestialFlow 支持 Web 可视化监控,并可通过 Redis 实现跨进程、跨设备协作;同时引入基于 Go 的外部 worker(通过 Redis 通信),用于承载 CPU 密集型任务,弥补 Python 在该场景下的性能瓶颈。
74
+ 在此基础上,CelestialFlow 支持 Web 可视化监控,并提供基于 Redis demo Go Worker 外部协作示例,用于展示按需构建跨进程、跨设备任务协作的方式。
77
75
 
78
76
  ## 项目结构(Project Structure)
79
77
 
@@ -136,6 +134,18 @@ uv pip install celestialflow
136
134
  pip install celestialflow
137
135
  ```
138
136
 
137
+ 如果你只使用 CelestialFlow 的核心调度、Web、持久化与 demo/test 之外的常规功能,上面的安装已经足够。
138
+
139
+ 如果你还需要启用 CelestialTree 事件追踪能力,则需要**额外安装** `celestialtree`:
140
+
141
+ ```bash
142
+ # 对已发布包使用者
143
+ uv pip install celestialtree
144
+
145
+ # 如果你是 clone 仓库后的开发者/贡献者
146
+ uv sync --group dev
147
+ ```
148
+
139
149
  一个简单的可运行代码:
140
150
 
141
151
  ```python
@@ -215,7 +225,7 @@ flowchart TD
215
225
  - [runtime/util_hash.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/util_hash.md)
216
226
  - [runtime/util_types.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/util_types.md)
217
227
  - [runtime/util_errors.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/util_errors.md)
218
- - [persistence/core_fail.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/persistence/core_fail.md)
228
+ - [persistence/core_fallback.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/persistence/core_fallback.md)
219
229
  - [persistence/core_log.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/persistence/core_log.md)
220
230
 
221
231
  如果你更喜欢通过完整案例理解框架的运行方式,可以参考这篇利用 TaskGraph 从零开始构建项目的教程:
@@ -228,20 +238,20 @@ flowchart TD
228
238
 
229
239
  你可以继续运行更多的演示代码,这里记录了各个演示文件与其中的演示函数说明:
230
240
 
231
- [🎮demo/](https://github.com/Mr-xiaotian/CelestialFlow/tree/main/docs/zh-CN/demo)
241
+ [🎮demo/ 总览](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/demo/README.md)
232
242
 
233
- ​如果你想运行测试代码, 可以先查看如下文档内容:
243
+ 如果你想运行测试代码,可以先查看如下文档内容:
234
244
 
235
- [🧪tests/](https://github.com/Mr-xiaotian/CelestialFlow/tree/main/docs/zh-CN/tests)
245
+ [🧪tests/ 总览](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/tests/README.md)
236
246
 
237
- 如果你想查看bench内容, 这里的数据成为框架中部分设计的决策依据:
247
+ 如果你想查看 bench 内容,这些数据也是框架中部分设计取舍的依据:
238
248
 
239
- [⚡bench/](https://github.com/Mr-xiaotian/CelestialFlow/tree/main/docs/zh-CN/bench)
249
+ [⚡bench/ 总览](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/bench/README.md)
240
250
 
241
251
  ## 环境要求(Requirements)
242
252
 
243
- **CelestialFlow** 基于 Python 3.12+,并依赖以下核心组件。
244
- 请确保你的环境能够正常安装这些依赖(`pip install celestialflow` 会自动安装)。
253
+ **CelestialFlow** 基于 Python 3.12+,默认运行时依赖以下核心组件。
254
+ 其中 `celestialtree` 不再属于默认运行时依赖,而是额外安装的可选组件。
245
255
 
246
256
  | 依赖包 | 说明 |
247
257
  | ----------------- | ---- |
@@ -252,73 +262,74 @@ flowchart TD
252
262
  | **networkx** | 任务图(TaskGraph)结构与依赖分析 |
253
263
  | **jinja2** | FastAPI 模板引擎,用于 Web 可视化界面渲染 |
254
264
  | **tqdm** | 可选组件,进度条显示,用于任务执行可视化 |
255
- | **redis** | 可选组件,用于分布式任务通信(`TaskRedis*` 系列模块) |
256
- | **celestialtree** | 可选组件,用于任务状态上报与远程调用(`ctree_client`) |
265
+
266
+ 如需运行 `demo/demo_redis.py` Go Worker 示例,请额外安装 `redis` 并准备 Redis 服务;这部分不属于默认运行时依赖。
267
+
268
+ 如需运行依赖 CelestialTree 的 demo / bench / 追踪查询,请额外安装 `celestialtree`,或直接在源码仓库中执行 `uv sync --group dev`。
257
269
 
258
270
  ## 文件结构(File Structure)
259
271
 
260
272
  <p align="center">
261
273
  <img src="https://raw.githubusercontent.com/Mr-xiaotian/CelestialFlow/main/img/file_structure.svg" alt="FileStructure" />
262
274
  <br/>
263
- <em>celestial-flow 3.2.3</em>
275
+ <em>celestial-flow 3.2.4</em>
264
276
  </p>
265
277
 
266
278
  (该视图由我的另一个项目[CelestialVault](https://github.com/Mr-xiaotian/CelestialVault)中inst_file.FileTree.print_tree()生成。转换为图片则借助[Carbon](https://carbon.now.sh)。)
267
279
 
268
280
  ## 版本日志(Version Log)
269
- - 3.2.3
281
+ - 3.2.4
270
282
  - feat:
271
- - **[IMPORTANT]** 前端仪表盘设置面板中新添 `节点等待使用全局估计` 开关, 开启后节点卡片中原 `等待` 量将被替换为 `全局等待`, 并在卡片中显示 `全局剩余时间`
272
- - 这个功能非常有趣, 开启前后能看到数值大幅波动
273
- - **[IMPORTANT]** 重写任务注入页面, 现在实用性远远高于之前版本
274
- - 可以给每个节点单独配置注入任务列表, 在一起发送
275
- - **[IMPORTANT]** 移除 `TaskExecutor` `get_args` 与 `process_result` 两个方法, 以及 `unpack_task_args` 属性
276
- - 这是为引入泛型必要的修改
277
- - `process_result` 功能很简单, 对func输出的result进行再次处理, 但事实上在输入func前对齐进行包装也能达到一样的效果
278
- - `get_args` 功能更为复杂, 可以直接将前一节点提供的 `result` 转为当前节点所需的 `task` 类型, 非常灵活; 但问题在于太过灵活, 导致使用心智负担很大
279
- - `unpack_task_args` 就是 `get_args` 带来的一项心智负担, 默认 `get_args` 会把 `task` 进行 `(task, )` 包裹后发送给func, 开启 `unpack_task_args` 后则直接发送
280
- - **[IMPORTANT]** `graph` 的init参数中添加 `name`, 以与 `executor` `stage` 一致
281
- - 破坏接口破坏性更新
282
- - 在日志的 `start_graph` `end_graph` 与web端的 `graph_anaylysis` 中都有显示
283
- - 彻底移除前后端通信中的 `graph_summary` , 原本残余的 `全局剩余时间` 现在拆为各个节点的 `全局等待` `全局剩余时间`
284
- - 这里所说的 `全局` 意为根据图论关系, 由上游剩余的任务数估算下游总共能获得多少任务
285
- - 例如: 图关系 `A -> B`, A已处理任务2, 未处理任务3, B已处理任务4, 未处理任务2. 这意味着A成功的2个任务为B带来总共了6个任务, 那么我们可以据此估计B总功能获取"3/2*6=9"个任务, 因此B的 `等待` 任务数量为2, 但 `全局等待` 任务数量为5
286
- - 前端中添加部分提示气泡, 鼠标放上去后可以介绍相关信息, 例如本次新加入的节点 `全局等待` 的含义
287
- - 移除前端中节点卡片的拖拽功能
288
- - 这个功能是在最早加入web页面时添加的, 当时感觉很帅, 但现在有点玩腻了
289
- - 前端错误日志页面添加 `任务注入` 按钮, 可以把选定任务直接添加到任务注入页面中节点的代注入任务列表中
290
- - 在 `TaskSplitter` 中添加 `split_item` 方法, 可自由定义
291
- - 原本的 `splitter` 非常依赖于 `get_args`, 现在通过 `split_item` 方法稍微弥补其缺失的灵活性
283
+ - **[IMPORTANT]** 合并原有的 `fail_funnel` `success_funnel` 机制为 `fallback` , 并采用 `sqlite` 进行存储
284
+ - 原有基于 `jsonl` 存储的fail持久化机制在存储时非常好用, 但读取时每次都需要全量读取到内存中再进行检索, 非常麻烦; 我虽然也想过用类似 `redis` 的数据库服务, 但实在不想另外启动第三方服务. 然后我意外发现 `sqlite` 完美符合我的一切要求
285
+ - Richard 万岁!
286
+ - 至于原有的 `success_funnel` 机制完全是个半成品: 只能用于 `executor`, 而不能用于 `stage`; 完全在内存存储. 所以借着这次机会也一并重构, 合并入 `fallback_funnel`
287
+ - 现在 `fallback_funnel` 会在任务 `注入/重复/重试/失败/成功` 时对sqlite中相应记录进行插入/更新/删除操作
288
+ - 其中在任务成功时默认会删除该条记录, 但如果开启 `executor` 中的 `perist_result` 选项, 则会保留该条记录, 并将 `status` 字段更新为 `success`
289
+ - **[IMPORTANT]** 移除 `stages` 中的三个redis节点, 并添加demo文件, 说明如果自行构建相关节点
290
+ - 相比 `TaskSplitter` `TaskRouter`, 这三个节点实在可有可无, 还会导致多一个 `redis` 依赖包
291
+ - **[IMPORTANT]** `celestialtree` 不再继续作为依赖库, 现有的事件声明机制基于一套protol接口, 并默认使用本地的超简化实现
292
+ - 这样做同样是为了避免太多库依赖, `celestialtree` 库包含对 `grpcio` `protobuf` 的依赖, 而这两者对于python free-threading版本的支持性不太好, 因此在有他们的情况下 `celestialflow` 无法在free-threading版本下运行----而这是我非常期待的
293
+ - 根据 `bench_gil_vs_nogil`, 在free-threading版本下, `executor` 在cpu密集任务中会得到5.25倍提升, 而 `graph` 在cpu密集任务中则会得到7.55倍提升. 非常喜人
294
+ - 在前端 `节点指标走向` 卡片中添加 `全局等待队列`
295
+ - `graph` 中添加 `start_graph_db` 方法, 接受一个fallback数据库地址, 然后根据其中失败数据进行 `start_graph`; 在 `executor` 中添加 `start_db` 方法, 接受一个fallback数据库地址, 然后根据其中失败数据进行 `start`
296
+ - 很方便
292
297
  - refactor:
293
- - **[IMPORTANT]** 引入泛型, 同时强制性要求py版本>=3.12
294
- - 泛型的引入使得代码更加类型安全, 同时也提高了代码的可读性
295
- - 3.12版本对泛型的表述非常直观
296
- - 移除前端代码中所有对 `localStorage` 的使用
297
- - 在已经有config配置文件的情况下意义不大, 反而会带来困扰
298
- - 将任务队列的drain操作从graph层移至stage层
299
- - 之前不能这样做是因为节点的 `stage_mode` 可能为 `process`, 此时在主进程持有的节点非真实运行的节点
300
- - 算是3.2.0版本带来的持久影响之一
301
- - 优化 `TaskMetric` 中对锁的使用
302
- - 移除 `TaskEnvelope` 中的 `change_id()` 方法, 现在默认envelope不可变, 同时 `emit_retry_envelope` 中不再把原有的envelope的id修改后继续提交给worker, 而是直接使用新生成的envelope
303
- - 移除错误日志中的 `error` `error_repr` `task_repr` 字段
304
- - 修改前后端通信中任务注入数据的格式, 以方便同时提交多个节点的任务数据
305
- - 前端代码中开启strict检查
306
- - 将前端中 `injection.css` 文件拆分成多个文件
307
- - 修改 `config.json` 的数据格式, 现在按照生效区域进行分类
308
- - 收紧前端中的数据类型
309
- - 添加 `ReportTaskGraph` 类型, 专门用于给reporter做类型声明
298
+ - **[IMPORTANT]** 将server端存储error数据的方式从py原生列表改为一个临时sqlite数据库
299
+ - 在锤子效应下我想更多的尝试sqlite的使用
300
+ - 为每个 `graph` 添加基于 `name` 与 `time.time()` 的 `graph_id` 作为唯一性标识符
301
+ - 重写reporter与server端的交互逻辑
302
+ - 现在每一轮refresh开始时都会进行状态对齐, 通过 `graph_id` 确定两者所持有的数据是否来自一个 `graph` 对象, 是的话则不用重复push structure/analysis数据
303
+ - 在状态对齐时如果双方的graph一致, server会返回自己所持有的错误数据中最大的 `event_id` 值, 经过严格校验, `event_id` 在数据库中严格递增
304
+ - 将reporter中原有的 `push_error_meta` `push_error_content` 合并, 每次刷新时只发送新增的错误数据, 而新增数据则根据server返回的最大 `event_id` 值与本地数据库中的最大 `event_id` 值进行筛选
305
+ - 为 `graph.connect` 与 `graph_set_stage` 绑定更多职责
306
+ - 现在节点与 `graph` 在 `ctree` `reporter` 上的同步在 `graph_set_stage` 中完成
307
+ - `task_queue` `result_queue` 的上下流绑定, 以及 `counter` 的绑定都在 `graph.connect` 中完成
308
+ - 删除 `TaskEnvelope` 中无关数据, 只保留 `task` `hash` `id` 三项
309
+ - `source` 字段本就不该添加, 它一致没有发挥作用
310
+ - `prev` 字段是为了原版 `success_funnel` 而服务的, 现在已经没有必要
311
+ - `TaskMetrics` 中固定使用 `Lock` 对所有 `counter` 进行限定, 而无关乎 `executor` 的 `execution_mode`
312
+ - 这种固定的模式在牺牲部分性能的情况下使得代码更加稳定
313
+ - 根据 `bench_lock_overhead`, 这会导致 `counter` 慢3.2倍左右, 考虑到 `counter` 的更新全部基于 `int` 类型, 本就很快, 可以接受
314
+ - `process_task_success` 中除去已有的一次 `task.success` 声明, 会在 `result_envelope` 进入 `result_queue` 前再进行 `task.input` 声明
315
+ - 为了保证fallback的sqlite中 `event_id` 全局统一
316
+ - `executor.get_fail_pairs`(原 `executor.get_error_pairs`) 会返回 `tuple[T, PeristedError]`
317
+ - `PeristedError` 由记录的 `error_type` 与 `error_message` 组成
318
+ - 重写 `TaskRouter` 节点, 现在必须传入一个 `router` 函数, 去指定任务的路由方向
319
+ - 移除一些没用的方法
320
+ - 比如 `TaskGraph.get_stage_input_trace`
310
321
  - fix:
311
- - i18n本地化在部分字段上失效的问题
312
- - 直接点击仪表盘中错误数字跳转到错误日志页后, 设置面板显示的还是仪表盘页面的设置
313
- - 前端中为各项仪表盘请求添加 `RequestSeq`, 以避免前后发送两个请求, 但因为延迟关系, 先发送的请求的返回覆盖掉后发送请求的返回
314
- - 修复前端中各项空字段需要在第一次refresh才显示的问题, 体感上会导致"加载"很慢
322
+ - 前端仪表盘页面中的结构图不会再因切换tab而显示空白
323
+ - 这是很古老的bug, 我不知道我为什么译制片没有修复
315
324
  - chore:
316
- - 将文档更新翻译为英/日两语
317
- - 这项操作太耗token了
325
+ - 添加更多demo
326
+ - 添加更多benchmark
327
+ - 添加 `Agents.md` 文件
328
+ - 我受够了无休止的对ai进行强调
318
329
 
319
330
  更多过往日志可看:
320
331
 
321
- [change_log.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/change_log.md )
332
+ [change_log.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/change_log.md)
322
333
 
323
334
  ## Star 历史趋势(Star History)
324
335
 
@@ -327,7 +338,7 @@ flowchart TD
327
338
  ![Star History Chart](https://api.star-history.com/svg?repos=Mr-xiaotian/CelestialFlow&type=Date)
328
339
 
329
340
  ## 许可(License)
330
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
341
+ This project is licensed under the MIT License - see the [LICENSE](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/LICENSE) file for details.
331
342
 
332
343
  ## 作者(Author)
333
344
  Author: Mr-xiaotian
@@ -14,8 +14,8 @@
14
14
  <p align="center">
15
15
  <img src="https://img.shields.io/badge/Task%20Graph-DAG-blueviolet">
16
16
  <img src="https://img.shields.io/badge/Workflow-Orchestrator-7c3aed">
17
- <img src="https://img.shields.io/badge/IPC-Redis%20Ready-red">
18
- <img src="https://img.shields.io/badge/Distributed-Worker%20Friendly-orange">
17
+ <img src="https://img.shields.io/badge/Event%20Tracing-CelestialTree-0ea5e9">
18
+ <img src="https://img.shields.io/badge/Web-Dashboard-FastAPI-ec4899">
19
19
  </p>
20
20
 
21
21
  <p align="center">
@@ -48,7 +48,7 @@ TaskGraph 能构建完整的 **有向图结构(Directed Graph)**,不仅支
48
48
 
49
49
  在执行与调度之外,CelestialFlow 进一步引入 **CelestialTree(简称: ctree) 事件追踪系统**,为每一个任务及其衍生行为(成功、失败、重试、拆分、路由等)记录明确的因果关系。借助 ctree,可以从任意一个初始任务出发,完整还原其在 TaskGraph 中的传播路径与执行轨迹,使任务系统可以进行完整的**追溯、分析、解释**。
50
50
 
51
- 在此基础上,CelestialFlow 支持 Web 可视化监控,并可通过 Redis 实现跨进程、跨设备协作;同时引入基于 Go 的外部 worker(通过 Redis 通信),用于承载 CPU 密集型任务,弥补 Python 在该场景下的性能瓶颈。
51
+ 在此基础上,CelestialFlow 支持 Web 可视化监控,并提供基于 Redis demo Go Worker 外部协作示例,用于展示按需构建跨进程、跨设备任务协作的方式。
52
52
 
53
53
  ## 项目结构(Project Structure)
54
54
 
@@ -111,6 +111,18 @@ uv pip install celestialflow
111
111
  pip install celestialflow
112
112
  ```
113
113
 
114
+ 如果你只使用 CelestialFlow 的核心调度、Web、持久化与 demo/test 之外的常规功能,上面的安装已经足够。
115
+
116
+ 如果你还需要启用 CelestialTree 事件追踪能力,则需要**额外安装** `celestialtree`:
117
+
118
+ ```bash
119
+ # 对已发布包使用者
120
+ uv pip install celestialtree
121
+
122
+ # 如果你是 clone 仓库后的开发者/贡献者
123
+ uv sync --group dev
124
+ ```
125
+
114
126
  一个简单的可运行代码:
115
127
 
116
128
  ```python
@@ -190,7 +202,7 @@ flowchart TD
190
202
  - [runtime/util_hash.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/util_hash.md)
191
203
  - [runtime/util_types.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/util_types.md)
192
204
  - [runtime/util_errors.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/util_errors.md)
193
- - [persistence/core_fail.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/persistence/core_fail.md)
205
+ - [persistence/core_fallback.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/persistence/core_fallback.md)
194
206
  - [persistence/core_log.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/persistence/core_log.md)
195
207
 
196
208
  如果你更喜欢通过完整案例理解框架的运行方式,可以参考这篇利用 TaskGraph 从零开始构建项目的教程:
@@ -203,20 +215,20 @@ flowchart TD
203
215
 
204
216
  你可以继续运行更多的演示代码,这里记录了各个演示文件与其中的演示函数说明:
205
217
 
206
- [🎮demo/](https://github.com/Mr-xiaotian/CelestialFlow/tree/main/docs/zh-CN/demo)
218
+ [🎮demo/ 总览](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/demo/README.md)
207
219
 
208
- ​如果你想运行测试代码, 可以先查看如下文档内容:
220
+ 如果你想运行测试代码,可以先查看如下文档内容:
209
221
 
210
- [🧪tests/](https://github.com/Mr-xiaotian/CelestialFlow/tree/main/docs/zh-CN/tests)
222
+ [🧪tests/ 总览](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/tests/README.md)
211
223
 
212
- 如果你想查看bench内容, 这里的数据成为框架中部分设计的决策依据:
224
+ 如果你想查看 bench 内容,这些数据也是框架中部分设计取舍的依据:
213
225
 
214
- [⚡bench/](https://github.com/Mr-xiaotian/CelestialFlow/tree/main/docs/zh-CN/bench)
226
+ [⚡bench/ 总览](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/bench/README.md)
215
227
 
216
228
  ## 环境要求(Requirements)
217
229
 
218
- **CelestialFlow** 基于 Python 3.12+,并依赖以下核心组件。
219
- 请确保你的环境能够正常安装这些依赖(`pip install celestialflow` 会自动安装)。
230
+ **CelestialFlow** 基于 Python 3.12+,默认运行时依赖以下核心组件。
231
+ 其中 `celestialtree` 不再属于默认运行时依赖,而是额外安装的可选组件。
220
232
 
221
233
  | 依赖包 | 说明 |
222
234
  | ----------------- | ---- |
@@ -227,73 +239,74 @@ flowchart TD
227
239
  | **networkx** | 任务图(TaskGraph)结构与依赖分析 |
228
240
  | **jinja2** | FastAPI 模板引擎,用于 Web 可视化界面渲染 |
229
241
  | **tqdm** | 可选组件,进度条显示,用于任务执行可视化 |
230
- | **redis** | 可选组件,用于分布式任务通信(`TaskRedis*` 系列模块) |
231
- | **celestialtree** | 可选组件,用于任务状态上报与远程调用(`ctree_client`) |
242
+
243
+ 如需运行 `demo/demo_redis.py` Go Worker 示例,请额外安装 `redis` 并准备 Redis 服务;这部分不属于默认运行时依赖。
244
+
245
+ 如需运行依赖 CelestialTree 的 demo / bench / 追踪查询,请额外安装 `celestialtree`,或直接在源码仓库中执行 `uv sync --group dev`。
232
246
 
233
247
  ## 文件结构(File Structure)
234
248
 
235
249
  <p align="center">
236
250
  <img src="https://raw.githubusercontent.com/Mr-xiaotian/CelestialFlow/main/img/file_structure.svg" alt="FileStructure" />
237
251
  <br/>
238
- <em>celestial-flow 3.2.3</em>
252
+ <em>celestial-flow 3.2.4</em>
239
253
  </p>
240
254
 
241
255
  (该视图由我的另一个项目[CelestialVault](https://github.com/Mr-xiaotian/CelestialVault)中inst_file.FileTree.print_tree()生成。转换为图片则借助[Carbon](https://carbon.now.sh)。)
242
256
 
243
257
  ## 版本日志(Version Log)
244
- - 3.2.3
258
+ - 3.2.4
245
259
  - feat:
246
- - **[IMPORTANT]** 前端仪表盘设置面板中新添 `节点等待使用全局估计` 开关, 开启后节点卡片中原 `等待` 量将被替换为 `全局等待`, 并在卡片中显示 `全局剩余时间`
247
- - 这个功能非常有趣, 开启前后能看到数值大幅波动
248
- - **[IMPORTANT]** 重写任务注入页面, 现在实用性远远高于之前版本
249
- - 可以给每个节点单独配置注入任务列表, 在一起发送
250
- - **[IMPORTANT]** 移除 `TaskExecutor` `get_args` 与 `process_result` 两个方法, 以及 `unpack_task_args` 属性
251
- - 这是为引入泛型必要的修改
252
- - `process_result` 功能很简单, 对func输出的result进行再次处理, 但事实上在输入func前对齐进行包装也能达到一样的效果
253
- - `get_args` 功能更为复杂, 可以直接将前一节点提供的 `result` 转为当前节点所需的 `task` 类型, 非常灵活; 但问题在于太过灵活, 导致使用心智负担很大
254
- - `unpack_task_args` 就是 `get_args` 带来的一项心智负担, 默认 `get_args` 会把 `task` 进行 `(task, )` 包裹后发送给func, 开启 `unpack_task_args` 后则直接发送
255
- - **[IMPORTANT]** `graph` 的init参数中添加 `name`, 以与 `executor` `stage` 一致
256
- - 破坏接口破坏性更新
257
- - 在日志的 `start_graph` `end_graph` 与web端的 `graph_anaylysis` 中都有显示
258
- - 彻底移除前后端通信中的 `graph_summary` , 原本残余的 `全局剩余时间` 现在拆为各个节点的 `全局等待` `全局剩余时间`
259
- - 这里所说的 `全局` 意为根据图论关系, 由上游剩余的任务数估算下游总共能获得多少任务
260
- - 例如: 图关系 `A -> B`, A已处理任务2, 未处理任务3, B已处理任务4, 未处理任务2. 这意味着A成功的2个任务为B带来总共了6个任务, 那么我们可以据此估计B总功能获取"3/2*6=9"个任务, 因此B的 `等待` 任务数量为2, 但 `全局等待` 任务数量为5
261
- - 前端中添加部分提示气泡, 鼠标放上去后可以介绍相关信息, 例如本次新加入的节点 `全局等待` 的含义
262
- - 移除前端中节点卡片的拖拽功能
263
- - 这个功能是在最早加入web页面时添加的, 当时感觉很帅, 但现在有点玩腻了
264
- - 前端错误日志页面添加 `任务注入` 按钮, 可以把选定任务直接添加到任务注入页面中节点的代注入任务列表中
265
- - 在 `TaskSplitter` 中添加 `split_item` 方法, 可自由定义
266
- - 原本的 `splitter` 非常依赖于 `get_args`, 现在通过 `split_item` 方法稍微弥补其缺失的灵活性
260
+ - **[IMPORTANT]** 合并原有的 `fail_funnel` `success_funnel` 机制为 `fallback` , 并采用 `sqlite` 进行存储
261
+ - 原有基于 `jsonl` 存储的fail持久化机制在存储时非常好用, 但读取时每次都需要全量读取到内存中再进行检索, 非常麻烦; 我虽然也想过用类似 `redis` 的数据库服务, 但实在不想另外启动第三方服务. 然后我意外发现 `sqlite` 完美符合我的一切要求
262
+ - Richard 万岁!
263
+ - 至于原有的 `success_funnel` 机制完全是个半成品: 只能用于 `executor`, 而不能用于 `stage`; 完全在内存存储. 所以借着这次机会也一并重构, 合并入 `fallback_funnel`
264
+ - 现在 `fallback_funnel` 会在任务 `注入/重复/重试/失败/成功` 时对sqlite中相应记录进行插入/更新/删除操作
265
+ - 其中在任务成功时默认会删除该条记录, 但如果开启 `executor` 中的 `perist_result` 选项, 则会保留该条记录, 并将 `status` 字段更新为 `success`
266
+ - **[IMPORTANT]** 移除 `stages` 中的三个redis节点, 并添加demo文件, 说明如果自行构建相关节点
267
+ - 相比 `TaskSplitter` `TaskRouter`, 这三个节点实在可有可无, 还会导致多一个 `redis` 依赖包
268
+ - **[IMPORTANT]** `celestialtree` 不再继续作为依赖库, 现有的事件声明机制基于一套protol接口, 并默认使用本地的超简化实现
269
+ - 这样做同样是为了避免太多库依赖, `celestialtree` 库包含对 `grpcio` `protobuf` 的依赖, 而这两者对于python free-threading版本的支持性不太好, 因此在有他们的情况下 `celestialflow` 无法在free-threading版本下运行----而这是我非常期待的
270
+ - 根据 `bench_gil_vs_nogil`, 在free-threading版本下, `executor` 在cpu密集任务中会得到5.25倍提升, 而 `graph` 在cpu密集任务中则会得到7.55倍提升. 非常喜人
271
+ - 在前端 `节点指标走向` 卡片中添加 `全局等待队列`
272
+ - `graph` 中添加 `start_graph_db` 方法, 接受一个fallback数据库地址, 然后根据其中失败数据进行 `start_graph`; 在 `executor` 中添加 `start_db` 方法, 接受一个fallback数据库地址, 然后根据其中失败数据进行 `start`
273
+ - 很方便
267
274
  - refactor:
268
- - **[IMPORTANT]** 引入泛型, 同时强制性要求py版本>=3.12
269
- - 泛型的引入使得代码更加类型安全, 同时也提高了代码的可读性
270
- - 3.12版本对泛型的表述非常直观
271
- - 移除前端代码中所有对 `localStorage` 的使用
272
- - 在已经有config配置文件的情况下意义不大, 反而会带来困扰
273
- - 将任务队列的drain操作从graph层移至stage层
274
- - 之前不能这样做是因为节点的 `stage_mode` 可能为 `process`, 此时在主进程持有的节点非真实运行的节点
275
- - 算是3.2.0版本带来的持久影响之一
276
- - 优化 `TaskMetric` 中对锁的使用
277
- - 移除 `TaskEnvelope` 中的 `change_id()` 方法, 现在默认envelope不可变, 同时 `emit_retry_envelope` 中不再把原有的envelope的id修改后继续提交给worker, 而是直接使用新生成的envelope
278
- - 移除错误日志中的 `error` `error_repr` `task_repr` 字段
279
- - 修改前后端通信中任务注入数据的格式, 以方便同时提交多个节点的任务数据
280
- - 前端代码中开启strict检查
281
- - 将前端中 `injection.css` 文件拆分成多个文件
282
- - 修改 `config.json` 的数据格式, 现在按照生效区域进行分类
283
- - 收紧前端中的数据类型
284
- - 添加 `ReportTaskGraph` 类型, 专门用于给reporter做类型声明
275
+ - **[IMPORTANT]** 将server端存储error数据的方式从py原生列表改为一个临时sqlite数据库
276
+ - 在锤子效应下我想更多的尝试sqlite的使用
277
+ - 为每个 `graph` 添加基于 `name` 与 `time.time()` 的 `graph_id` 作为唯一性标识符
278
+ - 重写reporter与server端的交互逻辑
279
+ - 现在每一轮refresh开始时都会进行状态对齐, 通过 `graph_id` 确定两者所持有的数据是否来自一个 `graph` 对象, 是的话则不用重复push structure/analysis数据
280
+ - 在状态对齐时如果双方的graph一致, server会返回自己所持有的错误数据中最大的 `event_id` 值, 经过严格校验, `event_id` 在数据库中严格递增
281
+ - 将reporter中原有的 `push_error_meta` `push_error_content` 合并, 每次刷新时只发送新增的错误数据, 而新增数据则根据server返回的最大 `event_id` 值与本地数据库中的最大 `event_id` 值进行筛选
282
+ - 为 `graph.connect` 与 `graph_set_stage` 绑定更多职责
283
+ - 现在节点与 `graph` 在 `ctree` `reporter` 上的同步在 `graph_set_stage` 中完成
284
+ - `task_queue` `result_queue` 的上下流绑定, 以及 `counter` 的绑定都在 `graph.connect` 中完成
285
+ - 删除 `TaskEnvelope` 中无关数据, 只保留 `task` `hash` `id` 三项
286
+ - `source` 字段本就不该添加, 它一致没有发挥作用
287
+ - `prev` 字段是为了原版 `success_funnel` 而服务的, 现在已经没有必要
288
+ - `TaskMetrics` 中固定使用 `Lock` 对所有 `counter` 进行限定, 而无关乎 `executor` 的 `execution_mode`
289
+ - 这种固定的模式在牺牲部分性能的情况下使得代码更加稳定
290
+ - 根据 `bench_lock_overhead`, 这会导致 `counter` 慢3.2倍左右, 考虑到 `counter` 的更新全部基于 `int` 类型, 本就很快, 可以接受
291
+ - `process_task_success` 中除去已有的一次 `task.success` 声明, 会在 `result_envelope` 进入 `result_queue` 前再进行 `task.input` 声明
292
+ - 为了保证fallback的sqlite中 `event_id` 全局统一
293
+ - `executor.get_fail_pairs`(原 `executor.get_error_pairs`) 会返回 `tuple[T, PeristedError]`
294
+ - `PeristedError` 由记录的 `error_type` 与 `error_message` 组成
295
+ - 重写 `TaskRouter` 节点, 现在必须传入一个 `router` 函数, 去指定任务的路由方向
296
+ - 移除一些没用的方法
297
+ - 比如 `TaskGraph.get_stage_input_trace`
285
298
  - fix:
286
- - i18n本地化在部分字段上失效的问题
287
- - 直接点击仪表盘中错误数字跳转到错误日志页后, 设置面板显示的还是仪表盘页面的设置
288
- - 前端中为各项仪表盘请求添加 `RequestSeq`, 以避免前后发送两个请求, 但因为延迟关系, 先发送的请求的返回覆盖掉后发送请求的返回
289
- - 修复前端中各项空字段需要在第一次refresh才显示的问题, 体感上会导致"加载"很慢
299
+ - 前端仪表盘页面中的结构图不会再因切换tab而显示空白
300
+ - 这是很古老的bug, 我不知道我为什么译制片没有修复
290
301
  - chore:
291
- - 将文档更新翻译为英/日两语
292
- - 这项操作太耗token了
302
+ - 添加更多demo
303
+ - 添加更多benchmark
304
+ - 添加 `Agents.md` 文件
305
+ - 我受够了无休止的对ai进行强调
293
306
 
294
307
  更多过往日志可看:
295
308
 
296
- [change_log.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/change_log.md )
309
+ [change_log.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/change_log.md)
297
310
 
298
311
  ## Star 历史趋势(Star History)
299
312
 
@@ -302,7 +315,7 @@ flowchart TD
302
315
  ![Star History Chart](https://api.star-history.com/svg?repos=Mr-xiaotian/CelestialFlow&type=Date)
303
316
 
304
317
  ## 许可(License)
305
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
318
+ This project is licensed under the MIT License - see the [LICENSE](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/LICENSE) file for details.
306
319
 
307
320
  ## 作者(Author)
308
321
  Author: Mr-xiaotian
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "celestialflow"
7
- version = "3.2.3"
7
+ version = "3.2.4"
8
8
  description = "A flexible GRAPH-based task orchestration framework."
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -18,9 +18,7 @@ dependencies = [
18
18
  "uvicorn",
19
19
  "requests",
20
20
  "networkx",
21
- "redis",
22
21
  "jinja2",
23
- "celestialtree>=0.1.3",
24
22
  ]
25
23
 
26
24
  classifiers = [
@@ -72,6 +70,8 @@ dev = [
72
70
  "python-dotenv>=1.2.2",
73
71
  "ruff>=0.15.0",
74
72
  "pyright>=1.1.409",
73
+ "redis",
74
+ "celestialtree>=0.1.3",
75
75
  ]
76
76
 
77
77
  [tool.pyright]
@@ -13,19 +13,15 @@ from .graph import (
13
13
  TaskLoop,
14
14
  TaskWheel,
15
15
  )
16
- from .observability import BaseObserver, CallbackObserver, TaskProgress
17
- from .persistence.util_jsonl import (
18
- load_jsonl_logs,
19
- load_task_by_error,
20
- load_task_by_stage,
16
+ from .observability import BaseObserver, TaskProgress
17
+ from .persistence.util_sqlite import (
18
+ load_records,
19
+ load_records_grouped_by_stage,
21
20
  )
22
21
  from .runtime.util_hash import make_hashable
23
22
  from .runtime.util_types import TerminationSignal
24
23
  from .stage import (
25
24
  TaskExecutor,
26
- TaskRedisAck,
27
- TaskRedisSource,
28
- TaskRedisTransport,
29
25
  TaskRouter,
30
26
  TaskSplitter,
31
27
  TaskStage,
@@ -36,7 +32,6 @@ from .web import TaskWebServer
36
32
 
37
33
  __all__ = [
38
34
  "BaseObserver",
39
- "CallbackObserver",
40
35
  "TaskChain",
41
36
  "TaskComplete",
42
37
  "TaskCross",
@@ -45,9 +40,6 @@ __all__ = [
45
40
  "TaskGrid",
46
41
  "TaskLoop",
47
42
  "TaskProgress",
48
- "TaskRedisAck",
49
- "TaskRedisSource",
50
- "TaskRedisTransport",
51
43
  "TaskRouter",
52
44
  "TaskSplitter",
53
45
  "TaskStage",
@@ -57,8 +49,7 @@ __all__ = [
57
49
  "benchmark_executor",
58
50
  "benchmark_graph",
59
51
  "format_table",
60
- "load_jsonl_logs",
61
- "load_task_by_error",
62
- "load_task_by_stage",
52
+ "load_records",
53
+ "load_records_grouped_by_stage",
63
54
  "make_hashable",
64
55
  ]