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