From 741aa8d289b8a5e727df43c4df5a9145608fc48d Mon Sep 17 00:00:00 2001 From: Will Lin Date: Fri, 21 Aug 2026 17:38:18 +0000 Subject: [PATCH] [bugfix] logger: info_once crashed on the patched process-aware info (duplicate stacklevel) _print_info_once passes stacklevel=2 into logger.info, and init_logger's patched _info passed its own stacklevel=2 positionally into logger.log on top of the caller's kwarg -> TypeError on every info_once call. Honor an explicit stacklevel instead of passing the keyword twice. Co-Authored-By: Claude Fable 5 --- fastvideo/logger.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fastvideo/logger.py b/fastvideo/logger.py index c47168242..763819774 100644 --- a/fastvideo/logger.py +++ b/fastvideo/logger.py @@ -114,7 +114,10 @@ def _info(logger: Logger, is_local_main_process = local_rank == 0 if (main_process_only and is_main_process) or (local_main_process_only and is_local_main_process): - logger.log(logging.INFO, msg, *args, stacklevel=2, **kwargs) + # Honor an explicit stacklevel (info_once routes through here with + # stacklevel already set) instead of passing the keyword twice. + stacklevel = kwargs.pop("stacklevel", 2) + logger.log(logging.INFO, msg, *args, stacklevel=stacklevel, **kwargs) global _warned_local_main_process, _warned_main_process