Skip to main content

🚀 Super Analysis 部署指南

本指南将帮助你部署 Super Analysis 系统,包括安装必要组件、配置服务和启动系统。


📦 安装 Super Analysis

pip install -U auto-coder
pip install super_analysis-xxxx-py3-none-any.whl

注意替换下 xxxx 为版本号。


🤖 部署 Deepseek 模型代理

在启动其他服务之前,我们需要先部署 Deepseek 模型:

byzerllm deploy --pretrained_model_type saas/openai \
--cpus_per_worker 0.001 \
--gpus_per_worker 0 \
--worker_concurrency 1000 \
--num_workers 1 \
--infer_params saas.base_url="https://api.deepseek.com/v1" saas.api_key=${MODEL_DEEPSEEK_TOKEN} saas.model=deepseek-chat \
--model deepseek_chat

注意:确保已设置环境变量 MODEL_DEEPSEEK_TOKEN。


🛠️ 部署 Byzer-SQL

参考 安装与配置 Byzer-SQL 文档 完成部署。 根据 Byzer-SQL 和大模型整合文档 中安装插件,然后注册 deepseek_chat 函数。

启动时需要在安装有 super-analysis 的 conda 环境中启动。

当 byzer-sql 部署完成后,注册账号为 hello,然后在 byzer-sql 控制台中执行:

!byzerllm setup single;

run command as LLM.`` where 
action="infer"
and reconnect="true"
and pretrainedModelType="saas/openai"
and udfName="deepseek_chat";

示例数据

下载电影数据集: https://www.kaggle.com/datasets/rounakbanik/the-movies-dataset/download?datasetVersionNumber=7


下面的指令都是在命令行里操作哈

📊 数据预处理和服务启动

  1. 抽取电影数据集schema:
super-analysis.convert --data_dir /Users/allwefantasy/data/movice --doc_dir /Users/allwefantasy/data/movice/schemas/

你还可以添加 --include-rows-num 5 让系统在生成 schema 文档时同时提供一些示例数据。方便大模型更好的对这个表进行认知。

  1. 启动 schema 文档知识库:
auto-coder.rag serve \
--model deepseek_chat --index_filter_workers 100 \
--tokenizer_path /Users/allwefantasy/Downloads/tokenizer.json \
--doc_dir /Users/allwefantasy/data/movice/schemas/ \
--port 8001
  1. 下载 Byzer-SQL 文档并启动文档知识库:
git clone https://github.com/allwefantasy/llm_friendly_packages

auto-coder.rag serve \
--model deepseek_chat --index_filter_workers 100 \
--tokenizer_path /Users/allwefantasy/Downloads/tokenizer.json \
--doc_dir  /Users/allwefantasy/projects/llm_friendly_packages/github.com/allwefantasy \
--port 8002
  1. 启动兼容 OpenAI Server 的分析服务:
super-analysis.serve --served-model-name deepseek_chat --port 8000 \
--schema-rag-base-url http://127.0.0.1:8001/v1 \
--context-rag-base-url http://127.0.0.1:8002/v1 \
--byzer-sql-url http://127.0.0.1:9003/run/script

你可以通过 --sql-func-llm-model 函数单独为 SQL 函数指定模型(比如配置一个速度极快的模型)。注意,同样的,你需要在 Byzer-SQL 中注册这个函数。


现在,Super Analysis 系统已经完全部署并启动。你可以开始使用 OpenAI SDK 进行测试和接口调用。具体测试和接口使用方法请参考 openai_local_api.ipynb。

🎉 恭喜!你已经成功部署了 Super Analysis 系统。如有任何问题,请随时查阅文档或联系支持团队。

Metadata

Release files for super-analysis 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for super-analysis 0.1.9
File Interpreter ABI Platform Actions
super_analysis-0.1.9-py3-none-any.whl Python 3 none any Details for super_analysis-0.1.9-py3-none-any.whl

Release files / super_analysis-0.1.9-py3-none-any.whl

Download URL super_analysis-0.1.9-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee194ee3820a5b64c25686f9e4aaeaf4682974883a7481897ab5ac1ae7a601dd
BLAKE2b-256 checksum
How to use checksums
f1f3ab1acbff8c76a2da55a92e9825939378261d29f08af573765e5e0acbc244
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.11

Security for super-analysis 0.1.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page