Repository navigation
Studio: put llama-server warnings and errors in the default session log - #10848
danielhanchen merged 11 commits into
Conversation
Promote actionable llama-server lines to INFO, surface log capture failures, stamp attempt footers with exit codes, bundle recent llama logs in the debug log API, log startup troubleshooting context, and map --verbose to LOG_LEVEL=DEBUG.
…g bundle Drop blanket cuda/ggml and llama_/main: prefix promotion so routine llama_model_loader metadata stays DEBUG; only readiness, build/system_info, and genuine failure/warning lines reach INFO. Settings > Logs reads troubleshooting_source_ids and surfaces the support bundle in the picker.
|
@danielhanchen Addressed the classifier + API wiring feedback: Stdout classifier (
Rebased on current |
2a64d80 to
b2be8d9
Compare
Resolve conflicts with main and rescope to the logging changes: - llama-server lines reach the INFO session log when llama.cpp tags them W or E (keyword fallback for builds without level letters) or on readiness, sharing the predicate the 64 MiB tee trim already used, instead of a keyword list. - Open failures warn on the primary spawn path too; a failing tee warns once per attempt and a closed file no longer warns. - Drop troubleshooting_source_ids and the picker markers: Download all logs (unslothai#10719) already collects the session and llama logs together. - Fold the startup context into the existing startup line.
An unprefixed line from a levelled build continues a multi-line record (a chat template or request dump), so readiness or error words inside it no longer lift user text into the INFO session log.
The close record is written after the handle is released and never raises out of teardown, and an attempt whose server had already exited is recorded as reason=exited rather than killed.
…velled warnings A logger write failing on a closed stdout no longer ends the drain thread, which would leave llama-server blocked on a full pipe. Builds without level letters now count warning lines too.
|
pre-commit.ci run |
Fixes #10793 (partly: the log-level and log-capture gaps).
Problem
After a normal Studio run the session log, which is what users send, holds no llama-server output at all: every forwarded line is DEBUG and only lands in the separate
llama-*.log. Failing to open or write that log is reported at DEBUG or not at all, andunsloth studio --verbosedoes not turn on backend DEBUG.Changes
WorE(default,--log-colorsand--no-log-timestampsprefixes;error/fail/warnkeywords for builds without level letters), plus theI-level readiness line, are logged at INFO in the session log. Everything else stays DEBUG and in the per-attempt file. Unprefixed continuation lines (chat template or request dumps) keep their record's level, so prompt text never reaches INFO on its wording. The same predicate drives the 64 MiB log trim.[studio] attempt end reason=killed|exited exit_code=...(exitedwhen the server had already died), and the close is logged at INFO with the path after the handle is released.unsloth studio --verbosealso setsLOG_LEVEL=DEBUG.Collecting the session and llama logs together is already covered by Download all logs (#10719).
Evidence
Real llama.cpp b11317 output through the new predicate: a normal Qwen3-0.6B load at
--verbosity 4is 247 lines, of which 3 reach INFO (twoWlines andmodel loaded). A load of a missing GGUF is 15 lines, of which 11 reach INFO (everyEline plus theWline). A--log-verboserun is 4484 lines, of which 4 reach INFO; a prompt containing "model loaded" did not. On a GPU, Studio built from main put 0 llama-server lines in the session log (including a failed first attempt), and Studio built from this branch put the two warnings andmodel loadedthere, with[studio] attempt end reason=killed exit_code=0closing the attempt log.Tests
studio/backend/tests/test_llama_server_log_lines.pyand a case intest_llama_cpp_atexit_quiet.py; they fail on main and pass here.