_logger.py: KeyError:5 [bugfix] [patch]
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 80/100
Línea de trabajo
El problema está en llama_cpp/_logger.py. Busca el diccionario GGML_LOG_LEVEL_TO_LOGGING_LEVEL y añade la clave que falta, 5, con el valor logging.FATAL. Después de editarlo, prueba ejecutando el código que activa el callback de logging para asegurarte de que se ha resuelto el KeyError.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
}
- Lenguaje dominante
- Python
- Estrellas
- 10.6k
- Forks
- 1.5k
- Merge medio
- 6 h 43 min
- PR fusionados (30 d)
- 2
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de abetlen/llama-cpp-python
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
abetlen/llama-cpp-python#2371 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
abetlen/llama-cpp-python#2352 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
abetlen/llama-cpp-python#2211 · 2 comentarios ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
abetlen/llama-cpp-python#2210 ·
-
Improve error messages Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
abetlen/llama-cpp-python#2145 ·
Todos los issues de abetlen/llama-cpp-python
Issues similares
-
essnmx good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
-
[Feature] 奇物选择添加优先级 Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
syfoud/Simulated_Scepter#174 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Giskard-AI/giskard-oss#2840 · 1 comentario ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Abiertoarea: repo bug perceived difficulty: 2
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
yeti-platform/yeti#1380 ·