Skip to content

Commit

Permalink
[Fix] Enhance split_list to support value at the beginning (#568)
Browse files Browse the repository at this point in the history
Update dataset_info_hook.py
  • Loading branch information
LZHgrla authored Apr 15, 2024
1 parent 376188a commit ba9047d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xtuner/engine/hooks/dataset_info_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ba9047d

Please sign in to comment.