Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[bot] Instrument SGLang offline engine (574,007 weekly downloads)

Đang mở
#786 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
ai

Hướng nghiên cứu

Start with py/src/braintrust/integrations/cohere/patchers.py and inspect py/src/braintrust/integrations/, py/src/braintrust/wrappers/, py/pyproject.toml, and py/noxfile.py for existing integration patterns. Read SGLang's Offline Engine API documentation first; done means the listed generate, async_generate, encode, and rerank paths, including streaming and VLM inputs, produce Braintrust spans with project registration and validation coverage.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

<!-- library-gap-audit: sglang-offline-engine -->

Summary

sglang is a high-performance LLM/multimodal serving framework with RadixAttention, continuous batching, and speculative decoding, positioned alongside vllm (already tracked as a separate open instrumentation gap in this repo) as one of the two dominant open-source inference engines. This repository has zero instrumentation for it.

  • Current version 0.5.20 (released 2026-09-18), under very active development
  • Not present in py/pyproject.toml [tool.braintrust.matrix], no noxfile.py session, no directory under py/src/braintrust/integrations/ or py/src/braintrust/wrappers/
  • Repo-wide grep for sglang under py/ returns zero matches

What is missing

SGLang's in-process Offline Engine API (sglang.Engine, docs: https://docs.sglang.io/docs/basic_usage/offline_engine_api) is the primary way Python applications call it directly (as opposed to going through its OpenAI-compatible HTTP server, which a user could separately point the already-instrumented openai client at). None of these produce a Braintrust span today:

  • Engine.generate() — synchronous text/chat generation, non-streaming and streaming variants
  • Engine.async_generate() — asyncio generation entrypoint, non-streaming and streaming variants; this is the method the framework's own example server-wrapping code (examples/runtime/engine/custom_server.py) uses to build custom serving layers
  • Engine.encode() — embedding execution (e.g. BERT-base/e5-mistral style models) for retrieval/similarity use cases
  • Engine.rerank() — query/document relevance scoring, analogous to the cohere.rerank span type this repo already instruments (py/src/braintrust/integrations/cohere/patchers.py)

This engine also supports vision-language model (VLM) inference via the same generate()/async_generate() surface with image inputs.

Weekly downloads

Weekly downloads: 574,007 (as of 2026-09-21; https://pypistats.org/api/packages/sglang/recent)

Braintrust docs status

not_found — checked https://www.braintrust.dev/docs/integrations/ai-providers and https://www.braintrust.dev/docs/guides/traces/integrations; neither mentions SGLang. (vllm, the closest analog, is also absent from both pages and is tracked separately.)

Upstream sources

Local repo files inspected

  • py/src/braintrust/integrations/ — no sglang/ directory
  • py/src/braintrust/wrappers/ — no SGLang wrapper
  • py/pyproject.toml [tool.braintrust.matrix] — no sglang entry
  • py/noxfile.py — no test_sglang session
  • Repo-wide case-insensitive grep for sglang under py/ — zero matches
Ngôn ngữ chính
Python
Star
19
Fork
17
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
61

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của braintrustdata/braintrust-sdk-python

Tất cả issue của braintrustdata/braintrust-sdk-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.