celestialflow 3.2.9__tar.gz → 3.3.1__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.9/src/celestialflow.egg-info → celestialflow-3.3.1}/PKG-INFO +123 -125
- {celestialflow-3.2.9 → celestialflow-3.3.1}/README.md +122 -124
- {celestialflow-3.2.9 → celestialflow-3.3.1}/pyproject.toml +1 -1
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/__init__.py +7 -10
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/benchmark/util_benchmark.py +2 -2
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/benchmark/util_clone.py +22 -38
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/graph/core_graph.py +139 -209
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/graph/core_structure.py +45 -45
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/graph/util_order_graph.py +8 -49
- celestialflow-3.3.1/src/celestialflow/graph/util_render.py +105 -0
- celestialflow-3.3.1/src/celestialflow/node/__init__.py +18 -0
- {celestialflow-3.2.9/src/celestialflow/stage → celestialflow-3.3.1/src/celestialflow/node}/core_dispatch.py +47 -59
- celestialflow-3.2.9/src/celestialflow/stage/core_executor.py → celestialflow-3.3.1/src/celestialflow/node/core_node.py +116 -153
- celestialflow-3.3.1/src/celestialflow/node/core_nodes.py +201 -0
- {celestialflow-3.2.9/src/celestialflow/stage → celestialflow-3.3.1/src/celestialflow/node}/util_callable.py +1 -1
- celestialflow-3.3.1/src/celestialflow/node/util_types.py +6 -0
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/observability/__init__.py +2 -0
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/observability/core_observer.py +3 -6
- celestialflow-3.3.1/src/celestialflow/observability/core_observer_print.py +86 -0
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/observability/core_report.py +61 -51
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/observability/util_types.py +14 -8
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/persistence/core_lifecycle.py +36 -13
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/persistence/core_log.py +59 -210
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/persistence/util_payload.py +1 -1
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/persistence/util_sqlite.py +53 -5
- celestialflow-3.3.1/src/celestialflow/runtime/core_envelope.py +38 -0
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/runtime/core_metrics.py +143 -91
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/runtime/core_queue.py +5 -5
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/runtime/util_constant.py +1 -5
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/runtime/util_errors.py +0 -15
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/runtime/util_format.py +0 -28
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/runtime/util_types.py +6 -72
- {celestialflow-3.2.9 → celestialflow-3.3.1/src/celestialflow.egg-info}/PKG-INFO +123 -125
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow.egg-info/SOURCES.txt +9 -12
- celestialflow-3.2.9/src/celestialflow/graph/util_estimators.py +0 -94
- celestialflow-3.2.9/src/celestialflow/graph/util_serialize.py +0 -149
- celestialflow-3.2.9/src/celestialflow/runtime/core_envelope.py +0 -60
- celestialflow-3.2.9/src/celestialflow/runtime/util_estimators.py +0 -68
- celestialflow-3.2.9/src/celestialflow/runtime/util_hash.py +0 -39
- celestialflow-3.2.9/src/celestialflow/stage/__init__.py +0 -20
- celestialflow-3.2.9/src/celestialflow/stage/core_stage.py +0 -130
- celestialflow-3.2.9/src/celestialflow/stage/core_stages.py +0 -285
- celestialflow-3.2.9/src/celestialflow/stage/util_types.py +0 -6
- {celestialflow-3.2.9 → celestialflow-3.3.1}/LICENSE +0 -0
- {celestialflow-3.2.9 → celestialflow-3.3.1}/setup.cfg +0 -0
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/benchmark/__init__.py +0 -0
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/funnel/__init__.py +0 -0
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/funnel/core_inlet.py +0 -0
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/funnel/core_spout.py +0 -0
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/funnel/util_count.py +0 -0
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/graph/__init__.py +0 -0
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/persistence/__init__.py +0 -0
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/persistence/core_scope.py +0 -0
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/runtime/__init__.py +0 -0
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/runtime/util_config.py +0 -0
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow/runtime/util_event.py +0 -0
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow.egg-info/dependency_links.txt +0 -0
- {celestialflow-3.2.9 → celestialflow-3.3.1}/src/celestialflow.egg-info/requires.txt +0 -0
- {celestialflow-3.2.9 → celestialflow-3.3.1}/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.
|
|
3
|
+
Version: 3.3.1
|
|
4
4
|
Summary: A flexible GRAPH-based task orchestration framework.
|
|
5
5
|
Author-email: Mr-xiaotian <mingxiaomingtian@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -19,6 +19,8 @@ Dynamic: license-file
|
|
|
19
19
|
|
|
20
20
|
# CelestialFlow ——一个轻量级、可并行、基于图结构的 Python 任务调度框架
|
|
21
21
|
|
|
22
|
+
> 📅 最后更新日期: 2026/09/24
|
|
23
|
+
|
|
22
24
|
<p align="center">
|
|
23
25
|
<img src="https://raw.githubusercontent.com/Mr-xiaotian/CelestialFlow/main/img/logo.png" width="1080" alt="CelestialFlow Logo">
|
|
24
26
|
</p>
|
|
@@ -45,28 +47,35 @@ Dynamic: license-file
|
|
|
45
47
|
- 相比 Airflow/Dagster 更轻、更快开始
|
|
46
48
|
- 相比 multiprocessing/threading 更结构化,可直接表达 loop / complete graph 等复杂依赖模式
|
|
47
49
|
|
|
48
|
-
框架的基本单元为
|
|
50
|
+
框架的基本单元为 **任务节点**(统一继承自内部基类 `BaseTaskNode`),目前对外暴露三种具体节点实现,可独立运行,也可互相连接成图:
|
|
51
|
+
|
|
52
|
+
* **TaskExecutor** — 通用任务执行器
|
|
53
|
+
* **TaskSplitter** — 将一个输入拆分为多个子任务
|
|
54
|
+
* **TaskRouter** — 根据条件将任务路由到不同下游
|
|
55
|
+
|
|
56
|
+
三种节点都支持以下执行模式:
|
|
49
57
|
|
|
50
58
|
* **线性(serial)**
|
|
51
59
|
* **多线程(thread)**
|
|
52
60
|
* **协程(async)**
|
|
53
61
|
|
|
54
|
-
TaskExecutor
|
|
62
|
+
`TaskExecutor` 实现了对任务的结果缓存、任务去重、进度条显示、多执行模式比较等功能,单独使用也很好用。
|
|
55
63
|
|
|
56
|
-
|
|
64
|
+
节点之间通过 **TaskGraph** 互相连接,形成具有上游与下游依赖关系的任务图。下游节点会自动接收上游执行完成的结果作为输入,从而形成明确的数据流。TaskGraph 同时提供 `TaskChain` / `TaskCross` / `TaskGrid` / `TaskLoop` / `TaskWheel` / `TaskComplete` 等预置拓扑结构,方便快速搭建常见依赖模式。
|
|
57
65
|
|
|
58
|
-
|
|
66
|
+
在图级别上,通过 `graph_mode` 统一控制图中所有节点的运行方式:
|
|
59
67
|
|
|
60
|
-
|
|
68
|
+
* **线性(serial layout)**:当前节点执行完毕再启动下一节点(下游节点可提前接收任务但不会立即执行)。
|
|
69
|
+
* **多线程(thread layout)**:当前节点在主进程的独立线程中启动,适合 I/O 密集型任务和不可 pickle 的函数(如 lambda)。
|
|
70
|
+
* **协程(async layout)**:当前节点以协程方式启动,适合 I/O 密集型异步任务。
|
|
61
71
|
|
|
62
|
-
|
|
63
|
-
* **线程执行(thread layout)**:当前节点在主进程的独立线程中启动,适合 I/O 密集型任务和不可 pickle 的函数(如 lambda)。
|
|
72
|
+
`graph_mode` × `execution_mode` 共可组合出 9 种执行模式,覆盖绝大多数场景。
|
|
64
73
|
|
|
65
74
|
TaskGraph 能构建完整的 **有向图结构(Directed Graph)**,不仅支持传统的有向无环图(DAG),也能灵活表达 **树形(Tree)**、**环形(loop)** 乃至于 **完全图(Complete Graph)** 形式的任务依赖。
|
|
66
75
|
|
|
67
|
-
在执行与调度之外,CelestialFlow 进一步引入 **CelestialTree(简称: ctree
|
|
76
|
+
在执行与调度之外,CelestialFlow 进一步引入 **CelestialTree(简称: ctree)事件追踪系统**,为每一个任务及其衍生行为(成功、失败、重试、拆分、路由等)记录明确的因果关系。借助 ctree,可以从任意一个初始任务出发,完整还原其在 TaskGraph 中的传播路径与执行轨迹,使任务系统可以进行完整的**追溯、分析、解释**。自 3.2.4 起,`ctree` 默认使用本地超简化实现,不强制依赖 `celestialtree` 外部包;如需 gRPC 远程追踪能力,可再额外安装。
|
|
68
77
|
|
|
69
|
-
在此基础上,CelestialFlow
|
|
78
|
+
在此基础上,CelestialFlow 提供事件追踪、状态上报、持久化回放等功能。Web 可视化界面由独立项目 [celestialflow-web](https://github.com/Mr-xiaotian/celestialflow-web) 提供,二者通过 HTTP 协议协作。
|
|
70
79
|
|
|
71
80
|
## 项目结构(Project Structure)
|
|
72
81
|
|
|
@@ -77,10 +86,10 @@ flowchart LR
|
|
|
77
86
|
subgraph TG[TaskGraph]
|
|
78
87
|
direction LR
|
|
79
88
|
|
|
80
|
-
S1[
|
|
81
|
-
S2[
|
|
82
|
-
S3[
|
|
83
|
-
S4[
|
|
89
|
+
S1[TaskExecutor A]
|
|
90
|
+
S2[TaskSplitter B]
|
|
91
|
+
S3[TaskExecutor C]
|
|
92
|
+
S4[TaskRouter D]
|
|
84
93
|
|
|
85
94
|
S1 --> S2 --> S3 --> S1
|
|
86
95
|
S1 --> S4
|
|
@@ -93,12 +102,12 @@ flowchart LR
|
|
|
93
102
|
%% 统一美化格式
|
|
94
103
|
classDef blueNode fill:#ffffff,stroke:#6b93d6,rx:6px,ry:6px;
|
|
95
104
|
|
|
96
|
-
%% 美化
|
|
105
|
+
%% 美化 TaskNodes
|
|
97
106
|
class S1,S2,S3,S4 blueNode;
|
|
98
107
|
|
|
99
108
|
%% ===== Links =====
|
|
100
109
|
TG --> CFB[CelestialFlow Web]
|
|
101
|
-
CFB --> TG
|
|
110
|
+
CFB --> TG
|
|
102
111
|
|
|
103
112
|
style CFB fill:#ffeaf0,stroke:#d66b8c,stroke-width:2px,rx:10px,ry:10px
|
|
104
113
|
|
|
@@ -131,7 +140,7 @@ uv sync --group dev
|
|
|
131
140
|
一个简单的可运行代码:
|
|
132
141
|
|
|
133
142
|
```python
|
|
134
|
-
from celestialflow import
|
|
143
|
+
from celestialflow import TaskExecutor, TaskGraph
|
|
135
144
|
|
|
136
145
|
|
|
137
146
|
def add(x, y):
|
|
@@ -144,24 +153,26 @@ def square(x):
|
|
|
144
153
|
|
|
145
154
|
if __name__ == "__main__":
|
|
146
155
|
# 定义两个任务节点
|
|
147
|
-
|
|
156
|
+
executor_1 = TaskExecutor(
|
|
148
157
|
name="Adder",
|
|
149
158
|
func=add,
|
|
150
|
-
stage_mode="thread",
|
|
151
159
|
execution_mode="thread",
|
|
152
|
-
|
|
160
|
+
max_workers=4,
|
|
153
161
|
)
|
|
154
|
-
|
|
155
|
-
name="Squarer",
|
|
162
|
+
executor_2 = TaskExecutor(
|
|
163
|
+
name="Squarer",
|
|
164
|
+
func=square,
|
|
165
|
+
execution_mode="thread",
|
|
166
|
+
max_workers=4,
|
|
156
167
|
)
|
|
157
168
|
|
|
158
169
|
# 构建任务图结构
|
|
159
|
-
graph = TaskGraph(name="DemoGraph")
|
|
160
|
-
graph.
|
|
161
|
-
graph.connect([
|
|
170
|
+
graph = TaskGraph(name="DemoGraph", graph_mode="thread")
|
|
171
|
+
graph.set_nodes(nodes=[executor_1, executor_2])
|
|
172
|
+
graph.connect([executor_1], [executor_2])
|
|
162
173
|
|
|
163
174
|
# 初始化任务并启动
|
|
164
|
-
graph.
|
|
175
|
+
graph.run({"Adder": [(1, 2), (3, 4), (5, 6)]})
|
|
165
176
|
```
|
|
166
177
|
|
|
167
178
|
注意不要在.ipynb中运行。
|
|
@@ -172,12 +183,11 @@ if __name__ == "__main__":
|
|
|
172
183
|
|
|
173
184
|
若你想了解框架的整体结构与核心组件,下面的参考文档会对你有帮助:
|
|
174
185
|
|
|
175
|
-
- [
|
|
176
|
-
- [
|
|
186
|
+
- [BaseTaskNode.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/node/core_node.md)
|
|
187
|
+
- [TaskExecutor.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/node/core_nodes.md)
|
|
177
188
|
- [TaskGraph.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/graph/core_graph.md)
|
|
178
189
|
- [TaskMetrics.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/core_metrics.md)
|
|
179
190
|
- [TaskQueue.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/core_queue.md)
|
|
180
|
-
- [TaskStages.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/stage/core_stages.md)
|
|
181
191
|
- [TaskReport.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/observability/core_report.md)
|
|
182
192
|
- [TaskStructure.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/graph/core_structure.md)
|
|
183
193
|
- [BaseObserver.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/observability/core_observer.md)
|
|
@@ -192,21 +202,20 @@ flowchart TD
|
|
|
192
202
|
classDef structure fill:#fff6e6,stroke:#f59e0b,color:#78350f;
|
|
193
203
|
classDef execution fill:#f3e8ff,stroke:#a855f7,color:#581c87;
|
|
194
204
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
205
|
+
BTN[BaseTaskNode.md] --> TE[TaskExecutor.md] --> TG[TaskGraph.md]
|
|
206
|
+
TE --> OB[BaseObserver.md]
|
|
207
|
+
TE --> TME[TaskMetrics.md]
|
|
198
208
|
|
|
199
209
|
TG --> TQ[TaskQueue.md]
|
|
200
|
-
TG --> TN[TaskStages.md]
|
|
201
210
|
TG --> TR[TaskReport.md]
|
|
202
211
|
TG --> TSR[TaskStructure.md]
|
|
203
212
|
|
|
204
|
-
|
|
213
|
+
TG --> GW[Go Worker.md]
|
|
205
214
|
|
|
206
|
-
class
|
|
207
|
-
class
|
|
215
|
+
class BTN,TE,TG core;
|
|
216
|
+
class TME runtime;
|
|
208
217
|
class TSR structure;
|
|
209
|
-
class TQ,
|
|
218
|
+
class TQ,GW execution;
|
|
210
219
|
class TR execution;
|
|
211
220
|
```
|
|
212
221
|
|
|
@@ -215,7 +224,7 @@ flowchart TD
|
|
|
215
224
|
- [UtilHash.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/util_hash.md)
|
|
216
225
|
- [UtilTypes.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/util_types.md)
|
|
217
226
|
- [UtilErrors.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/util_errors.md)
|
|
218
|
-
- [
|
|
227
|
+
- [Lifecycle.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/persistence/core_lifecycle.md)
|
|
219
228
|
- [Log.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/persistence/core_log.md)
|
|
220
229
|
|
|
221
230
|
如果你更喜欢通过完整案例理解框架的运行方式,可以参考这篇利用 TaskGraph 从零开始构建项目的教程:
|
|
@@ -240,140 +249,129 @@ flowchart TD
|
|
|
240
249
|
|
|
241
250
|
## 环境要求(Requirements)
|
|
242
251
|
|
|
243
|
-
**CelestialFlow** 基于 Python 3.12
|
|
244
|
-
其中 `celestialtree` 不再属于默认运行时依赖,而是额外安装的可选组件。
|
|
252
|
+
**CelestialFlow** 基于 Python 3.12+,默认运行时仅依赖极简的核心组件。
|
|
245
253
|
|
|
246
254
|
| 依赖包 | 说明 |
|
|
247
255
|
| ----------------- | ---- |
|
|
248
256
|
| **Python ≥ 3.12** | 运行环境,建议使用 3.12 及以上版本 |
|
|
249
257
|
| **requests** | HTTP 客户端库,用于任务状态上报与远程调用 |
|
|
250
|
-
| **tqdm** | 可选组件,进度条显示,用于任务执行可视化 |
|
|
251
|
-
|
|
252
|
-
- 如需运行 `demo/demo_redis.py` 或 Go Worker 示例,请额外安装 `redis` 并准备 Redis 服务;这部分不属于默认运行时依赖。
|
|
253
258
|
|
|
254
|
-
-
|
|
259
|
+
- `tqdm` 已不再是默认运行时依赖(自 3.2.7 起移除)。如需在 demo 中体验 `TaskProgress` 进度条,可自行 `uv pip install tqdm`。
|
|
260
|
+
- `celestialtree` 也**不再是必需依赖**(自 3.2.4 起):事件追踪默认使用本地超简化实现,可零外部依赖运行。如需 gRPC 远程追踪能力,请额外安装 `celestialtree`,或在源码仓库中执行 `uv sync --group dev`。
|
|
261
|
+
- 旧版 demo / bench 中的 Redis 节点已在 3.2.4 移除,本项目运行时不再依赖 Redis。
|
|
255
262
|
|
|
256
|
-
- 如需使用可视化的Web
|
|
263
|
+
- 如需使用可视化的 Web 服务,请前往独立项目 [celestialflow-web](https://github.com/Mr-xiaotian/celestialflow-web) 安装并运行 `celestialflow-web --host 0.0.0.0 --port 5000`。
|
|
257
264
|
|
|
258
265
|
## 文件结构(File Structure)
|
|
259
266
|
|
|
260
267
|
```
|
|
261
|
-
📁 CelestialFlow (
|
|
262
|
-
📁 bench (
|
|
268
|
+
📁 CelestialFlow (329MB 507KB 284B)
|
|
269
|
+
📁 bench (316KB 601B)
|
|
263
270
|
📁 [1项排除的目录] (194KB 222B)
|
|
264
271
|
🐍 bench_datastructures.py (6KB 690B)
|
|
265
272
|
🐍 bench_execution_mode.py (2KB 707B)
|
|
273
|
+
🐍 bench_funnel_vs_lock.py (21KB 888B)
|
|
266
274
|
🐍 bench_futures_memory.py (2KB 269B)
|
|
267
|
-
🐍 bench_gil_vs_nogil.py (
|
|
268
|
-
🐍 bench_graph_mode.py (
|
|
275
|
+
🐍 bench_gil_vs_nogil.py (9KB 983B)
|
|
276
|
+
🐍 bench_graph_mode.py (6KB 614B)
|
|
269
277
|
🐍 bench_hash.py (7KB 67B)
|
|
270
278
|
🐍 bench_hash_container.py (3KB 1009B)
|
|
271
|
-
🐍 bench_hash_memory.py (3KB
|
|
272
|
-
🐍 bench_http_grpc.py (2KB
|
|
279
|
+
🐍 bench_hash_memory.py (3KB 655B)
|
|
280
|
+
🐍 bench_http_grpc.py (2KB 536B)
|
|
273
281
|
🐍 bench_ipc_queue.py (7KB 104B)
|
|
274
282
|
🐍 bench_lock_overhead.py (9KB 421B)
|
|
275
283
|
🐍 bench_mpqueue_vs_shared_memory.py (13KB 127B)
|
|
276
|
-
🐍 bench_observer.py (
|
|
284
|
+
🐍 bench_observer.py (6KB 761B)
|
|
277
285
|
🐍 bench_persistence_spout.py (4KB 340B)
|
|
278
286
|
🐍 bench_queue.py (5KB 857B)
|
|
279
287
|
🐍 bench_requests.py (6KB 813B)
|
|
280
288
|
🐍 bench_tqdm.py (1KB 235B)
|
|
281
289
|
🐍 bench_utils.py (543B)
|
|
282
|
-
📁 demo (
|
|
283
|
-
📁 [
|
|
290
|
+
📁 demo (353KB 885B)
|
|
291
|
+
📁 [3项排除的目录] (302KB 399B)
|
|
284
292
|
🐍 demo_executor.py (1KB 495B)
|
|
285
293
|
🐍 demo_funnel.py (2KB 289B)
|
|
286
|
-
🐍 demo_graph.py (3KB
|
|
287
|
-
🐍 demo_network.py (3KB
|
|
288
|
-
🐍
|
|
289
|
-
🐍
|
|
290
|
-
🐍
|
|
291
|
-
🐍 demo_structure.py (
|
|
292
|
-
🐍 demo_utils.py (6KB
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
📁 en[已折叠] (568KB 991B)
|
|
301
|
-
📁 ja[已折叠] (642KB 383B)
|
|
302
|
-
📁 zh-CN[已折叠] (569KB 480B)
|
|
303
|
-
📁 experiments (2KB 1021B)
|
|
304
|
-
🐍 experiment_networkx.py (1KB 884B)
|
|
294
|
+
🐍 demo_graph.py (3KB 222B)
|
|
295
|
+
🐍 demo_network.py (3KB 756B)
|
|
296
|
+
🐍 demo_nodes.py (4KB 231B)
|
|
297
|
+
🐍 demo_observer.py (2KB 684B)
|
|
298
|
+
🐍 demo_redis.py (8KB 999B)
|
|
299
|
+
🐍 demo_structure.py (9KB 290B)
|
|
300
|
+
🐍 demo_utils.py (6KB 263B)
|
|
301
|
+
🐍 demo_web.py (9KB 353B)
|
|
302
|
+
📁 docs (2MB 52KB 639B)
|
|
303
|
+
📁 en[已折叠] (689KB 420B)
|
|
304
|
+
📁 ja[已折叠] (788KB 350B)
|
|
305
|
+
📁 zh-CN[已折叠] (622KB 893B)
|
|
306
|
+
📁 experiments (3KB 21B)
|
|
307
|
+
🐍 experiment_networkx.py (1KB 908B)
|
|
305
308
|
🐍 experiment_tqdm.py (1KB 137B)
|
|
306
309
|
📁 img (5MB 871KB 242B)
|
|
307
310
|
📷 file_structure.svg (4MB 918KB 1000B)
|
|
308
311
|
📷 logo(old).png (836KB 542B)
|
|
309
312
|
📷 logo.png (122KB 747B)
|
|
310
313
|
📷 scc_condensation.svg (17KB 1B)
|
|
311
|
-
📁 src (1MB
|
|
312
|
-
📁 celestialflow[已折叠]
|
|
313
|
-
📁
|
|
314
|
-
📁 tests (
|
|
315
|
-
📁 benchmark[已折叠] (
|
|
316
|
-
📁 funnel[已折叠] (96KB
|
|
317
|
-
📁 graph[已折叠] (
|
|
318
|
-
📁
|
|
319
|
-
📁
|
|
320
|
-
📁
|
|
321
|
-
📁
|
|
322
|
-
📁
|
|
323
|
-
📁 [1项排除的目录] (487KB 589B)
|
|
314
|
+
📁 src (1MB 829KB 441B)
|
|
315
|
+
📁 celestialflow[已折叠] (1MB 809KB 299B)
|
|
316
|
+
📁 [1项排除的目录] (20KB 142B)
|
|
317
|
+
📁 tests (3MB 653KB 168B)
|
|
318
|
+
📁 benchmark[已折叠] (45KB 270B)
|
|
319
|
+
📁 funnel[已折叠] (96KB 339B)
|
|
320
|
+
📁 graph[已折叠] (723KB 325B)
|
|
321
|
+
📁 node[已折叠] (461KB 925B)
|
|
322
|
+
📁 observability[已折叠] (221KB 746B)
|
|
323
|
+
📁 persistence[已折叠] (410KB 135B)
|
|
324
|
+
📁 runtime[已折叠] (1MB 253KB 849B)
|
|
325
|
+
📁 [1项排除的目录] (487KB 637B)
|
|
324
326
|
🐍 conftest.py (1KB 38B)
|
|
325
|
-
|
|
326
|
-
📁 [12项排除的目录] (573MB 949KB 913B)
|
|
327
|
+
📁 [13项排除的目录] (315MB 353KB 422B)
|
|
327
328
|
❓ .env (468B)
|
|
328
329
|
❓ .gitignore (1KB 315B)
|
|
329
|
-
📝 AGENTS.md (1KB
|
|
330
|
+
📝 AGENTS.md (1KB 576B)
|
|
330
331
|
❓ LICENSE (1KB 65B)
|
|
331
|
-
❓ Makefile (
|
|
332
|
+
❓ Makefile (149B)
|
|
332
333
|
⚙️ pyproject.toml (2KB 668B)
|
|
333
|
-
📝 README.md (
|
|
334
|
-
🔒 uv.lock (
|
|
334
|
+
📝 README.md (18KB 12B)
|
|
335
|
+
🔒 uv.lock (120KB 756B)
|
|
335
336
|
```
|
|
336
337
|
<p align="center">
|
|
337
|
-
<em>celestial-flow 3.
|
|
338
|
+
<em>celestial-flow 3.3.1</em>
|
|
338
339
|
</p>
|
|
339
340
|
|
|
340
341
|
(该视图由我的另一个项目[CelestialVault](https://github.com/Mr-xiaotian/CelestialVault)中inst_file.FileTree.print_tree()生成。转换为图片则借助[Carbon](https://carbon.now.sh)。)
|
|
341
342
|
|
|
342
343
|
## 版本日志(Version Log)
|
|
343
|
-
- 3.
|
|
344
|
+
- 3.3.1
|
|
344
345
|
- feat:
|
|
345
|
-
- [IMPORTANT]
|
|
346
|
-
-
|
|
347
|
-
-
|
|
348
|
-
|
|
349
|
-
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
-
|
|
360
|
-
|
|
361
|
-
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
- 删除 `graph` 中的 `out_edges` `in_edges`
|
|
369
|
-
- 现在由 `OrderGraph` 负责管理边关系
|
|
370
|
-
- 在 `tarjan_scc` 中使用 DFS 取代原先的递归逻辑
|
|
371
|
-
- 将 `util_graph` 改名为 `util_order_graph`
|
|
346
|
+
- [IMPORTANT] 在 `TaskMetrics` 中添加 `upstream_counter` / `downstream_counter` 细致化记录上下游传输数据量
|
|
347
|
+
- 在 `reporter` 中传送节点的 `upstream_counter` / `downstream_counter`
|
|
348
|
+
- 同步更新web端, 现在web端的结构图中可以显示精确的上下游传送任务数量
|
|
349
|
+
- [IMPORTANT] 删除 `duplocate` 机制
|
|
350
|
+
- 这是非常 非常艰难的选择, `duplocate` 机制极其古老, 但在我的仔细评估后我认为问题有三:
|
|
351
|
+
- 1. 传入的任务未必hash able, 现有的hash函数不确定性极大
|
|
352
|
+
- 2. 如果要确保任务可hash, 最好单独传一个处理任务的func, 但这会添加node的参数复杂度
|
|
353
|
+
- 3. 同时duplocate在单node时完全可以被任务输入前的筛选来取代, 而graph时的收益的则非常不明显
|
|
354
|
+
- 反复考虑认为还是遵从简洁的第一性原则
|
|
355
|
+
- 简化 `log.task_success` 输出, 不再显示 `execution_mode`
|
|
356
|
+
- 在 `lifecycle` 中添加 `retry_time` 字段
|
|
357
|
+
- 添加一个开箱即用的 `observer`, `ObserverPrint`
|
|
358
|
+
- 在graph环境下显示的 `total` 会有问题, 下个版本解决
|
|
359
|
+
- refactor:
|
|
360
|
+
- [IMPORTANT] 大幅简化 `reporter` 中的数据, 现在只传输原始状态数据, 具体的分析交给前端完成
|
|
361
|
+
- 移除 `log.split_trace` / `log.split_success` / `log.route_success`, 并统一使用 `log.task_in` 来表达下游任务成功
|
|
362
|
+
- 移除 `node.get_binding_counter` 和 `node.prev_binding`, 并添加 `node.connect_to` 统一负责绑定上下游节点
|
|
363
|
+
- 在 `TaskNode` 中添加新的泛型 `Y`, 表示向下游传输的任务类型
|
|
364
|
+
- 这是为了优化 `splitter` 和 `router`
|
|
365
|
+
- 节点的 `elapsed_time` 现在由 `dispatch` 来自行计算, 保证精准
|
|
366
|
+
- 话说我之前为什么要弄那么一套即麻烦又不准的算法?
|
|
367
|
+
- 在 `reporter` 中为 `status` 添加门控, 如果当前状态与上一次发送状态一致, 则不进行发送
|
|
368
|
+
- 至此 `reporter` 中所有的 `push_*` 都拥有门控, 避免无效的数据发送
|
|
372
369
|
- fix:
|
|
373
|
-
|
|
374
|
-
-
|
|
375
|
-
|
|
376
|
-
|
|
370
|
+
- chore:
|
|
371
|
+
- 添加 `bench_funnel_vs_lock`, 用来测试并发环境下, 使用funnel和使用locl记录数据的性能差
|
|
372
|
+
- 前者发送延迟低, 但内存占用高
|
|
373
|
+
- 
|
|
374
|
+
- 添加 `demo_web`, 用于进行复杂结构的web演示
|
|
377
375
|
|
|
378
376
|
更多过往日志可看:
|
|
379
377
|
|