unsloth/studio/backend/utils/models
Daniel Han 63ad2cd38f Studio: trim log noise (scanner probes, library chatter, load narration) with a --verbose escape hatch
Default-level logs accumulated low-signal lines: uvicorn 'Invalid HTTP request
received' from port scanners, per-probe request_completed access lines for
CONNECT / absolute-form / non-standard methods, third-party library INFO (httpx
'HTTP Request: ... 200 OK', HF/transformers banners), and repeated model-load
narration. None of it helps operate Studio, and it buries real warnings/errors.

Changes (all backwards-compatible; --verbose or LOG_LEVEL=DEBUG restores everything):
- loggers/config.py: logs_verbose() helper; raise noisy third-party loggers to
  WARNING and captureWarnings(True) unless verbose. Errors still surface.
- run.py: --verbose/-v flag (sets UNSLOTH_STUDIO_VERBOSE + LOG_LEVEL=DEBUG);
  uvicorn drop-filter for h11 'Invalid HTTP request' scanner warnings.
- loggers/handlers.py: LoggingMiddleware skips scanner/proxy probes
  (non-standard method or absolute-form target); a normal GET/POST 404 still logs.
- llama_cpp.py: only mirror llama-server output line-by-line to the logger when
  verbose (the full output is always tee'd to the per-server log file); demote
  GGUF metadata descriptors to debug.
- Demote repetitive load narration to debug: execute_tool per-call, Top GGUF/hub
  model lists, 'Loaded default model defaults', per-message tokenizer dump.
- tests/test_log_noise_filters.py: scanner skip + real-404 kept, verbose round
  trip, uvicorn drop-filter, library quieting.

Throughput logging is unchanged: the periodic vLLM-style engine_stats line
(configurable via UNSLOTH_STUDIO_ENGINE_STATS_INTERVAL_S, idle-skipping) stays.
2026-06-27 07:47:29 +00:00
..
__init__.py Harden model fetching (#6391) 2026-06-18 05:39:52 -07:00
checkpoints.py Studio: shareable per-checkpoint preview links (#6486) 2026-06-24 06:31:53 -07:00
gguf_metadata.py Studio: add 'Load on selection' toggle to configure load options before loading (#6348) 2026-06-17 16:24:10 +01:00
model_config.py Studio: trim log noise (scanner probes, library chatter, load narration) with a --verbose escape hatch 2026-06-27 07:47:29 +00:00