
Krauncher analyzer
io.github.Ilya-a-sergeyev-ger由 GitHub 账号 Ilya-a-sergeyev-ger 发布v0.5.0更新于 Nov 10, 2026
How long a GPU job will run and cost, before running it — static code analysis, never executed.
概览
通过静态分析 Python 代码(不执行),在运行前估算远程 GPU 任务的耗时与费用。
- 可以做什么
- 静态分析 Python 训练脚本,估算 GPU 运行时间与费用,无需提交任务
- 对代码进行分类,选择显存档位或 GPU 型号,并比较各 GPU 的预测时间与费用
- 查看已完成任务的状态、各阶段耗时、分类、费用、GPU 规格、峰值显存与利用率
- 在远程 GPU 上运行代码或装饰函数,取回结果、日志与产物
- 将相关任务归入同一热机,并在任务间传入或取回数据集与文件
- 适用场景
- 当你已有可运行的本地 Python 训练或推理脚本,想在花钱使用远程 GPU 前先了解耗时与费用,或希望由助手为任务挑选合适的 GPU 时适用。
- 运行要求
- 以本地 Python 进程运行(需 Python 3.11+)。可通过环境变量 KRAUNCHER_API_KEY 提供可选的 Krauncher API 密钥;不提供时使用公共分析器,按 IP 有每日配额。需要访问 Krauncher 服务的网络连接。
安装
在 SourceWeft 中
- 打开 控制台中的 Krauncher analyzer,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Krauncher
Run your training script on a remote GPU. Nothing more.
Krauncher is a minimal Python library for researchers who have a working local script and need a GPU — not a platform.
Website & API keys: krauncher.com
Quickstart
Requires Python 3.11+.
The decorated function becomes async: calling it submits the task and
returns a TaskHandle; awaiting the handle (or await handle.wait(...))
returns a TaskResult.
Using an LLM / coding agent? Read AGENTS.md — a single accurate reference of the API, parameters, result fields, errors and constraints. Runnable examples live in tutorial/.
The problem with serverless ML platforms
Serverless orchestration platforms are genuinely impressive pieces of infrastructure. They handle container builds, secret management, artifact storage, scheduling, persistent volumes, and team dashboards.
They also charge you for all of it — whether you use it or not.
If you're fine-tuning a small model, running ablations, or iterating on a research experiment with a dataset under 2 GB, you're likely paying for an orchestration layer you don't need.
Krauncher does less, on purpose. It runs your existing Python function on a remote GPU, returns the result, and gets out of the way.
What Krauncher is (and isn't)
Good fit:
- Fine-tuning, LoRA, small-scale experiments with training datasets up to ~2 GB
- Researchers who already have a working local script
- Anyone tired of rewriting their code to fit a platform's abstractions
- Teams where "infrastructure" means one person and a credit card
Not the right tool if:
- You need managed versioned artifact storage
- Your team requires persistent shared volumes across runs
- Your dataset is hundreds of GBs with complex multi-node sharding
- You want a UI dashboard for experiment tracking
How it works
Add a decorator. Await your function. Get a result. Your existing code doesn't change — no base images, no volume mounts, no platform imports.
The decorated function is async — always call it from an
asynccontext andawaitthe handle (which submits and waits). See the Quickstart for the canonical shape.
Choosing a GPU
Leaving vram_gb unset is the recommended default — Krauncher analyzes your
code statically and sizes the GPU automatically.
Security model
Krauncher doesn't store anything. Your API key and training code are encrypted on your machine before leaving it, and decrypted only inside the ephemeral worker. The relay that routes your jobs cannot read the payload — it doesn't have the keys.
Storage keys are part of that: the S3 / HuggingFace credentials a task needs
(AWS_*, HF_TOKEN) are read from your environment and travel sealed inside
the same payload as the code, straight to the worker. Set
CAS_SEND_CREDENTIALS=false to attach none.
This isn't a feature we added. It's a consequence of not wanting to be in the data custody business. E2E encryption is mandatory — there is no opt-out.
Data locality
Tasks with the same group_id are routed to the same physical host, so
whatever your first run downloaded to local NVMe is still there for the next.
For larger or registered datasets, use the data bridge (data_urls= /
data=), which downloads into /data inside the sandbox — see
tutorial/06 and
tutorial/15.
Beyond a single function
- Notebook / editor cells.
await client.run_code(code, inputs={...}, outputs=[...])runs a code string instead of a decorated function: named local values go in, named variables come back (JSON-safe, 16 MB budget). This is the primitive thekrauncher-jupyter%%kraunchermagic is built on. See tutorial/50. - Multi-phase runs.
group = await client.group(task_a, task_b)derives a shared-requirements envelope (VRAM floor, GPU pins, disk) from the tasks and keeps them on one warm worker; submit withawait group.submit(task, ...). See tutorial/52. - Files in, files out. Pass
files={"input.csv": b"..."}when calling the task and setartifacts=Trueto get back what it wrote beside itself (result.artifacts,result.download("received")). Both directions ride the encrypted payload — no storage to configure. See tutorial/54. - Price it before you run it. Analysis and execution are separate phases:
await client.estimate_code(code, ...)returns the classification without submitting, andrun_code(code, ..., classification=...)then executes without a second analysis.CAS_ESTIMATE_ONLY=truedoes the same for decorated tasks;POST /api/estimatereturns per-GPU predicted time and cost.
Inspecting a finished task
After a task completes, the broker keeps a structured record — the same one the web UI renders on the task detail page.
get_task returns status, timing breakdown (queue / download / pip / setup /
execution), classification, costs, GPU and worker specs, and the result.
get_task_report adds an extended report field: peak/average GPU
utilization, peak VRAM, the actual GPU's hardware specs, and an estimated
time/cost comparison across all known GPUs at the worker's measured host
capabilities. It is intended as feedback for an LLM author of the user
code — pure data, no interpretation.
Examples
Numbered, runnable tutorials in tutorial/:
Install
Requires Python 3.11+.
License
MIT
来源:README.md,提交 d933b59
工具
0版本历史
1- v0.5.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分