From 2d57e3e918d338bf56f2af6282b3f69f71ddd3dd Mon Sep 17 00:00:00 2001 From: Taksh Date: Wed, 27 May 2026 10:29:48 +0530 Subject: [PATCH] Initialize lines = [] in load_log_files to avoid UnboundLocalError on FileNotFoundError retry failures --- fastchat/serve/monitor/basic_stats.py | 1 + 1 file changed, 1 insertion(+) diff --git a/fastchat/serve/monitor/basic_stats.py b/fastchat/serve/monitor/basic_stats.py index 3c1a8793d..c8057f14c 100644 --- a/fastchat/serve/monitor/basic_stats.py +++ b/fastchat/serve/monitor/basic_stats.py @@ -36,6 +36,7 @@ def get_log_files(max_num_files=None): def load_log_files(filename): data = [] + lines = [] for retry in range(5): try: lines = open(filename).readlines()