_logger.py: KeyError:5 [bugfix] [patch]
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 80/100
Direzione di ricerca
Il problema si trova in llama_cpp/_logger.py. Cerca il dizionario GGML_LOG_LEVEL_TO_LOGGING_LEVEL e aggiungi la chiave mancante 5 con il valore logging.FATAL. Dopo la modifica, esegui il codice che attiva il callback di logging per verificare che il KeyError sia stato risolto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Prerequisites
Please answer the following questions for yourself before submitting an issue.
- I am running the latest code. Development is very rapid so there are no tagged versions as of now.
- I carefully followed the README.md.
- I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
- I reviewed the Discussions, and have a new bug or useful enhancement to share.
Current Behavior
KeyError: 5
Exception ignored on calling ctypes callback function: <function llama_log_callback at 0x7f1ab2545c60>
Traceback (most recent call last):
File "/home/k/Downloads/src/llama-cpp-python/llama_cpp/_logger.py", line 32, in llama_log_callback
if logger.level <= GGML_LOG_LEVEL_TO_LOGGING_LEVEL[level]:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
(repeats)
Environment and Context
Easy fix: in llama-cpp-python/llama_cpp/_logger.py
Add the key (5)
GGML_LOG_LEVEL_TO_LOGGING_LEVEL = {
0: logging.CRITICAL,
1: logging.INFO,
2: logging.WARNING,
3: logging.ERROR,
4: logging.DEBUG,
++++++ 5: logging.FATAL
}
- Lingua principale
- Python
- Stelle
- 10.6k
- Fork
- 1.5k
- Merge medio
- 6h 43m
- PR unite (30g)
- 2
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di abetlen/llama-cpp-python
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
abetlen/llama-cpp-python#2371 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
abetlen/llama-cpp-python#2352 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
abetlen/llama-cpp-python#2211 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
abetlen/llama-cpp-python#2210 ·
-
Improve error messages Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
abetlen/llama-cpp-python#2145 ·
Tutte le issue di abetlen/llama-cpp-python
Issue simili
-
essnmx good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
-
[Feature] 奇物选择添加优先级 Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
syfoud/Simulated_Scepter#174 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Giskard-AI/giskard-oss#2840 · 1 commento ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Apertaarea: repo bug perceived difficulty: 2
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
yeti-platform/yeti#1380 ·