Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

gguf integration does not track create_chat_completion or create_completion

Fermée
#64 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
72/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
devtools, machine-learning, python
Domaine
ai, observability

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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

Langage dominant
Python
Étoiles
17
Forks
1
Merge moyen
17 h 5 min
PR mergées (30 j)
34

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de wild-edge/wildedge-python

Toutes les issues de wild-edge/wildedge-python

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.