celestialflow 3.2.2__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.2 → celestialflow-3.2.4}/PKG-INFO +77 -36
- {celestialflow-3.2.2 → celestialflow-3.2.4}/README.md +75 -32
- {celestialflow-3.2.2 → celestialflow-3.2.4}/pyproject.toml +5 -8
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/__init__.py +6 -15
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/graph/core_graph.py +132 -212
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/graph/core_structure.py +22 -16
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/graph/util_analysis.py +3 -6
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/graph/util_serialize.py +6 -9
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/observability/__init__.py +1 -2
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/observability/core_observer.py +0 -16
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/observability/core_progress.py +1 -1
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/observability/core_report.py +91 -109
- celestialflow-3.2.4/src/celestialflow/observability/util_types.py +28 -0
- 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.2 → celestialflow-3.2.4}/src/celestialflow/persistence/core_log.py +21 -36
- 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.2 → celestialflow-3.2.4}/src/celestialflow/runtime/core_dispatch.py +52 -19
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/runtime/core_envelope.py +11 -20
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/runtime/core_metrics.py +41 -53
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/runtime/core_queue.py +16 -13
- celestialflow-3.2.4/src/celestialflow/runtime/util_constant.py +19 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/runtime/util_errors.py +52 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/runtime/util_estimators.py +14 -18
- celestialflow-3.2.4/src/celestialflow/runtime/util_event.py +63 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/runtime/util_types.py +43 -75
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/stage/__init__.py +0 -6
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/stage/core_executor.py +170 -230
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/stage/core_stage.py +240 -211
- 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.4/src/celestialflow/stage/util_types.py +6 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/utils/util_benchmark.py +5 -3
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/utils/util_clone.py +27 -25
- celestialflow-3.2.4/src/celestialflow/web/config.json +34 -0
- celestialflow-3.2.4/src/celestialflow/web/core_server.py +421 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/routes/pull_routes.py +135 -139
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/routes/push_routes.py +53 -90
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/static/css/base.css +0 -38
- celestialflow-3.2.4/src/celestialflow/web/static/css/dashboard.css +175 -0
- celestialflow-3.2.4/src/celestialflow/web/static/css/dashboard_analysis.css +41 -0
- celestialflow-3.2.4/src/celestialflow/web/static/css/dashboard_history.css +89 -0
- celestialflow-3.2.4/src/celestialflow/web/static/css/dashboard_statuses.css +225 -0
- celestialflow-3.2.4/src/celestialflow/web/static/css/dashboard_structure.css +27 -0
- celestialflow-3.2.4/src/celestialflow/web/static/css/dashboard_summary.css +136 -0
- celestialflow-3.2.4/src/celestialflow/web/static/css/errors.css +364 -0
- celestialflow-3.2.4/src/celestialflow/web/static/css/injection_editor.css +223 -0
- celestialflow-3.2.4/src/celestialflow/web/static/css/injection_layout.css +119 -0
- celestialflow-3.2.4/src/celestialflow/web/static/css/injection_nodes.css +92 -0
- celestialflow-3.2.4/src/celestialflow/web/static/css/injection_preview.css +140 -0
- celestialflow-3.2.4/src/celestialflow/web/static/js/dashboard_analysis.js +84 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/static/js/dashboard_history.js +54 -35
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/static/js/dashboard_statuses.js +64 -47
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/static/js/dashboard_structure.js +28 -16
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/static/js/dashboard_summary.js +8 -7
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/static/js/errors.js +51 -26
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/static/js/i18n.js +148 -87
- celestialflow-3.2.4/src/celestialflow/web/static/js/injection.js +675 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/static/js/layout_editor.js +58 -26
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/static/js/main.js +63 -14
- celestialflow-3.2.4/src/celestialflow/web/static/js/utils.js +177 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/static/js/web_config.js +272 -117
- celestialflow-3.2.4/src/celestialflow/web/static/ts/dashboard_analysis.ts +98 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/dashboard_history.ts +71 -53
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/dashboard_statuses.ts +85 -56
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/dashboard_structure.ts +88 -80
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/dashboard_summary.ts +8 -8
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/errors.ts +79 -35
- celestialflow-3.2.4/src/celestialflow/web/static/ts/globals.d.ts +155 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/i18n.ts +176 -91
- celestialflow-3.2.4/src/celestialflow/web/static/ts/injection.ts +787 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/layout_editor.ts +70 -37
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/static/ts/main.ts +141 -88
- celestialflow-3.2.4/src/celestialflow/web/static/ts/utils.ts +205 -0
- celestialflow-3.2.4/src/celestialflow/web/static/ts/web_config.ts +561 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/templates/index.html +192 -215
- celestialflow-3.2.4/src/celestialflow/web/util_error.py +30 -0
- celestialflow-3.2.4/src/celestialflow/web/util_models.py +91 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow.egg-info/PKG-INFO +77 -36
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow.egg-info/SOURCES.txt +12 -5
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow.egg-info/requires.txt +0 -2
- celestialflow-3.2.2/src/celestialflow/persistence/__init__.py +0 -12
- celestialflow-3.2.2/src/celestialflow/persistence/core_fail.py +0 -161
- celestialflow-3.2.2/src/celestialflow/persistence/core_success.py +0 -42
- celestialflow-3.2.2/src/celestialflow/persistence/util_constant.py +0 -12
- celestialflow-3.2.2/src/celestialflow/persistence/util_jsonl.py +0 -229
- celestialflow-3.2.2/src/celestialflow/stage/core_stages.py +0 -533
- celestialflow-3.2.2/src/celestialflow/web/config.json +0 -23
- celestialflow-3.2.2/src/celestialflow/web/core_server.py +0 -217
- celestialflow-3.2.2/src/celestialflow/web/static/css/dashboard.css +0 -71
- celestialflow-3.2.2/src/celestialflow/web/static/css/dashboard_analysis.css +0 -39
- celestialflow-3.2.2/src/celestialflow/web/static/css/dashboard_history.css +0 -87
- celestialflow-3.2.2/src/celestialflow/web/static/css/dashboard_statuses.css +0 -238
- celestialflow-3.2.2/src/celestialflow/web/static/css/dashboard_structure.css +0 -25
- celestialflow-3.2.2/src/celestialflow/web/static/css/dashboard_summary.css +0 -134
- celestialflow-3.2.2/src/celestialflow/web/static/css/errors.css +0 -315
- celestialflow-3.2.2/src/celestialflow/web/static/css/injection.css +0 -615
- celestialflow-3.2.2/src/celestialflow/web/static/js/dashboard_analysis.js +0 -66
- celestialflow-3.2.2/src/celestialflow/web/static/js/injection.js +0 -404
- celestialflow-3.2.2/src/celestialflow/web/static/js/utils.js +0 -117
- celestialflow-3.2.2/src/celestialflow/web/static/ts/dashboard_analysis.ts +0 -70
- celestialflow-3.2.2/src/celestialflow/web/static/ts/globals.d.ts +0 -27
- celestialflow-3.2.2/src/celestialflow/web/static/ts/injection.ts +0 -455
- celestialflow-3.2.2/src/celestialflow/web/static/ts/utils.ts +0 -132
- celestialflow-3.2.2/src/celestialflow/web/static/ts/web_config.ts +0 -357
- celestialflow-3.2.2/src/celestialflow/web/util_error.py +0 -84
- celestialflow-3.2.2/src/celestialflow/web/util_models.py +0 -72
- {celestialflow-3.2.2 → celestialflow-3.2.4}/setup.cfg +0 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/funnel/__init__.py +0 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/funnel/core_inlet.py +0 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/funnel/core_spout.py +0 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/graph/__init__.py +0 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/runtime/__init__.py +0 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/runtime/util_hash.py +0 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/utils/__init__.py +0 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/utils/util_collections.py +0 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/utils/util_format.py +0 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/__init__.py +0 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/routes/__init__.py +0 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/static/css/_colors.css +0 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/static/favicon.ico +0 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/util_cal.py +0 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow/web/util_config.py +0 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow.egg-info/dependency_links.txt +0 -0
- {celestialflow-3.2.2 → celestialflow-3.2.4}/src/celestialflow.egg-info/entry_points.txt +0 -0
- {celestialflow-3.2.2 → 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
|
|
@@ -12,16 +12,14 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Classifier: Framework :: FastAPI
|
|
14
14
|
Classifier: Topic :: Software Development :: Libraries
|
|
15
|
-
Requires-Python: >=3.
|
|
15
|
+
Requires-Python: >=3.12
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
Requires-Dist: tqdm
|
|
18
18
|
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.2
|
|
25
23
|
|
|
26
24
|
# CelestialFlow ——一个轻量级、可并行、基于图结构的 Python 任务调度框架
|
|
27
25
|
|
|
@@ -39,8 +37,8 @@ Requires-Dist: celestialtree>=0.1.2
|
|
|
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,67 +238,98 @@ 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.
|
|
244
|
-
|
|
253
|
+
**CelestialFlow** 基于 Python 3.12+,默认运行时依赖以下核心组件。
|
|
254
|
+
其中 `celestialtree` 不再属于默认运行时依赖,而是额外安装的可选组件。
|
|
245
255
|
|
|
246
256
|
| 依赖包 | 说明 |
|
|
247
257
|
| ----------------- | ---- |
|
|
248
|
-
| **Python ≥ 3.
|
|
258
|
+
| **Python ≥ 3.12** | 运行环境,建议使用 3.12 及以上版本 |
|
|
249
259
|
| **fastapi** | Web 服务接口框架(用于任务可视化与远程控制) |
|
|
250
260
|
| **uvicorn** | FastAPI 的高性能 ASGI 服务器 |
|
|
251
261
|
| **requests** | HTTP 客户端库,用于任务状态上报与远程调用 |
|
|
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
|
-
- `
|
|
272
|
-
|
|
273
|
-
|
|
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
|
+
- 很方便
|
|
274
297
|
- refactor:
|
|
275
|
-
-
|
|
276
|
-
|
|
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`
|
|
277
321
|
- fix:
|
|
278
|
-
-
|
|
279
|
-
|
|
280
|
-
- 在 `graph._finalize_nodes` 中添加对thread未终止的防御性检查
|
|
281
|
-
- 修复 `stage` 中 `start_time` 在未定义前被 `report` 调用的问题
|
|
282
|
-
- 修复 `TaskRedisTransport._transport` 中使用 `id()` 来计算task_id导致的问题
|
|
283
|
-
- 修复部分任务无法被hash导致的panic问题
|
|
322
|
+
- 前端仪表盘页面中的结构图不会再因切换tab而显示空白
|
|
323
|
+
- 这是很古老的bug, 我不知道我为什么译制片没有修复
|
|
284
324
|
- chore:
|
|
285
|
-
-
|
|
286
|
-
|
|
287
|
-
-
|
|
325
|
+
- 添加更多demo
|
|
326
|
+
- 添加更多benchmark
|
|
327
|
+
- 添加 `Agents.md` 文件
|
|
328
|
+
- 我受够了无休止的对ai进行强调
|
|
288
329
|
|
|
289
330
|
更多过往日志可看:
|
|
290
331
|
|
|
291
|
-
[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)
|
|
292
333
|
|
|
293
334
|
## Star 历史趋势(Star History)
|
|
294
335
|
|
|
@@ -297,7 +338,7 @@ flowchart TD
|
|
|
297
338
|

|
|
298
339
|
|
|
299
340
|
## 许可(License)
|
|
300
|
-
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.
|
|
301
342
|
|
|
302
343
|
## 作者(Author)
|
|
303
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,67 +215,98 @@ 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.
|
|
219
|
-
|
|
230
|
+
**CelestialFlow** 基于 Python 3.12+,默认运行时依赖以下核心组件。
|
|
231
|
+
其中 `celestialtree` 不再属于默认运行时依赖,而是额外安装的可选组件。
|
|
220
232
|
|
|
221
233
|
| 依赖包 | 说明 |
|
|
222
234
|
| ----------------- | ---- |
|
|
223
|
-
| **Python ≥ 3.
|
|
235
|
+
| **Python ≥ 3.12** | 运行环境,建议使用 3.12 及以上版本 |
|
|
224
236
|
| **fastapi** | Web 服务接口框架(用于任务可视化与远程控制) |
|
|
225
237
|
| **uvicorn** | FastAPI 的高性能 ASGI 服务器 |
|
|
226
238
|
| **requests** | HTTP 客户端库,用于任务状态上报与远程调用 |
|
|
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
|
-
- `
|
|
247
|
-
|
|
248
|
-
|
|
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
|
+
- 很方便
|
|
249
274
|
- refactor:
|
|
250
|
-
-
|
|
251
|
-
|
|
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`
|
|
252
298
|
- fix:
|
|
253
|
-
-
|
|
254
|
-
|
|
255
|
-
- 在 `graph._finalize_nodes` 中添加对thread未终止的防御性检查
|
|
256
|
-
- 修复 `stage` 中 `start_time` 在未定义前被 `report` 调用的问题
|
|
257
|
-
- 修复 `TaskRedisTransport._transport` 中使用 `id()` 来计算task_id导致的问题
|
|
258
|
-
- 修复部分任务无法被hash导致的panic问题
|
|
299
|
+
- 前端仪表盘页面中的结构图不会再因切换tab而显示空白
|
|
300
|
+
- 这是很古老的bug, 我不知道我为什么译制片没有修复
|
|
259
301
|
- chore:
|
|
260
|
-
-
|
|
261
|
-
|
|
262
|
-
-
|
|
302
|
+
- 添加更多demo
|
|
303
|
+
- 添加更多benchmark
|
|
304
|
+
- 添加 `Agents.md` 文件
|
|
305
|
+
- 我受够了无休止的对ai进行强调
|
|
263
306
|
|
|
264
307
|
更多过往日志可看:
|
|
265
308
|
|
|
266
|
-
[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)
|
|
267
310
|
|
|
268
311
|
## Star 历史趋势(Star History)
|
|
269
312
|
|
|
@@ -272,7 +315,7 @@ flowchart TD
|
|
|
272
315
|

|
|
273
316
|
|
|
274
317
|
## 许可(License)
|
|
275
|
-
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.
|
|
276
319
|
|
|
277
320
|
## 作者(Author)
|
|
278
321
|
Author: Mr-xiaotian
|
|
@@ -4,13 +4,13 @@ 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" }
|
|
11
11
|
authors = [{ name = "Mr-xiaotian", email = "mingxiaomingtian@gmail.com" }]
|
|
12
12
|
keywords = ["workflow", "task", "graph", "async", "CelestialFlow"]
|
|
13
|
-
requires-python = ">=3.
|
|
13
|
+
requires-python = ">=3.12"
|
|
14
14
|
|
|
15
15
|
dependencies = [
|
|
16
16
|
"tqdm",
|
|
@@ -18,9 +18,7 @@ dependencies = [
|
|
|
18
18
|
"uvicorn",
|
|
19
19
|
"requests",
|
|
20
20
|
"networkx",
|
|
21
|
-
"redis",
|
|
22
21
|
"jinja2",
|
|
23
|
-
"celestialtree>=0.1.2",
|
|
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]
|
|
@@ -79,14 +79,11 @@ include = ["src"]
|
|
|
79
79
|
ignore = ["tests", "**/tests/**", "typings", "demo", "bench", "experiments", "examples", "temp"]
|
|
80
80
|
|
|
81
81
|
typeCheckingMode = "strict"
|
|
82
|
-
reportExplicitAny = "none"
|
|
83
|
-
reportAny = "none"
|
|
84
|
-
reportUnannotatedClassAttribute = "none"
|
|
85
82
|
reportUnusedFunction = "none"
|
|
86
83
|
reportImplicitOverride = "none"
|
|
87
84
|
|
|
88
85
|
[tool.ruff]
|
|
89
|
-
target-version = "
|
|
86
|
+
target-version = "py312"
|
|
90
87
|
exclude = ["tests", "typings", "demo", "bench", "experiments", "examples", "temp"]
|
|
91
88
|
|
|
92
89
|
[tool.ruff.lint]
|
|
@@ -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
|
]
|