Skip to main content

SAGE - Streaming-Augmented Generative Execution

Project description

SAGE - Streaming-Augmented Generative Execution

SAGE (Streaming-Augmented Generative Execution) 是一个强大的分布式流数据处理平台的 Meta 包。

⚠️ PEP 420 Namespace Package

CRITICAL: SAGE 使用 PEP 420 namespace packages 架构。

# ❌ 错误:不能直接导入 sage 命名空间
import sage

# ✅ 正确:导入具体的子包
import sage.common
import sage.llm
import sage.kernel
from sage.common.config import get_user_paths

为什么不能直接 import sage?

  • SAGE 采用 PEP 420 原生命名空间(无 __init__.py
  • 允许多个独立 PyPI 包共享 sage.* 命名空间
  • 防止"命名空间劫持"(首个安装包独占 sage/
  • 符合现代 Python 标准(Python 3.3+)

相关: #1388 多仓库拆分准备

简介

这是 SAGE 的主要元包,提供分层的安装选项以适应不同使用场景。

🎯 安装方式

标准安装(推荐)✅

日常应用开发,包含核心功能 + CLI + Web UI + RAG/LLM operators

pip install isage

包含组件

  • L1-L4: 核心运行时、算法库、领域算子
  • L6: CLI 工具 (sage 命令) + Web UI (Studio)
  • 科学计算库: numpy, pandas, matplotlib, scipy, jupyter

大小: ~200MB | 适合: 应用开发者、日常使用


其他安装选项

核心运行时

仅用于运行已有 pipeline(生产环境、容器部署)

pip install isage[core]

大小: ~100MB | 适合: 生产部署

完整功能

包含示例应用(医疗、视频)和性能测试工具

pip install isage[full]

大小: ~300MB | 适合: 学习示例、性能评估

框架开发

修改 SAGE 框架源代码

pip install isage[dev]

大小: ~400MB | 适合: 框架贡献者

📦 包含的组件

默认安装 (standard)

  • isage-common (L1): 基础工具和公共模块
  • isage-platform (L2): 平台服务(队列、存储)
  • isage-kernel (L3): 核心运行时和任务执行引擎
  • isage-libs (L3): 算法库和 Agent 框架
  • isage-middleware (L4): RAG/LLM operators
  • isage-tools (L6): CLI 工具 (sage 命令)
  • isage-studio (L6): Web UI 低代码界面

额外组件 (full)

  • isage-apps (L5): 示例应用(医疗诊断、视频分析)
  • isage-benchmark (L5): 性能基准测试工具

快速开始

安装

# 标准安装(推荐)
pip install isage

# 或从源码安装
git clone https://github.com/intellistream/SAGE.git
cd SAGE
pip install -e packages/sage

使用示例

import sage

# 创建 SAGE 应用
app = sage.create_app()


# 定义数据流处理
@app.stream("user_events")
def process_events(event):
    return {
        "user_id": event["user_id"],
        "processed_at": sage.now(),
        "result": "processed",
    }


# 启动应用
if __name__ == "__main__":
    app.run()

命令行工具

安装后,你可以使用以下命令:

# 查看版本
sage --version

# 创建新项目
sage create my-project

# 启动服务
sage run

# 查看帮助
sage --help

文档

许可证

MIT License

贡献

欢迎贡献代码!请查看我们的贡献指南

支持

如果你遇到问题或有疑问,请:

  1. 查看文档
  2. 搜索已知问题
  3. 创建新问题

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

isage-0.2.3.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file isage-0.2.3.1-py3-none-any.whl.

File metadata

  • Download URL: isage-0.2.3.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for isage-0.2.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 953cddec12135978e26fc447ff589ccd0f8d43ef8c234f2315b3e8638e19da59
MD5 42415311f1e787f77b33a0b7e492db28
BLAKE2b-256 f52ce5905bfae1e9852f83314d4593c49a23f0bd0cce4d460e0a0fa43a4587b3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page