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.
- {celestialflow-3.2.3 → celestialflow-3.2.4}/PKG-INFO +75 -64
- {celestialflow-3.2.3 → celestialflow-3.2.4}/README.md +74 -61
- {celestialflow-3.2.3 → celestialflow-3.2.4}/pyproject.toml +3 -3
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/__init__.py +6 -15
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/graph/core_graph.py +68 -132
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/observability/__init__.py +1 -2
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/observability/core_observer.py +0 -16
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/observability/core_report.py +88 -105
- {celestialflow-3.2.3/src/celestialflow/graph → celestialflow-3.2.4/src/celestialflow/observability}/util_types.py +5 -4
- celestialflow-3.2.4/src/celestialflow/persistence/__init__.py +10 -0
- celestialflow-3.2.4/src/celestialflow/persistence/core_fallback.py +225 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/persistence/core_log.py +6 -18
- celestialflow-3.2.4/src/celestialflow/persistence/util_payload.py +24 -0
- celestialflow-3.2.4/src/celestialflow/persistence/util_sqlite.py +536 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/runtime/core_dispatch.py +22 -9
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/runtime/core_envelope.py +3 -18
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/runtime/core_metrics.py +5 -27
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/runtime/core_queue.py +11 -15
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/runtime/util_constant.py +4 -4
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/runtime/util_errors.py +52 -0
- celestialflow-3.2.4/src/celestialflow/runtime/util_event.py +63 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/runtime/util_types.py +0 -37
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/stage/__init__.py +0 -6
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/stage/core_executor.py +111 -125
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/stage/core_stage.py +240 -242
- celestialflow-3.2.4/src/celestialflow/stage/core_stages.py +293 -0
- celestialflow-3.2.4/src/celestialflow/stage/util_callable.py +31 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/utils/util_clone.py +5 -10
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/config.json +3 -3
- celestialflow-3.2.4/src/celestialflow/web/core_server.py +421 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/routes/pull_routes.py +135 -137
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/routes/push_routes.py +48 -89
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/dashboard_analysis.js +5 -4
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/dashboard_history.js +6 -1
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/errors.js +8 -6
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/i18n.js +3 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/main.js +7 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/web_config.js +4 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/dashboard_analysis.ts +6 -3
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/dashboard_history.ts +8 -1
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/errors.ts +13 -9
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/globals.d.ts +155 -155
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/i18n.ts +3 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/main.ts +7 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/web_config.ts +4 -0
- celestialflow-3.2.4/src/celestialflow/web/util_error.py +30 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/util_models.py +5 -10
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow.egg-info/PKG-INFO +75 -64
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow.egg-info/SOURCES.txt +6 -4
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow.egg-info/requires.txt +0 -2
- celestialflow-3.2.3/src/celestialflow/persistence/__init__.py +0 -12
- celestialflow-3.2.3/src/celestialflow/persistence/core_fail.py +0 -179
- celestialflow-3.2.3/src/celestialflow/persistence/core_success.py +0 -43
- celestialflow-3.2.3/src/celestialflow/persistence/util_jsonl.py +0 -214
- celestialflow-3.2.3/src/celestialflow/stage/core_stages.py +0 -559
- celestialflow-3.2.3/src/celestialflow/web/core_server.py +0 -219
- celestialflow-3.2.3/src/celestialflow/web/util_error.py +0 -86
- {celestialflow-3.2.3 → celestialflow-3.2.4}/setup.cfg +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/funnel/__init__.py +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/funnel/core_inlet.py +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/funnel/core_spout.py +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/graph/__init__.py +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/graph/core_structure.py +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/graph/util_analysis.py +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/graph/util_serialize.py +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/observability/core_progress.py +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/runtime/__init__.py +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/runtime/util_estimators.py +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/runtime/util_hash.py +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/stage/util_types.py +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/utils/__init__.py +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/utils/util_benchmark.py +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/utils/util_collections.py +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/utils/util_format.py +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/__init__.py +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/routes/__init__.py +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/_colors.css +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/base.css +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/dashboard.css +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/dashboard_analysis.css +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/dashboard_history.css +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/dashboard_statuses.css +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/dashboard_structure.css +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/dashboard_summary.css +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/errors.css +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/injection_editor.css +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/injection_layout.css +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/injection_nodes.css +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/css/injection_preview.css +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/favicon.ico +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/dashboard_statuses.js +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/dashboard_structure.js +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/dashboard_summary.js +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/injection.js +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/layout_editor.js +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/js/utils.js +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/dashboard_statuses.ts +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/dashboard_structure.ts +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/dashboard_summary.ts +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/injection.ts +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/layout_editor.ts +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/utils.ts +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/templates/index.html +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/util_cal.py +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow/web/util_config.py +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow.egg-info/dependency_links.txt +0 -0
- {celestialflow-3.2.3 → celestialflow-3.2.4}/src/celestialflow.egg-info/entry_points.txt +0 -0
- {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
|
+
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/
|
|
43
|
-
<img src="https://img.shields.io/badge/
|
|
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
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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
|
-
|
|
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
|
-
|
|
256
|
-
|
|
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.
|
|
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.
|
|
281
|
+
- 3.2.4
|
|
270
282
|
- feat:
|
|
271
|
-
- **[IMPORTANT]**
|
|
272
|
-
-
|
|
273
|
-
|
|
274
|
-
-
|
|
275
|
-
|
|
276
|
-
-
|
|
277
|
-
|
|
278
|
-
- `
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
-
|
|
282
|
-
|
|
283
|
-
-
|
|
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]**
|
|
294
|
-
-
|
|
295
|
-
|
|
296
|
-
-
|
|
297
|
-
-
|
|
298
|
-
|
|
299
|
-
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
-
|
|
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
|
-
-
|
|
312
|
-
|
|
313
|
-
- 前端中为各项仪表盘请求添加 `RequestSeq`, 以避免前后发送两个请求, 但因为延迟关系, 先发送的请求的返回覆盖掉后发送请求的返回
|
|
314
|
-
- 修复前端中各项空字段需要在第一次refresh才显示的问题, 体感上会导致"加载"很慢
|
|
322
|
+
- 前端仪表盘页面中的结构图不会再因切换tab而显示空白
|
|
323
|
+
- 这是很古老的bug, 我不知道我为什么译制片没有修复
|
|
315
324
|
- chore:
|
|
316
|
-
-
|
|
317
|
-
|
|
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
|

|
|
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/
|
|
18
|
-
<img src="https://img.shields.io/badge/
|
|
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
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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
|
-
|
|
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
|
-
|
|
231
|
-
|
|
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.
|
|
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.
|
|
258
|
+
- 3.2.4
|
|
245
259
|
- feat:
|
|
246
|
-
- **[IMPORTANT]**
|
|
247
|
-
-
|
|
248
|
-
|
|
249
|
-
-
|
|
250
|
-
|
|
251
|
-
-
|
|
252
|
-
|
|
253
|
-
- `
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
-
|
|
257
|
-
|
|
258
|
-
-
|
|
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]**
|
|
269
|
-
-
|
|
270
|
-
|
|
271
|
-
-
|
|
272
|
-
-
|
|
273
|
-
|
|
274
|
-
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
-
|
|
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
|
-
-
|
|
287
|
-
|
|
288
|
-
- 前端中为各项仪表盘请求添加 `RequestSeq`, 以避免前后发送两个请求, 但因为延迟关系, 先发送的请求的返回覆盖掉后发送请求的返回
|
|
289
|
-
- 修复前端中各项空字段需要在第一次refresh才显示的问题, 体感上会导致"加载"很慢
|
|
299
|
+
- 前端仪表盘页面中的结构图不会再因切换tab而显示空白
|
|
300
|
+
- 这是很古老的bug, 我不知道我为什么译制片没有修复
|
|
290
301
|
- chore:
|
|
291
|
-
-
|
|
292
|
-
|
|
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
|

|
|
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.
|
|
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,
|
|
17
|
-
from .persistence.
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"load_task_by_stage",
|
|
52
|
+
"load_records",
|
|
53
|
+
"load_records_grouped_by_stage",
|
|
63
54
|
"make_hashable",
|
|
64
55
|
]
|