From ba9047d40ec5721688186d60d88a53c3b6930f39 Mon Sep 17 00:00:00 2001 From: Zhihao Lin <36994684+LZHgrla@users.noreply.github.com> Date: Mon, 15 Apr 2024 20:53:03 +0800 Subject: [PATCH] [Fix] Enhance `split_list` to support `value` at the beginning (#568) Update dataset_info_hook.py --- xtuner/engine/hooks/dataset_info_hook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xtuner/engine/hooks/dataset_info_hook.py b/xtuner/engine/hooks/dataset_info_hook.py index d835311dc..76b49e6a9 100644 --- a/xtuner/engine/hooks/dataset_info_hook.py +++ b/xtuner/engine/hooks/dataset_info_hook.py @@ -9,7 +9,7 @@ def split_list(lst, value): res = [] tmp_res = [] for i in lst: - if tmp_res and i == value: + if i == value: res.append(tmp_res) tmp_res = [] else: