isage-kernel 0.2.4.14__py2.py3-none-any.whl
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.
- isage_kernel-0.2.4.14.dist-info/METADATA +261 -0
- isage_kernel-0.2.4.14.dist-info/RECORD +181 -0
- isage_kernel-0.2.4.14.dist-info/WHEEL +6 -0
- isage_kernel-0.2.4.14.dist-info/top_level.txt +1 -0
- sage/kernel/__init__.py +118 -0
- sage/kernel/__init__.pyc +0 -0
- sage/kernel/__pycache__/__init__.cpython-311.pyc +0 -0
- sage/kernel/__pycache__/_version.cpython-311.pyc +0 -0
- sage/kernel/_version.py +6 -0
- sage/kernel/_version.pyc +0 -0
- sage/kernel/api/__init__.py +48 -0
- sage/kernel/api/__init__.pyc +0 -0
- sage/kernel/api/__pycache__/__init__.cpython-311.pyc +0 -0
- sage/kernel/api/__pycache__/base_environment.cpython-311.pyc +0 -0
- sage/kernel/api/__pycache__/flownet_environment.cpython-311.pyc +0 -0
- sage/kernel/api/__pycache__/local_environment.cpython-311.pyc +0 -0
- sage/kernel/api/base_environment.pyc +0 -0
- sage/kernel/api/connected_streams.pyc +0 -0
- sage/kernel/api/datastream.pyc +0 -0
- sage/kernel/api/flownet_environment.pyc +0 -0
- sage/kernel/api/function/__init__.py +11 -0
- sage/kernel/api/function/__init__.pyc +0 -0
- sage/kernel/api/function/simple_batch_function.pyc +0 -0
- sage/kernel/api/local_environment.pyc +0 -0
- sage/kernel/api/operator/__init__.py +12 -0
- sage/kernel/api/operator/__init__.pyc +0 -0
- sage/kernel/api/operator/base_operator.pyc +0 -0
- sage/kernel/api/operator/batch_operator.pyc +0 -0
- sage/kernel/api/operator/comap_operator.pyc +0 -0
- sage/kernel/api/operator/filter_operator.pyc +0 -0
- sage/kernel/api/operator/flatmap_operator.pyc +0 -0
- sage/kernel/api/operator/future_operator.pyc +0 -0
- sage/kernel/api/operator/join_operator.pyc +0 -0
- sage/kernel/api/operator/keyby_operator.pyc +0 -0
- sage/kernel/api/operator/map_operator.pyc +0 -0
- sage/kernel/api/operator/sink_operator.pyc +0 -0
- sage/kernel/api/operator/source_operator.pyc +0 -0
- sage/kernel/api/runtime_backend.pyc +0 -0
- sage/kernel/api/service/__init__.py +23 -0
- sage/kernel/api/service/__init__.pyc +0 -0
- sage/kernel/api/service/base_service.pyc +0 -0
- sage/kernel/api/service/pipeline_service/__init__.py +59 -0
- sage/kernel/api/service/pipeline_service/__init__.pyc +0 -0
- sage/kernel/api/service/pipeline_service/pipeline_bridge.pyc +0 -0
- sage/kernel/api/service/pipeline_service/pipeline_service.pyc +0 -0
- sage/kernel/api/service/pipeline_service/pipeline_sink.pyc +0 -0
- sage/kernel/api/service/pipeline_service/pipeline_source.pyc +0 -0
- sage/kernel/api/transformation/__init__.py +12 -0
- sage/kernel/api/transformation/__init__.pyc +0 -0
- sage/kernel/api/transformation/base_transformation.pyc +0 -0
- sage/kernel/api/transformation/batch_transformation.pyc +0 -0
- sage/kernel/api/transformation/comap_transformation.pyc +0 -0
- sage/kernel/api/transformation/filter_transformation.pyc +0 -0
- sage/kernel/api/transformation/flatmap_transformation.pyc +0 -0
- sage/kernel/api/transformation/future_transformation.pyc +0 -0
- sage/kernel/api/transformation/join_transformation.pyc +0 -0
- sage/kernel/api/transformation/keyby_transformation.pyc +0 -0
- sage/kernel/api/transformation/map_transformation.pyc +0 -0
- sage/kernel/api/transformation/sink_transformation.pyc +0 -0
- sage/kernel/api/transformation/source_transformation.pyc +0 -0
- sage/kernel/core/__init__.py +43 -0
- sage/kernel/core/__init__.pyc +0 -0
- sage/kernel/core/constants.pyc +0 -0
- sage/kernel/core/exceptions.pyc +0 -0
- sage/kernel/core/types.pyc +0 -0
- sage/kernel/facade/__init__.py +349 -0
- sage/kernel/facade/__init__.pyc +0 -0
- sage/kernel/facade/__pycache__/__init__.cpython-311.pyc +0 -0
- sage/kernel/fault_tolerance/__init__.py +90 -0
- sage/kernel/fault_tolerance/__init__.pyc +0 -0
- sage/kernel/fault_tolerance/base.pyc +0 -0
- sage/kernel/fault_tolerance/factory.pyc +0 -0
- sage/kernel/fault_tolerance/impl/__init__.py +30 -0
- sage/kernel/fault_tolerance/impl/__init__.pyc +0 -0
- sage/kernel/fault_tolerance/impl/checkpoint_impl.pyc +0 -0
- sage/kernel/fault_tolerance/impl/checkpoint_recovery.pyc +0 -0
- sage/kernel/fault_tolerance/impl/lifecycle_impl.pyc +0 -0
- sage/kernel/fault_tolerance/impl/restart_recovery.pyc +0 -0
- sage/kernel/fault_tolerance/impl/restart_strategy.pyc +0 -0
- sage/kernel/flow/__init__.py +74 -0
- sage/kernel/flow/__init__.pyc +0 -0
- sage/kernel/flow/__pycache__/__init__.cpython-311.pyc +0 -0
- sage/kernel/flow/__pycache__/declaration.cpython-311.pyc +0 -0
- sage/kernel/flow/__pycache__/decorator.cpython-311.pyc +0 -0
- sage/kernel/flow/__pycache__/exception_handler.cpython-311.pyc +0 -0
- sage/kernel/flow/__pycache__/pipeline_compiler.cpython-311.pyc +0 -0
- sage/kernel/flow/actor_wrappers/__init__.py +155 -0
- sage/kernel/flow/actor_wrappers/__init__.pyc +0 -0
- sage/kernel/flow/declaration.pyc +0 -0
- sage/kernel/flow/decorator.pyc +0 -0
- sage/kernel/flow/exception_handler.pyc +0 -0
- sage/kernel/flow/pipeline_compiler.pyc +0 -0
- sage/kernel/runtime/__init__.py +46 -0
- sage/kernel/runtime/__init__.pyc +0 -0
- sage/kernel/runtime/__pycache__/__init__.cpython-311.pyc +0 -0
- sage/kernel/runtime/__pycache__/jobmanager_client.cpython-311.pyc +0 -0
- sage/kernel/runtime/communication/__init__.py +12 -0
- sage/kernel/runtime/communication/__init__.pyc +0 -0
- sage/kernel/runtime/communication/__pycache__/__init__.cpython-311.pyc +0 -0
- sage/kernel/runtime/communication/packet.pyc +0 -0
- sage/kernel/runtime/communication/router/__init__.py +12 -0
- sage/kernel/runtime/communication/router/__init__.pyc +0 -0
- sage/kernel/runtime/communication/router/connection.pyc +0 -0
- sage/kernel/runtime/communication/router/router.pyc +0 -0
- sage/kernel/runtime/communication/rpc/__init__.py +12 -0
- sage/kernel/runtime/communication/rpc/__init__.pyc +0 -0
- sage/kernel/runtime/communication/rpc/__pycache__/__init__.cpython-311.pyc +0 -0
- sage/kernel/runtime/communication/rpc/__pycache__/rpc_queue.cpython-311.pyc +0 -0
- sage/kernel/runtime/communication/rpc/rpc_queue.pyc +0 -0
- sage/kernel/runtime/context/__init__.py +12 -0
- sage/kernel/runtime/context/__init__.pyc +0 -0
- sage/kernel/runtime/context/__pycache__/__init__.cpython-311.pyc +0 -0
- sage/kernel/runtime/context/__pycache__/context_injection.cpython-311.pyc +0 -0
- sage/kernel/runtime/context/base_context.pyc +0 -0
- sage/kernel/runtime/context/context_injection.pyc +0 -0
- sage/kernel/runtime/context/service_context.pyc +0 -0
- sage/kernel/runtime/context/task_context.pyc +0 -0
- sage/kernel/runtime/dispatcher.pyc +0 -0
- sage/kernel/runtime/execution_utils/__init__.py +12 -0
- sage/kernel/runtime/execution_utils/__init__.pyc +0 -0
- sage/kernel/runtime/execution_utils/name_server.pyc +0 -0
- sage/kernel/runtime/factory/__init__.py +12 -0
- sage/kernel/runtime/factory/__init__.pyc +0 -0
- sage/kernel/runtime/factory/__pycache__/__init__.cpython-311.pyc +0 -0
- sage/kernel/runtime/factory/__pycache__/service_factory.cpython-311.pyc +0 -0
- sage/kernel/runtime/factory/function_factory.pyc +0 -0
- sage/kernel/runtime/factory/operator_factory.pyc +0 -0
- sage/kernel/runtime/factory/service_factory.pyc +0 -0
- sage/kernel/runtime/factory/service_task_factory.pyc +0 -0
- sage/kernel/runtime/factory/task_factory.pyc +0 -0
- sage/kernel/runtime/graph/__init__.py +12 -0
- sage/kernel/runtime/graph/__init__.pyc +0 -0
- sage/kernel/runtime/graph/execution_graph.pyc +0 -0
- sage/kernel/runtime/graph/graph_edge.pyc +0 -0
- sage/kernel/runtime/graph/graph_node.pyc +0 -0
- sage/kernel/runtime/graph/service_node.pyc +0 -0
- sage/kernel/runtime/heartbeat_monitor.pyc +0 -0
- sage/kernel/runtime/job_info.pyc +0 -0
- sage/kernel/runtime/job_manager.pyc +0 -0
- sage/kernel/runtime/job_manager_server.pyc +0 -0
- sage/kernel/runtime/jobmanager_client.pyc +0 -0
- sage/kernel/runtime/monitoring/__init__.py +43 -0
- sage/kernel/runtime/monitoring/__init__.pyc +0 -0
- sage/kernel/runtime/monitoring/metrics.pyc +0 -0
- sage/kernel/runtime/monitoring/metrics_collector.pyc +0 -0
- sage/kernel/runtime/monitoring/metrics_reporter.pyc +0 -0
- sage/kernel/runtime/monitoring/resource_monitor.pyc +0 -0
- sage/kernel/runtime/proxy/__init__.py +5 -0
- sage/kernel/runtime/proxy/__init__.pyc +0 -0
- sage/kernel/runtime/proxy/proxy_manager.pyc +0 -0
- sage/kernel/runtime/py.typed +2 -0
- sage/kernel/runtime/service/__init__.py +12 -0
- sage/kernel/runtime/service/__init__.pyc +0 -0
- sage/kernel/runtime/service/base_service_task.pyc +0 -0
- sage/kernel/runtime/service/local_service_task.pyc +0 -0
- sage/kernel/runtime/service/service_caller.pyc +0 -0
- sage/kernel/runtime/task/__init__.py +12 -0
- sage/kernel/runtime/task/__init__.pyc +0 -0
- sage/kernel/runtime/task/base_task.pyc +0 -0
- sage/kernel/runtime/task/local_task.pyc +0 -0
- sage/kernel/scheduler/__init__.py +100 -0
- sage/kernel/scheduler/__init__.pyc +0 -0
- sage/kernel/scheduler/api.pyc +0 -0
- sage/kernel/scheduler/decision.pyc +0 -0
- sage/kernel/scheduler/impl/__init__.py +72 -0
- sage/kernel/scheduler/impl/__init__.pyc +0 -0
- sage/kernel/scheduler/impl/priority_scheduler.pyc +0 -0
- sage/kernel/scheduler/impl/random_scheduler.pyc +0 -0
- sage/kernel/scheduler/impl/resource_aware_scheduler.pyc +0 -0
- sage/kernel/scheduler/impl/round_robin_scheduler.pyc +0 -0
- sage/kernel/scheduler/impl/simple_scheduler.pyc +0 -0
- sage/kernel/scheduler/node_selector.pyc +0 -0
- sage/kernel/scheduler/placement.pyc +0 -0
- sage/kernel/scheduler/resource_provider.pyc +0 -0
- sage/kernel/scheduler/schema.pyc +0 -0
- sage/kernel/utils/__init__.py +53 -0
- sage/kernel/utils/__init__.pyc +0 -0
- sage/kernel/utils/helpers.pyc +0 -0
- sage/kernel/utils/persistence/__init__.py +12 -0
- sage/kernel/utils/persistence/__init__.pyc +0 -0
- sage/kernel/utils/persistence/state.pyc +0 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: isage-kernel
|
|
3
|
+
Version: 0.2.4.14
|
|
4
|
+
Summary: SAGE Kernel Module - Streaming-Augmented Generative Execution
|
|
5
|
+
Author-email: IntelliStream Team <shuhao_zhang@hust.edu.cn>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/intellistream/SAGE
|
|
8
|
+
Project-URL: Repository, https://github.com/intellistream/SAGE.git
|
|
9
|
+
Project-URL: Documentation, https://intellistream.github.io/SAGE-Pub/
|
|
10
|
+
Project-URL: Issues, https://github.com/intellistream/SAGE/issues
|
|
11
|
+
Keywords: data,reasoning,kernel,dataflow,llm,ml,framework,rag,intellistream,cli,ai,sage
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
17
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
18
|
+
Classifier: Topic :: System :: Distributed Computing
|
|
19
|
+
Requires-Python: ==3.11.*
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
Requires-Dist: torch<3.0.0,>=2.7.0
|
|
22
|
+
Requires-Dist: torchvision<1.0.0,>=0.22.0
|
|
23
|
+
Requires-Dist: fastapi<1.0.0,>=0.115.0
|
|
24
|
+
Requires-Dist: uvicorn[standard]<1.0.0,>=0.34.0
|
|
25
|
+
Requires-Dist: python_multipart<0.1.0,>=0.0.20
|
|
26
|
+
Requires-Dist: ray<3.0.0,>=2.48.0
|
|
27
|
+
Requires-Dist: grpcio<2.0.0,>=1.74.0
|
|
28
|
+
Requires-Dist: protobuf<7.0.0,>=6.32.0
|
|
29
|
+
Requires-Dist: msgpack<2.0.0,>=1.1.0
|
|
30
|
+
Requires-Dist: aioboto3<15.0.0,>=14.1.0
|
|
31
|
+
Requires-Dist: typer<1.0.0,>=0.15.0
|
|
32
|
+
Requires-Dist: rich<14.0.0,>=13.0.0
|
|
33
|
+
Requires-Dist: click<9.0.0,>=8.0.0
|
|
34
|
+
Requires-Dist: questionary<2.0.0,>=1.10.0
|
|
35
|
+
Requires-Dist: prompt_toolkit<4.0.0,>=3.0.50
|
|
36
|
+
Requires-Dist: tabulate<1.0.0,>=0.9.0
|
|
37
|
+
Requires-Dist: Cython<4.0.0,>=3.1.0
|
|
38
|
+
Requires-Dist: pybind11<4.0.0,>=3.0.0
|
|
39
|
+
Provides-Extra: dev
|
|
40
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
41
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
42
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
43
|
+
Requires-Dist: pytest-benchmark>=4.0.0; extra == "dev"
|
|
44
|
+
Requires-Dist: ruff==0.14.6; extra == "dev"
|
|
45
|
+
Requires-Dist: isage-pypi-publisher>=0.2.0; extra == "dev"
|
|
46
|
+
|
|
47
|
+
# SAGE Kernel
|
|
48
|
+
|
|
49
|
+
> 🚀 SAGE 框架的核心内核包 - 整合了核心框架和命令行工具
|
|
50
|
+
|
|
51
|
+
## 📋 Overview
|
|
52
|
+
|
|
53
|
+
**SAGE Kernel** 是 SAGE 框架的核心包,整合了原来的 `sage-kernel` 和 `sage-cli` 两个包的功能,提供数据流处理引擎、任务管理、运行时系统和命令行工具。
|
|
54
|
+
|
|
55
|
+
## 🧭 Governance / 团队协作制度
|
|
56
|
+
|
|
57
|
+
- `docs/governance/TEAM.md`
|
|
58
|
+
- `docs/governance/MAINTAINERS.md`
|
|
59
|
+
- `docs/governance/DEVELOPER_GUIDE.md`
|
|
60
|
+
- `docs/governance/PR_CHECKLIST.md`
|
|
61
|
+
- `docs/governance/SELF_HOSTED_RUNNER.md`
|
|
62
|
+
- `docs/governance/TODO.md`
|
|
63
|
+
|
|
64
|
+
## � Package Contents
|
|
65
|
+
|
|
66
|
+
**SAGE Kernel** 是 SAGE 框架的核心包,整合了原来的 `sage-kernel` 和 `sage-cli` 两个包的功能:
|
|
67
|
+
|
|
68
|
+
### 🏗️ 核心组件 (sage.core)
|
|
69
|
+
|
|
70
|
+
- **数据流处理框架**: 高性能的 dataflow-native 处理引擎
|
|
71
|
+
- **函数管理**: Function registry 和 operator 管理
|
|
72
|
+
- **配置系统**: 统一的配置管理和验证
|
|
73
|
+
|
|
74
|
+
### ⚙️ 任务管理 (sage.kernels.jobmanager)
|
|
75
|
+
|
|
76
|
+
- **任务调度**: 分布式任务执行和调度
|
|
77
|
+
- **执行图**: DAG 执行图构建和优化
|
|
78
|
+
- **客户端接口**: JobManager 客户端和服务端
|
|
79
|
+
|
|
80
|
+
### 🔧 运行时系统 (sage.kernels.runtime)
|
|
81
|
+
|
|
82
|
+
- **服务工厂**: 任务和服务的动态创建
|
|
83
|
+
- **通信队列**: 高性能的进程间通信
|
|
84
|
+
- **服务管理**: 微服务架构的服务生命周期管理
|
|
85
|
+
|
|
86
|
+
### 💻 命令行工具 (sage.cli)
|
|
87
|
+
|
|
88
|
+
- **集群管理**: 分布式集群的部署和管理
|
|
89
|
+
- **任务提交**: 命令行任务提交和监控
|
|
90
|
+
- **配置管理**: 交互式配置设置和验证
|
|
91
|
+
- **扩展管理**: 插件和扩展的安装管理
|
|
92
|
+
|
|
93
|
+
## 🚀 Installation
|
|
94
|
+
|
|
95
|
+
### From Source
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# 从源码安装
|
|
99
|
+
pip install -e packages/sage-kernel
|
|
100
|
+
|
|
101
|
+
# 或者从 PyPI 安装(发布后)
|
|
102
|
+
pip install intellistream-sage-kernel
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## 📖 Quick Start
|
|
106
|
+
|
|
107
|
+
### Using Core API
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
from sage.core import Function, Config
|
|
111
|
+
from sage.kernels.jobmanager import JobManager
|
|
112
|
+
from sage.kernels.runtime import ServiceTaskFactory
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
# 创建并使用函数
|
|
116
|
+
@Function
|
|
117
|
+
def my_processor(data):
|
|
118
|
+
return data * 2
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
# 使用 JobManager
|
|
122
|
+
job_manager = JobManager()
|
|
123
|
+
job = job_manager.submit_job(my_processor, data=[1, 2, 3])
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### 使用命令行工具
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# 启动 SAGE 集群
|
|
130
|
+
sage cluster start
|
|
131
|
+
|
|
132
|
+
# 提交任务
|
|
133
|
+
sage job submit my_job.py
|
|
134
|
+
|
|
135
|
+
# 管理配置
|
|
136
|
+
sage config set utils.provider openai
|
|
137
|
+
sage config show
|
|
138
|
+
|
|
139
|
+
# 查看帮助
|
|
140
|
+
sage --help
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## 🏗️ 架构设计
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
sage-kernel/
|
|
147
|
+
├── src/sage/
|
|
148
|
+
│ ├── core/ # 核心框架
|
|
149
|
+
│ ├── jobmanager/ # 任务管理
|
|
150
|
+
│ ├── runtime/ # 运行时系统
|
|
151
|
+
│ └── cli/ # 命令行工具
|
|
152
|
+
├── tests/ # 标准化测试结构
|
|
153
|
+
│ ├── core/
|
|
154
|
+
│ ├── jobmanager/
|
|
155
|
+
│ ├── runtime/
|
|
156
|
+
│ └── cli/
|
|
157
|
+
└── pyproject.toml # 统一配置
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## 🧪 测试
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
# 运行所有测试
|
|
164
|
+
pytest
|
|
165
|
+
|
|
166
|
+
# 运行特定模块测试
|
|
167
|
+
pytest tests/core/
|
|
168
|
+
pytest tests/cli/
|
|
169
|
+
|
|
170
|
+
# 运行覆盖率测试
|
|
171
|
+
pytest --cov=sage --cov-report=html
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## 🔧 开发环境
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
# 安装开发依赖
|
|
178
|
+
pip install -e "packages/sage-kernel[dev]"
|
|
179
|
+
|
|
180
|
+
# 安装增强CLI功能
|
|
181
|
+
pip install -e "packages/sage-kernel[enhanced]"
|
|
182
|
+
|
|
183
|
+
# 代码格式化
|
|
184
|
+
black src/ tests/
|
|
185
|
+
ruff check src/ tests/
|
|
186
|
+
|
|
187
|
+
# 类型检查
|
|
188
|
+
mypy src/sage
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## 📚 依赖关系
|
|
192
|
+
|
|
193
|
+
### 内部依赖
|
|
194
|
+
|
|
195
|
+
- `sage-utils`: 基础工具包
|
|
196
|
+
|
|
197
|
+
### 外部核心依赖
|
|
198
|
+
|
|
199
|
+
- **ML/AI**: torch, transformers, sentence-transformers, faiss-cpu
|
|
200
|
+
- **Web/API**: fastapi, uvicorn, aiohttp
|
|
201
|
+
- **数据处理**: numpy, pandas, scipy, scikit-learn
|
|
202
|
+
- **CLI**: typer, rich, click, questionary
|
|
203
|
+
- **配置**: pydantic, PyYAML, python-dotenv
|
|
204
|
+
|
|
205
|
+
## 🎯 设计理念
|
|
206
|
+
|
|
207
|
+
### 单一内核原则
|
|
208
|
+
|
|
209
|
+
将核心框架和 CLI 工具合并到一个包中,遵循以下原则:
|
|
210
|
+
|
|
211
|
+
1. **统一入口**: 所有核心功能通过一个包提供
|
|
212
|
+
1. **逻辑分离**: 不同组件保持清晰的模块边界
|
|
213
|
+
1. **依赖优化**: 避免循环依赖,清晰的依赖层次
|
|
214
|
+
1. **测试标准化**: 所有测试文件位于标准 `tests/` 目录
|
|
215
|
+
|
|
216
|
+
### CLI 集成策略
|
|
217
|
+
|
|
218
|
+
- CLI 功能完全集成到内核包中
|
|
219
|
+
- 通过入口点 `sage` 和 `sage-kernel` 提供命令行访问
|
|
220
|
+
- CLI 模块不污染核心 API 的导入
|
|
221
|
+
|
|
222
|
+
## 🔄 从旧包迁移
|
|
223
|
+
|
|
224
|
+
如果你之前使用 `sage-kernel` 或 `sage-cli`:
|
|
225
|
+
|
|
226
|
+
```python
|
|
227
|
+
# 旧代码
|
|
228
|
+
from sage_core import Function
|
|
229
|
+
from sage_cli.main import app
|
|
230
|
+
|
|
231
|
+
# 新代码
|
|
232
|
+
from sage.core import Function
|
|
233
|
+
|
|
234
|
+
# CLI 通过命令行使用: sage command
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
## 📋 TODO
|
|
238
|
+
|
|
239
|
+
- [ ] 完善模块间的导入优化
|
|
240
|
+
- [ ] 添加性能基准测试
|
|
241
|
+
- [ ] 完善CLI命令的集成测试
|
|
242
|
+
- [ ] 优化依赖版本冲突问题
|
|
243
|
+
- [ ] 添加更多示例代码
|
|
244
|
+
|
|
245
|
+
## 🤝 贡献
|
|
246
|
+
|
|
247
|
+
请查看项目根目录的贡献指南。对于 kernel 相关的开发:
|
|
248
|
+
|
|
249
|
+
1. 确保测试位于 `tests/` 目录
|
|
250
|
+
1. 保持模块间的清晰边界
|
|
251
|
+
1. CLI 功能通过入口点而非直接导入使用
|
|
252
|
+
1. 遵循现有的代码风格和架构模式
|
|
253
|
+
|
|
254
|
+
______________________________________________________________________
|
|
255
|
+
|
|
256
|
+
🔗 **相关包**: [sage-utils](../sage-utils/) | [sage-extensions](../sage-extensions/) |
|
|
257
|
+
[sage-lib](../sage-lib/)
|
|
258
|
+
|
|
259
|
+
## 📄 License
|
|
260
|
+
|
|
261
|
+
MIT License - see [LICENSE](../../LICENSE) for details.
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
sage/kernel/__init__.py,sha256=OuldOZLdO_3N9wQOXBbqFaQnUBBMD6FKrIVLJ2ekXHM,3905
|
|
2
|
+
sage/kernel/__init__.pyc,sha256=XYdjPWBV9aXOLRYQn_JnudzI57MYA4ZxWvL2FKD2bbc,2989
|
|
3
|
+
sage/kernel/_version.py,sha256=tU9kyEzeqiBbwZ9wAPT0YCI2-vzdDgBI-S5h5g5m6d4,174
|
|
4
|
+
sage/kernel/_version.pyc,sha256=55gSMOE3xmEg1STUJltLehyMksEE-RF8oXNRQyAEgUI,309
|
|
5
|
+
sage/kernel/__pycache__/__init__.cpython-311.pyc,sha256=oHjWkvpPNnhB0CxMHIt62P9gaPgu3DAmUDOr_52b9_I,3032
|
|
6
|
+
sage/kernel/__pycache__/_version.cpython-311.pyc,sha256=rCocgo4tZTx5oTMfH3ZU1MnGeWp2pRafd3cE5GMXOJs,352
|
|
7
|
+
sage/kernel/api/__init__.py,sha256=vURgF36fGjci9iCjUo-ldfl5Qf_Cn6eU84edCMaqfSM,1291
|
|
8
|
+
sage/kernel/api/__init__.pyc,sha256=sjMmiFj0n5QQ5KzKMiHzAUcxkgJGxTHaCLRWuhjRV8Y,1496
|
|
9
|
+
sage/kernel/api/base_environment.pyc,sha256=Ml5y9AWFECn2N7cfLHmtnpZNdLqQ5Zyv2Wqmio_1XJ4,21969
|
|
10
|
+
sage/kernel/api/connected_streams.pyc,sha256=NCSGhlOoDXog5TWM5JNdvi_kSdD6IAfaLqAATgqiShI,22725
|
|
11
|
+
sage/kernel/api/datastream.pyc,sha256=46AmCBaTJC9IeXXaZDqzcfGPCqE760M8Mi8IqxkYdxc,11798
|
|
12
|
+
sage/kernel/api/flownet_environment.pyc,sha256=10TM28oGn3i1z1Y9DwYRmkkRSAPYvvwfjMiwb751dQ0,9425
|
|
13
|
+
sage/kernel/api/local_environment.pyc,sha256=naCdf4G1rmvRkGirW0d1FsXZmJkEPCe8JomzmFexA9o,10086
|
|
14
|
+
sage/kernel/api/runtime_backend.pyc,sha256=LNOnjUNUxuB70zLdxFc-eWACS51kuXEDHVCT745M1b0,1074
|
|
15
|
+
sage/kernel/api/__pycache__/__init__.cpython-311.pyc,sha256=kHnuF6JFa2FWq1zgEK6wmuq93Wu4M7vDHbk8fWLFGLI,1539
|
|
16
|
+
sage/kernel/api/__pycache__/base_environment.cpython-311.pyc,sha256=fB4EL__5chS6Zm8RZV6T-uLCJ-h90hnVCsN3T3Ht15o,22012
|
|
17
|
+
sage/kernel/api/__pycache__/flownet_environment.cpython-311.pyc,sha256=nM-0XY3tXRj_G8Osom_cf15NSNhUZLTghvw-UJu3wY4,9468
|
|
18
|
+
sage/kernel/api/__pycache__/local_environment.cpython-311.pyc,sha256=_Qi1-X322ljEXolkv0yTYU31s9YKu4FGWXnnwp7OPKo,10129
|
|
19
|
+
sage/kernel/api/function/__init__.py,sha256=W9mrbGShaLRAJLbgG0Yvz-5C917BgF7tGNf-RQumpEE,283
|
|
20
|
+
sage/kernel/api/function/__init__.pyc,sha256=DlZdK6SVBuriopRygobU0L7rCD1YGcWkoH2OFkg8nOo,437
|
|
21
|
+
sage/kernel/api/function/simple_batch_function.pyc,sha256=0SIn89F9Xk8NXTXs6rCv1oWFrfr_QEAQXFFufSMWhB4,5253
|
|
22
|
+
sage/kernel/api/operator/__init__.py,sha256=5eONd1i6gb4A7NiG6DC4ZJReqQtvkA3hd3c9BI12Nyk,342
|
|
23
|
+
sage/kernel/api/operator/__init__.pyc,sha256=R1xRY-wzq6Wxe3VKOzM1eMgna__7Brqj0vjAlAFOMvg,511
|
|
24
|
+
sage/kernel/api/operator/base_operator.pyc,sha256=Us1MwjPBeeSwoOmWMt2E5lI_HHHcz8ta-uSCfOaP5OQ,10317
|
|
25
|
+
sage/kernel/api/operator/batch_operator.pyc,sha256=Y1CNW0QqrHoiI8bj1-gHRv8xR-dUwIEflrxqm5JEZjk,3065
|
|
26
|
+
sage/kernel/api/operator/comap_operator.pyc,sha256=-coaC9VaZb0YYLEM2rZ92CUlND5k97HAVk7569WBZ0Y,10020
|
|
27
|
+
sage/kernel/api/operator/filter_operator.pyc,sha256=5VMBRwOb25VhiQh_MIseKLPiHsu5AIBlRpW7cF3TXSo,2980
|
|
28
|
+
sage/kernel/api/operator/flatmap_operator.pyc,sha256=20W7oYlF3JL2JLiCS5-kXqTpMJaLYis1Q508ichx6Wo,6324
|
|
29
|
+
sage/kernel/api/operator/future_operator.pyc,sha256=gs0uGy6A8_d8VvfxoeEfmVDZ968NJ1qxY1haX_apNEY,2164
|
|
30
|
+
sage/kernel/api/operator/join_operator.pyc,sha256=P_JcJg1bsVUJAnneH8Lph4698a25CghpRm4F0XAgrg4,15665
|
|
31
|
+
sage/kernel/api/operator/keyby_operator.pyc,sha256=JCsDaYDjHFowpzxxXyNeo5vKYZ4GueboHBJln1H_qb8,3599
|
|
32
|
+
sage/kernel/api/operator/map_operator.pyc,sha256=Kq2_Qtr-0EHRG3sgx-GE3R4B8gSDdJB-stXg59-zsKk,6985
|
|
33
|
+
sage/kernel/api/operator/sink_operator.pyc,sha256=4ujghJot3xEh_7geZVA5aTbE3IhBcZP9GMlrTHo_tSc,3648
|
|
34
|
+
sage/kernel/api/operator/source_operator.pyc,sha256=W-ZpEkvZoZHzca6rDwKLNrNcj6SEQVOSj8QF4WE4QWY,4919
|
|
35
|
+
sage/kernel/api/service/__init__.py,sha256=uvYL0fhDRRN9hAghJj5k0sxdbqOTqtOYs4LZLMpAI8E,430
|
|
36
|
+
sage/kernel/api/service/__init__.pyc,sha256=_6sjFzwS3NNpj3XfFHfHkEFHzJkNS0r6xUNTd0_-wkk,612
|
|
37
|
+
sage/kernel/api/service/base_service.pyc,sha256=Z2Dp83R83bOIzdRHhWoQdQxt6KCaUe1WXvclZw5-Rlo,4836
|
|
38
|
+
sage/kernel/api/service/pipeline_service/__init__.py,sha256=NlZ0Zk0BVHu_WDLRKWe9pLruVtGE0dH0o1_15pnWUXI,1768
|
|
39
|
+
sage/kernel/api/service/pipeline_service/__init__.pyc,sha256=DbIi_zElbHKCseDjHXn_PRjr4_OjewSUWKnM1dHEg04,1987
|
|
40
|
+
sage/kernel/api/service/pipeline_service/pipeline_bridge.pyc,sha256=U9J3gd5LLzxw_QwuLtfqu4RWw3ZnZDV0CbGp9DQayi4,5811
|
|
41
|
+
sage/kernel/api/service/pipeline_service/pipeline_service.pyc,sha256=16Zo4VDqPsH2IgbluUDDS-riMWWl27h8OvGybRSTxSE,5863
|
|
42
|
+
sage/kernel/api/service/pipeline_service/pipeline_sink.pyc,sha256=gPaYT46yjAmeerAEsrqpp6iKwIVXiYditgWsUG87CDI,2916
|
|
43
|
+
sage/kernel/api/service/pipeline_service/pipeline_source.pyc,sha256=pEKN55rIedXWTvKwpU_q8crIMggE1D9ifQLXAItpprQ,3386
|
|
44
|
+
sage/kernel/api/transformation/__init__.py,sha256=5eONd1i6gb4A7NiG6DC4ZJReqQtvkA3hd3c9BI12Nyk,342
|
|
45
|
+
sage/kernel/api/transformation/__init__.pyc,sha256=7VCABmj_mRx8jojQapjHgBaF1nIt_CQXMcMpWJRvkMU,517
|
|
46
|
+
sage/kernel/api/transformation/base_transformation.pyc,sha256=kKZgglyx4mx77sjo5M-7OFDAZJvOnHlb3Lqwtf96ops,6122
|
|
47
|
+
sage/kernel/api/transformation/batch_transformation.pyc,sha256=QpzupTMA9i34repQMOtyxKd6oI27VeIscbaVeq_KYKM,2577
|
|
48
|
+
sage/kernel/api/transformation/comap_transformation.pyc,sha256=x7Atv3dx7o4Rg0uXUfegE-I49_oyXIlfLuZqrTKSBpk,5192
|
|
49
|
+
sage/kernel/api/transformation/filter_transformation.pyc,sha256=FLvbBIUVN2aWx3l6n7kAQQHQuTJB09W2fpZPo7UNctE,1437
|
|
50
|
+
sage/kernel/api/transformation/flatmap_transformation.pyc,sha256=JKHwpmeqFlsT7GvBl-fbkR6PS3EYlM3pglAwGo4DAZk,1457
|
|
51
|
+
sage/kernel/api/transformation/future_transformation.pyc,sha256=YKMrGUbiJnWQMpZyDiNvkH8tiJBE5zoFdocxaME7jQo,5287
|
|
52
|
+
sage/kernel/api/transformation/join_transformation.pyc,sha256=eAnaLKVlfHUU2O2GnfNWBEArw47aUSmPG9LBMZyGUPM,12568
|
|
53
|
+
sage/kernel/api/transformation/keyby_transformation.pyc,sha256=qvjXqSJvmkEWnElEdar7lReLDXFqVMLKLHM_33kCFT8,2336
|
|
54
|
+
sage/kernel/api/transformation/map_transformation.pyc,sha256=6PmMbN26Z19PixRWbf3vJgSOEB_O8CKYX_uu22PkaWY,1431
|
|
55
|
+
sage/kernel/api/transformation/sink_transformation.pyc,sha256=8peKG2V-obaq3NnXdmKNY_XK9_RVtD8DIR3onnXKaYk,1738
|
|
56
|
+
sage/kernel/api/transformation/source_transformation.pyc,sha256=btvQnPsMG5WVlfk9j4RpW9c2IzV4e-OtACuUnKx1ef8,1953
|
|
57
|
+
sage/kernel/core/__init__.py,sha256=ekpqaT-Rku56nJ98cihdZng12e6A_cLHOlmwtI_eBWo,1038
|
|
58
|
+
sage/kernel/core/__init__.pyc,sha256=zXCJ5nY2LPnjLMJ6uVQ9U26UB6ZEf1YWyhJ81WI-TDQ,1201
|
|
59
|
+
sage/kernel/core/constants.pyc,sha256=lM43ClMbAKXL96zzMHTqWfCCyzXxfhTr0ExG2qQjz_Y,971
|
|
60
|
+
sage/kernel/core/exceptions.pyc,sha256=jiv6o0ocmSdxIzKmYwLfNsPm10iHrRIr_dAhzU-JSDU,2405
|
|
61
|
+
sage/kernel/core/types.pyc,sha256=cegyclkAD_wF9qNwsln_Cehk6mrAz-h6YCmHI0gAqMw,1772
|
|
62
|
+
sage/kernel/facade/__init__.py,sha256=eBlojkRsmzM7oOSJVmXuhas2DVCIH3GLSelTomBSpfo,13188
|
|
63
|
+
sage/kernel/facade/__init__.pyc,sha256=owevXqwykTkk3mBqLiZ_Tejac7d6oePlhEC0yrL5cuY,13765
|
|
64
|
+
sage/kernel/facade/__pycache__/__init__.cpython-311.pyc,sha256=WFpxog3_Ft1_fjj4BYRNXbr1f9HiDezI8Cbj3ObM4wA,13808
|
|
65
|
+
sage/kernel/fault_tolerance/__init__.py,sha256=8wdHxFpL98MYTJTZExZ_DxzVfMm3QoQhFD2oOTmKZxQ,2257
|
|
66
|
+
sage/kernel/fault_tolerance/__init__.pyc,sha256=23gnhEq2O7l4FvOMd6_CpqEqYYpNJ13_Q68JvJ0IJmU,2293
|
|
67
|
+
sage/kernel/fault_tolerance/base.pyc,sha256=_j0leUJoiVBLBP7tTiIlh-WI5OFBA-z97dnWH9tT2Ek,3244
|
|
68
|
+
sage/kernel/fault_tolerance/factory.pyc,sha256=JQwk3T1YdQtsfi_goGrEFjp-S0rArmqBuHc0lI_vIFs,5008
|
|
69
|
+
sage/kernel/fault_tolerance/impl/__init__.py,sha256=gFYj7GVSAapF0QN4IJ3D2ycFqPi3wmshesFGgIPcXLA,922
|
|
70
|
+
sage/kernel/fault_tolerance/impl/__init__.pyc,sha256=Xd5FLsAu5ZUqtHqgTf8Y-W2JvEIfHLwv7sptSR457ss,1026
|
|
71
|
+
sage/kernel/fault_tolerance/impl/checkpoint_impl.pyc,sha256=GPQvXZG9YVsP8iEZnsGiJ83F4-qSG8uNk2qHBK-4Zjg,8961
|
|
72
|
+
sage/kernel/fault_tolerance/impl/checkpoint_recovery.pyc,sha256=X3ZyNB6CePfSBdpwdbsn2gGx6s5sz0wS4kaGIuD6ckQ,10470
|
|
73
|
+
sage/kernel/fault_tolerance/impl/lifecycle_impl.pyc,sha256=XDYforsQNycCzzpM7F0IKwUD76ZICdrmoM-DsbPmWHs,8560
|
|
74
|
+
sage/kernel/fault_tolerance/impl/restart_recovery.pyc,sha256=I88VdIJTFxywV9By1Ng3DWDsUt_LCOAh8WggkQMKSrY,7838
|
|
75
|
+
sage/kernel/fault_tolerance/impl/restart_strategy.pyc,sha256=9wgnwNqS1gpH20pL6dDf8a6vud-qhC0mHhrd99b8Xzc,7743
|
|
76
|
+
sage/kernel/flow/__init__.py,sha256=4aTGi4RMdfyXXcRvGcOMporp93AMVearMK5Ess3Md0g,2656
|
|
77
|
+
sage/kernel/flow/__init__.pyc,sha256=8rnYQmryr2L1bhLTFXQ0sjuSoGuZbOzsojy2lsAN3Gw,2483
|
|
78
|
+
sage/kernel/flow/declaration.pyc,sha256=2B304M0EIV9_tCJGaVxPN5q1eQhClTgdVSsSTaVZ9ds,18789
|
|
79
|
+
sage/kernel/flow/decorator.pyc,sha256=j7481__YrTJJW2iGsNb6B3rR_-QRSuGm29bU2uRaTl4,4662
|
|
80
|
+
sage/kernel/flow/exception_handler.pyc,sha256=EcL4IGjYtuIsfwEc17YHurpMCY0Weyg4IwL7n1Dl7Qg,6806
|
|
81
|
+
sage/kernel/flow/pipeline_compiler.pyc,sha256=pDbJScphuzf_HqnV8BGe77iayID2tL2lX8je-ue60Y4,21180
|
|
82
|
+
sage/kernel/flow/__pycache__/__init__.cpython-311.pyc,sha256=DGbUHqEA8h-vP0f2EPbnTIFiujFXzHPForrBSjSXv4M,2526
|
|
83
|
+
sage/kernel/flow/__pycache__/declaration.cpython-311.pyc,sha256=8BeKN99fy_7kS6IcQQI0rwi2exE0LPlb1-bVKfGJ3R8,18832
|
|
84
|
+
sage/kernel/flow/__pycache__/decorator.cpython-311.pyc,sha256=G5Mbz2fToDU1h2tUBTQSNhbR54Kdd5Q0kl5t6IMhKxU,4705
|
|
85
|
+
sage/kernel/flow/__pycache__/exception_handler.cpython-311.pyc,sha256=NMf0jvorhXtsMzkYuZniWOXNPIbpP0Zoq7v4Img4xzk,6849
|
|
86
|
+
sage/kernel/flow/__pycache__/pipeline_compiler.cpython-311.pyc,sha256=BnP1N4i4l7beNOC4rmxqCLq9WL94_xA_ZAqpJVxWW5c,21223
|
|
87
|
+
sage/kernel/flow/actor_wrappers/__init__.py,sha256=f_QfCvSubPd9IzaTejaskp7VJ1llszLI07f94JXtem0,5534
|
|
88
|
+
sage/kernel/flow/actor_wrappers/__init__.pyc,sha256=JI9kbLN3yIkWocDN7cPkA2ehu3NI9tpSD1GIdEEj4X4,8343
|
|
89
|
+
sage/kernel/runtime/__init__.py,sha256=uLx8vb0SS984W7-W4P9qc--ovBuyuNzbaEfzd0CSRSc,1364
|
|
90
|
+
sage/kernel/runtime/__init__.pyc,sha256=DH45Hfs-biEonxqu21d8ME-z23Zj8wxHne4daGTFsrI,1513
|
|
91
|
+
sage/kernel/runtime/dispatcher.pyc,sha256=Brh27w--ah9QgMXVh2dhBRiagmNNQfF87B1CyApgWco,42595
|
|
92
|
+
sage/kernel/runtime/heartbeat_monitor.pyc,sha256=DergZWdEfUaSqFyZrUK09roCx4iPvUFkv3vcVsF7dro,19365
|
|
93
|
+
sage/kernel/runtime/job_info.pyc,sha256=o3meLA2dbC9kYU2TiGzsa8NSCWPojHUMAYmCfDfhzxk,6019
|
|
94
|
+
sage/kernel/runtime/job_manager.pyc,sha256=-eJrINiD-_LtSRpv4xSNhJAUwbMZ0Cxght71kQDBSLw,30269
|
|
95
|
+
sage/kernel/runtime/job_manager_server.pyc,sha256=SIl0HPW61xStG7-NVPvlLE8wg96S45lDrVe1d8jwmGo,20306
|
|
96
|
+
sage/kernel/runtime/jobmanager_client.pyc,sha256=D25pp2zKndLcpr6NPOEbjRDssLzPX4EKVbXxj4dQbVc,8197
|
|
97
|
+
sage/kernel/runtime/py.typed,sha256=Ccb64q4z_LK4-1GyHDs1RXfTKrhwNxuOMLAJGaLZAGU,104
|
|
98
|
+
sage/kernel/runtime/__pycache__/__init__.cpython-311.pyc,sha256=10a7o_zo9vB-gQnstgawCyiaPfXX_tDnthPDzH5BMU0,1556
|
|
99
|
+
sage/kernel/runtime/__pycache__/jobmanager_client.cpython-311.pyc,sha256=zBTKalJGMVAC8MEgPVM-v2NRR7C__sFdQGWJ-SNUXuU,8240
|
|
100
|
+
sage/kernel/runtime/communication/__init__.py,sha256=5eONd1i6gb4A7NiG6DC4ZJReqQtvkA3hd3c9BI12Nyk,342
|
|
101
|
+
sage/kernel/runtime/communication/__init__.pyc,sha256=qVltsta_7pvrglAbAQ_LQ47gxWB7fCH9viU0JATioe8,520
|
|
102
|
+
sage/kernel/runtime/communication/packet.pyc,sha256=R0wITD6f151yVJjZJdwmUfrYrFIi0mcOj2YFGH_fehU,5909
|
|
103
|
+
sage/kernel/runtime/communication/__pycache__/__init__.cpython-311.pyc,sha256=6HTBIq9l2u-545bZ_SoEkW2sylTzDk-phQ873ZZvTsk,563
|
|
104
|
+
sage/kernel/runtime/communication/router/__init__.py,sha256=5eONd1i6gb4A7NiG6DC4ZJReqQtvkA3hd3c9BI12Nyk,342
|
|
105
|
+
sage/kernel/runtime/communication/router/__init__.pyc,sha256=St46LnSGLynkAphtf_OGHVsdlx1D90pcYZYuC3fTjkY,527
|
|
106
|
+
sage/kernel/runtime/communication/router/connection.pyc,sha256=S8vNLUmVf_Y4z0yPE_PlFjIkZjPUBaeqR_J_SYGi4Kc,3277
|
|
107
|
+
sage/kernel/runtime/communication/router/router.pyc,sha256=pWzkSu_rwGnd0wa_3o4Ymph-Ey0bdz8Jrs7x8d3Rf-Y,12704
|
|
108
|
+
sage/kernel/runtime/communication/rpc/__init__.py,sha256=q4udlhf2GCzjpKhNiYkAtAt928jF3Xizgoxj1EKOhuE,248
|
|
109
|
+
sage/kernel/runtime/communication/rpc/__init__.pyc,sha256=QVNsQMc8VetMtpEa52pMK3lTjuF2SJiAW7xGDCSnnCI,450
|
|
110
|
+
sage/kernel/runtime/communication/rpc/rpc_queue.pyc,sha256=fM_pNIDhxQWGzhQiuCovVmD0aYUKXK-4ZK2wzEas90o,8396
|
|
111
|
+
sage/kernel/runtime/communication/rpc/__pycache__/__init__.cpython-311.pyc,sha256=o7OKjUR_yFbs-lNRNmsRDB_T5rMpNCzXbCQGqlcC9JI,493
|
|
112
|
+
sage/kernel/runtime/communication/rpc/__pycache__/rpc_queue.cpython-311.pyc,sha256=AJTfFxY6YZLwHa39qkgImTVZT4xMe6l3pq1fXo1nvTA,8439
|
|
113
|
+
sage/kernel/runtime/context/__init__.py,sha256=5eONd1i6gb4A7NiG6DC4ZJReqQtvkA3hd3c9BI12Nyk,342
|
|
114
|
+
sage/kernel/runtime/context/__init__.pyc,sha256=6uSi9ciVMnY2y_ikGiXfpFHgLas0iNgDgXGVBErZio8,514
|
|
115
|
+
sage/kernel/runtime/context/base_context.pyc,sha256=BeKM-WYHzafcU4uhd6INzG3NFnHW8sCDWtSj1MTKMa8,6137
|
|
116
|
+
sage/kernel/runtime/context/context_injection.pyc,sha256=sXS-oHiFRrPYmsQYRxEQ9Q0LpzZwRdCTIibYhmaojxs,4697
|
|
117
|
+
sage/kernel/runtime/context/service_context.pyc,sha256=81GcTVXeMWK1CSBE7DMDE6MEiB0qeqEYxaLB8rfNbKo,6453
|
|
118
|
+
sage/kernel/runtime/context/task_context.pyc,sha256=jK5PFvx_CgGsJw7dz68ntcfb7mDhOXCGVK4CAgGW1p0,24389
|
|
119
|
+
sage/kernel/runtime/context/__pycache__/__init__.cpython-311.pyc,sha256=cKFAyBkC7cPrclzC62P4jzry0ca3DBaTNu0YFFD4JTM,557
|
|
120
|
+
sage/kernel/runtime/context/__pycache__/context_injection.cpython-311.pyc,sha256=QeBP-MPWzMou70PGM3iORZvKFX256XkNojjTSaYxXCI,4740
|
|
121
|
+
sage/kernel/runtime/execution_utils/__init__.py,sha256=5eONd1i6gb4A7NiG6DC4ZJReqQtvkA3hd3c9BI12Nyk,342
|
|
122
|
+
sage/kernel/runtime/execution_utils/__init__.pyc,sha256=6E_Xjcm2BhzdfQYCGNck1n62uP38DIkN8sc680qfUDA,522
|
|
123
|
+
sage/kernel/runtime/execution_utils/name_server.pyc,sha256=kGT_0lCYVeXWobCy3YAYy00_pg-obyqTJcWtb1QUq18,4818
|
|
124
|
+
sage/kernel/runtime/factory/__init__.py,sha256=5eONd1i6gb4A7NiG6DC4ZJReqQtvkA3hd3c9BI12Nyk,342
|
|
125
|
+
sage/kernel/runtime/factory/__init__.pyc,sha256=wfR3bMpU_16rWl333dzG-VZ5RoWAweccjrWMK2LLEaM,514
|
|
126
|
+
sage/kernel/runtime/factory/function_factory.pyc,sha256=e-yJDMYz4pN2esZLVA2h8dt7RdXuM3AIMrMJ1Vvt1Pw,2507
|
|
127
|
+
sage/kernel/runtime/factory/operator_factory.pyc,sha256=3wCPb10hD20DGL1kM0vwnwPrP9PxGs4GUm4f3oonTnw,1620
|
|
128
|
+
sage/kernel/runtime/factory/service_factory.pyc,sha256=R1k4uxiT8zF5E5PNwevkGq2OwZprXyS-5jTGJxJqGYE,4383
|
|
129
|
+
sage/kernel/runtime/factory/service_task_factory.pyc,sha256=NHbM26A-6LbupsZ6VUVn_XbdqmQoQU97v2SdrO3ZP9A,2993
|
|
130
|
+
sage/kernel/runtime/factory/task_factory.pyc,sha256=q_1ELuZ4NdR9FFvD61ahB8bmhvinUZ6_AwN2B-pFGrE,2305
|
|
131
|
+
sage/kernel/runtime/factory/__pycache__/__init__.cpython-311.pyc,sha256=Q_aLUdHjMr8nnBNYnUglpx94gj3kUkrvQ1YKtHohwxw,557
|
|
132
|
+
sage/kernel/runtime/factory/__pycache__/service_factory.cpython-311.pyc,sha256=k9yzzDFFf2h0_Dhs1FGpM-bM64qj4jHyzQt5_sswWTI,4426
|
|
133
|
+
sage/kernel/runtime/graph/__init__.py,sha256=5eONd1i6gb4A7NiG6DC4ZJReqQtvkA3hd3c9BI12Nyk,342
|
|
134
|
+
sage/kernel/runtime/graph/__init__.pyc,sha256=7LtaeumzxSD-z6aBOzJ6K6-W-BJF68BBNnx0y5JN2rI,512
|
|
135
|
+
sage/kernel/runtime/graph/execution_graph.pyc,sha256=G2rhUC3LpscIfksOhm-ZPYsR9eibVa6T4MjXBeMuAz8,19845
|
|
136
|
+
sage/kernel/runtime/graph/graph_edge.pyc,sha256=O-TNyAheLdXzxkTqh7xuc8g2Qi-pC826cQ9jl5YhUL8,2349
|
|
137
|
+
sage/kernel/runtime/graph/graph_node.pyc,sha256=k_OQYzmDCOI3HG2V0yK0ssgV7g9aiYjLv93hkMDURsI,4960
|
|
138
|
+
sage/kernel/runtime/graph/service_node.pyc,sha256=KtW19Urq6pW_G0gxS0YY7ntIvYxJhV4LxkzfFwfV_xU,3781
|
|
139
|
+
sage/kernel/runtime/monitoring/__init__.py,sha256=HrO34K2yVMOQdclf8PNXq8RaIMIdUsr3vWnZHemjy5U,1151
|
|
140
|
+
sage/kernel/runtime/monitoring/__init__.pyc,sha256=WHlGgdxS1gatLSvtJwTpV2QqZCK5l1BjbcYafg-Rdz4,1227
|
|
141
|
+
sage/kernel/runtime/monitoring/metrics.pyc,sha256=zpttFDjrXOxC5BkhJC5Y20IRLD3R5u_NuTfVUUxQCjA,11086
|
|
142
|
+
sage/kernel/runtime/monitoring/metrics_collector.pyc,sha256=aXUi1SLyfsVsX0tsGQLZiEbBn8Q_A_cq78RfXhvHSOo,14790
|
|
143
|
+
sage/kernel/runtime/monitoring/metrics_reporter.pyc,sha256=YP13mLNqBAh5Wjh3-9pZVE65RyjPgxT4sv8vsnuDIMk,14394
|
|
144
|
+
sage/kernel/runtime/monitoring/resource_monitor.pyc,sha256=WOrfw4rGQjBAIdw2u3jpHmEyvoU3wLnA8J_QLUOCBIU,9877
|
|
145
|
+
sage/kernel/runtime/proxy/__init__.py,sha256=r3sLXvaHNhzW2vRz4FF_P1fsH_La_wzhPBSbCqtjaaM,117
|
|
146
|
+
sage/kernel/runtime/proxy/__init__.pyc,sha256=J9qzjSAvAHk18P1HS0jnJrgGgUtv98RFA6c9re0zPQ0,298
|
|
147
|
+
sage/kernel/runtime/proxy/proxy_manager.pyc,sha256=UlIepWMlkYJEqh-Ub8JTjhBaGmHlTnlI3UmCGeiajzI,6244
|
|
148
|
+
sage/kernel/runtime/service/__init__.py,sha256=5eONd1i6gb4A7NiG6DC4ZJReqQtvkA3hd3c9BI12Nyk,342
|
|
149
|
+
sage/kernel/runtime/service/__init__.pyc,sha256=hTV2lwNx4LfDA8yMiJFM4dNiVo3UU28cVMio4_5e0ww,514
|
|
150
|
+
sage/kernel/runtime/service/base_service_task.pyc,sha256=Rl7RKzCNnFDZJff0xubvjn1gtrr9EcWYfo7BXV1fBB4,45761
|
|
151
|
+
sage/kernel/runtime/service/local_service_task.pyc,sha256=h6zZxXLlllpX6YRB8dlASn8BmQhUNLHHdAQFCg9HZ2A,4143
|
|
152
|
+
sage/kernel/runtime/service/service_caller.pyc,sha256=jhE_52_Pvu2MAEhBSsHUg6RGbc75CqY3Rl6WwozERN4,25107
|
|
153
|
+
sage/kernel/runtime/task/__init__.py,sha256=5eONd1i6gb4A7NiG6DC4ZJReqQtvkA3hd3c9BI12Nyk,342
|
|
154
|
+
sage/kernel/runtime/task/__init__.pyc,sha256=M8rg7oX7qA9OnktOJkBnhEOLonR7FYXoIV0VTd7IoBQ,511
|
|
155
|
+
sage/kernel/runtime/task/base_task.pyc,sha256=_yQjmQpb4IjqbQchUjvpFJkFt8ml0IB0N_5mpszAdfY,34840
|
|
156
|
+
sage/kernel/runtime/task/local_task.pyc,sha256=tzMDAtpofkv4WoMt9LnZXFgOB5mEuweZc8y6xi3jDlk,1753
|
|
157
|
+
sage/kernel/scheduler/__init__.py,sha256=Ex7lrcfhZHeUFrlrxxBTG0my3HePmlBMs-kOB5Zcqbs,3282
|
|
158
|
+
sage/kernel/scheduler/__init__.pyc,sha256=rKnVNw6bP7HJlNKzJMMhkw3H6T-Ke5EgsGvRKunQ5SE,2910
|
|
159
|
+
sage/kernel/scheduler/api.pyc,sha256=rBeHqpE77KwsH83pDQXOS2W2AkfiuHGceZsoj_RsSFA,9936
|
|
160
|
+
sage/kernel/scheduler/decision.pyc,sha256=0v2L1Qn7Mer633L6E-NSRlfG6ncolKAvPlsdfK4Rh78,8811
|
|
161
|
+
sage/kernel/scheduler/node_selector.pyc,sha256=UK1iFSbWieH3AIkSVz2c3qqgaqPGCAppZV7BBRefYZc,18047
|
|
162
|
+
sage/kernel/scheduler/placement.pyc,sha256=o0gzzcPztfMXSwueTRH3y9TrXcD-3Tvj5qJpZGCkn6g,8005
|
|
163
|
+
sage/kernel/scheduler/resource_provider.pyc,sha256=8cG3fE_TGBHjvouMRXy7YLJyIoe14R1sJU33sFL5LQM,12361
|
|
164
|
+
sage/kernel/scheduler/schema.pyc,sha256=jLM-xLQQyFQx186GCgRHexyWyDYJpdVeCOwjylQnjEk,17572
|
|
165
|
+
sage/kernel/scheduler/impl/__init__.py,sha256=4NGjSn1MOz-6Los6zBPsBCpP1LZqa0tfGeyFri_8Mz4,2209
|
|
166
|
+
sage/kernel/scheduler/impl/__init__.pyc,sha256=UlS7wYOx7AdDocV2jBR1XY3D_tXb24_YvdyF92edhsY,2633
|
|
167
|
+
sage/kernel/scheduler/impl/priority_scheduler.pyc,sha256=gsBPtCDxoeHd2ld9gVN9LXtSZqDXGtuFAY4T6ocPxFo,10494
|
|
168
|
+
sage/kernel/scheduler/impl/random_scheduler.pyc,sha256=3LujUTzL7d3-f_ZO0cNlucd0Y-_6xU8GlZvj6Bs4JjE,6011
|
|
169
|
+
sage/kernel/scheduler/impl/resource_aware_scheduler.pyc,sha256=qKTWFL8ooADQCivOReZ_QF46LwLVJGI6BtstLUmweP8,12384
|
|
170
|
+
sage/kernel/scheduler/impl/round_robin_scheduler.pyc,sha256=BBngpA0eiRJMQ84NT8FWznKB-gs2VGikYGfrdqbm87g,7180
|
|
171
|
+
sage/kernel/scheduler/impl/simple_scheduler.pyc,sha256=aA170pIdfulHAW5CEDQeuroX5Tk9tCm6y6fYBcSJsBM,5606
|
|
172
|
+
sage/kernel/utils/__init__.py,sha256=vUvugCW_-L-R8323fUrf5ZeJyFsOl5936ZEEUrlvJTM,1229
|
|
173
|
+
sage/kernel/utils/__init__.pyc,sha256=-CjRgOgD0Kk_RbahBqF2JfMIP1vfh1dqD6xQuf7FtBY,1169
|
|
174
|
+
sage/kernel/utils/helpers.pyc,sha256=O-U9fjVGZnxdI99RMebyLIZ5mGy_kixuikabtyrpDVA,12223
|
|
175
|
+
sage/kernel/utils/persistence/__init__.py,sha256=5eONd1i6gb4A7NiG6DC4ZJReqQtvkA3hd3c9BI12Nyk,342
|
|
176
|
+
sage/kernel/utils/persistence/__init__.pyc,sha256=1dMQKJb3mAdG_CH-HFt9ximjOH1Mk8Be2YbOYtQTq_c,516
|
|
177
|
+
sage/kernel/utils/persistence/state.pyc,sha256=QjcW5424g6bzbsfeurAI6esEgCOWrZnh2BIdNpPT0pA,8683
|
|
178
|
+
isage_kernel-0.2.4.14.dist-info/METADATA,sha256=Nh63zbQD_lxvZdtXmdIPEU8ezbvdT9WKpgRBS1S_W58,7175
|
|
179
|
+
isage_kernel-0.2.4.14.dist-info/WHEEL,sha256=Mk1ST5gDzEO5il5kYREiBnzzM469m5sI8ESPl7TRhJY,110
|
|
180
|
+
isage_kernel-0.2.4.14.dist-info/top_level.txt,sha256=hibFyzQHiLOMK68qL1OWsNKaXOmSXqZjeLTBem6Yy7I,5
|
|
181
|
+
isage_kernel-0.2.4.14.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
sage
|
sage/kernel/__init__.py
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SAGE Kernel - 流式数据处理引擎和运行时
|
|
3
|
+
|
|
4
|
+
Layer: L3 (Kernel)
|
|
5
|
+
Dependencies: sage.platform (L2), sage.common (L1)
|
|
6
|
+
|
|
7
|
+
提供:
|
|
8
|
+
- 数据流执行引擎:Environment, DataStream API
|
|
9
|
+
- 运行时组件:JobManager, Scheduler
|
|
10
|
+
- RPC通信实现:RPCQueue(注册到L2工厂)
|
|
11
|
+
|
|
12
|
+
注意:基础算子(MapOperator, FilterOperator等)已迁移到 sage.common.core.functions
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
# 直接从本包的_version模块加载版本信息
|
|
16
|
+
try:
|
|
17
|
+
from sage.kernel._version import __author__, __email__, __version__
|
|
18
|
+
except ImportError:
|
|
19
|
+
# 备用硬编码版本
|
|
20
|
+
__version__ = "0.1.4"
|
|
21
|
+
__author__ = "IntelliStream Team"
|
|
22
|
+
__email__ = "shuhao_zhang@hust.edu.cn"
|
|
23
|
+
|
|
24
|
+
# 导出核心组件 - 直接从具体模块导入,避免循环
|
|
25
|
+
try:
|
|
26
|
+
from sage.kernel.runtime.jobmanager_client import JobManagerClient
|
|
27
|
+
except ImportError:
|
|
28
|
+
# 如果导入失败,提供一个占位符
|
|
29
|
+
JobManagerClient = None # type: ignore[assignment,misc]
|
|
30
|
+
import warnings
|
|
31
|
+
|
|
32
|
+
warnings.warn(
|
|
33
|
+
"JobManagerClient is not available. Some features may be limited.",
|
|
34
|
+
ImportWarning,
|
|
35
|
+
stacklevel=2,
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
# 导出 API 类
|
|
39
|
+
try:
|
|
40
|
+
from sage.kernel.api import FlownetEnvironment, LocalEnvironment
|
|
41
|
+
except ImportError:
|
|
42
|
+
FlownetEnvironment = None # type: ignore[assignment,misc]
|
|
43
|
+
LocalEnvironment = None # type: ignore[assignment,misc]
|
|
44
|
+
import warnings
|
|
45
|
+
|
|
46
|
+
warnings.warn(
|
|
47
|
+
"LocalEnvironment and FlownetEnvironment are not available. Some features may be limited.",
|
|
48
|
+
ImportWarning,
|
|
49
|
+
stacklevel=2,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
# 导出子模块
|
|
53
|
+
__layer__ = "L3"
|
|
54
|
+
|
|
55
|
+
from . import api
|
|
56
|
+
|
|
57
|
+
# ============================================================================
|
|
58
|
+
# Public Facade API (SAGE L3 stable user-facing verbs)
|
|
59
|
+
# Per migration boundary: intellistream/SAGE#1432
|
|
60
|
+
# ============================================================================
|
|
61
|
+
from . import facade as facade # noqa: F401 – expose sage.kernel.facade subpackage
|
|
62
|
+
|
|
63
|
+
# ============================================================================
|
|
64
|
+
# Flow Declaration Layer (SAGE L3 DSL / Interface)
|
|
65
|
+
# Per migration boundary: intellistream/SAGE#1430, #1431
|
|
66
|
+
# ============================================================================
|
|
67
|
+
from . import flow as flow # noqa: F401 – expose sage.kernel.flow subpackage
|
|
68
|
+
from .facade import call, create, run, submit # stable SAGE facade verbst
|
|
69
|
+
from .flow import FlowDeclaration, FlowDeclarationError, FlowGraphValidator
|
|
70
|
+
from .flow.decorator import flow as flow_decorator # canonical @flow entry point
|
|
71
|
+
|
|
72
|
+
# ============================================================================
|
|
73
|
+
# 架构关键:L3向L2注册实现(Factory Pattern)
|
|
74
|
+
# ============================================================================
|
|
75
|
+
# 在初始化时注册RPCQueue实现到sage-platform的工厂
|
|
76
|
+
# 这样L2层可以创建L3实例,但不需要直接导入L3代码
|
|
77
|
+
try:
|
|
78
|
+
from sage.kernel.runtime.communication.rpc import RPCQueue
|
|
79
|
+
from sage.platform.queue import register_rpc_queue_factory
|
|
80
|
+
|
|
81
|
+
def _rpc_queue_factory(**kwargs):
|
|
82
|
+
"""RPC队列工厂函数 - 由L2调用创建L3实例"""
|
|
83
|
+
return RPCQueue(**kwargs)
|
|
84
|
+
|
|
85
|
+
register_rpc_queue_factory(_rpc_queue_factory)
|
|
86
|
+
|
|
87
|
+
except ImportError as e:
|
|
88
|
+
import warnings
|
|
89
|
+
|
|
90
|
+
warnings.warn(
|
|
91
|
+
f"Failed to register RPC queue factory: {e}. "
|
|
92
|
+
"RPC queue functionality will not be available.",
|
|
93
|
+
ImportWarning,
|
|
94
|
+
stacklevel=2,
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
__all__ = [
|
|
98
|
+
"__version__",
|
|
99
|
+
"__author__",
|
|
100
|
+
"__email__",
|
|
101
|
+
# DataStream pipeline API (LocalEnvironment / FlownetEnvironment)
|
|
102
|
+
"JobManagerClient",
|
|
103
|
+
"FlownetEnvironment",
|
|
104
|
+
"LocalEnvironment",
|
|
105
|
+
"api",
|
|
106
|
+
# Flow declaration layer (Issue #1431)
|
|
107
|
+
"flow",
|
|
108
|
+
"flow_decorator",
|
|
109
|
+
"FlowDeclaration",
|
|
110
|
+
"FlowDeclarationError",
|
|
111
|
+
"FlowGraphValidator",
|
|
112
|
+
# Public facade API (Issue #1432)
|
|
113
|
+
"facade",
|
|
114
|
+
"create",
|
|
115
|
+
"submit",
|
|
116
|
+
"run",
|
|
117
|
+
"call",
|
|
118
|
+
]
|
sage/kernel/__init__.pyc
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
sage/kernel/_version.py
ADDED
sage/kernel/_version.pyc
ADDED
|
Binary file
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SAGE Kernel API - 用户友好的流处理API接口
|
|
3
|
+
|
|
4
|
+
Layer: L3 (Kernel - Public API)
|
|
5
|
+
Dependencies: sage.platform (L2), sage.common (L1)
|
|
6
|
+
|
|
7
|
+
这个模块提供了 SAGE 的核心 API,包括:
|
|
8
|
+
- 环境配置(LocalEnvironment, FlownetEnvironment)
|
|
9
|
+
- 数据流操作(DataStream)
|
|
10
|
+
- 函数定义(从 sage.common.core.functions 导入)
|
|
11
|
+
- 算子抽象(MapOperator, FilterOperator等)
|
|
12
|
+
|
|
13
|
+
Architecture:
|
|
14
|
+
- 提供用户友好的流式处理 API
|
|
15
|
+
- 内部使用 runtime 模块实现执行
|
|
16
|
+
- 支持本地和远程两种执行模式
|
|
17
|
+
|
|
18
|
+
示例:
|
|
19
|
+
```python
|
|
20
|
+
from sage.kernel.api import LocalEnvironment
|
|
21
|
+
from sage.common.core.functions import MapFunction, SinkFunction
|
|
22
|
+
|
|
23
|
+
env = LocalEnvironment("my_app")
|
|
24
|
+
stream = env.from_collection([1, 2, 3])
|
|
25
|
+
stream.map(lambda x: x * 2).print()
|
|
26
|
+
env.execute()
|
|
27
|
+
```
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
# 导入主要 API 类
|
|
31
|
+
from .flownet_environment import FlownetEnvironment
|
|
32
|
+
from .local_environment import LocalEnvironment
|
|
33
|
+
|
|
34
|
+
# 版本信息
|
|
35
|
+
try:
|
|
36
|
+
from sage.kernel._version import __author__, __email__, __version__
|
|
37
|
+
except ImportError:
|
|
38
|
+
__version__ = "0.1.4"
|
|
39
|
+
__author__ = "IntelliStream Team"
|
|
40
|
+
__email__ = "shuhao_zhang@hust.edu.cn"
|
|
41
|
+
|
|
42
|
+
__all__ = [
|
|
43
|
+
"__version__",
|
|
44
|
+
"__author__",
|
|
45
|
+
"__email__",
|
|
46
|
+
"FlownetEnvironment",
|
|
47
|
+
"LocalEnvironment",
|
|
48
|
+
]
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|