Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

gguf integration does not track create_chat_completion or create_completion

Geschlossen
#64 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
72/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
devtools, machine-learning, python
Bereich
ai, observability

Rechercherichtung

Start with the existing GGUF instrumentation around Llama.__call__, then inspect create_completion and create_chat_completion behavior in the llama-cpp-python integration. Trace streaming and non-streaming result objects to verify usage, finish reasons, generation configuration, chat metadata, and attachment handling. Add or update integration tests so each entry point is tracked once and __call__ does not double-count.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

What happens

The gguf integration only tracks Llama.__call__. Llama.create_chat_completion is not tracked: llama-cpp-python's chat handlers call llama.create_completion(...) directly (llama_chat_format.py), so they never go through the patched __call__. create_completion called directly is missed too.

Chat completion is the usual way to run an instruct model, so an app using it gets the model load event and nothing else. It has to register the model with auto_instrument=False and build track_inference itself: TextInputMeta, GenerationOutputMeta from usage and finish_reason, and GenerationConfig from the call's keyword arguments.

Expected

Track create_completion and create_chat_completion (streaming and non-streaming), once per call:

  • tokens in and out, tokens per second and stop reason from the result's usage and choices[0].finish_reason
  • GenerationConfig from temperature, top_p, max_tokens and repeat_penalty
  • TextInputMeta with prompt_type="chat" and the number of user turns, for chat calls
  • when attachments are enabled, the messages as input and the reply as output

__call__ delegates to create_completion, so patching create_completion would cover all three without double counting.

Found in evil-jarvis, which tracks this by hand today (src/evil_jarvis/telemetry.py, track_generation). SDK 0.2.2, llama-cpp-python 0.3.x.

🤖 Generated with Claude Code

Vorherrschende Sprache
Python
Sterne
17
Forks
1
Ø Merge
17 Std. 5 Min.
Gemergte PRs (30 T.)
34

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus wild-edge/wildedge-python

Alle Issues in wild-edge/wildedge-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.