From 4cf9681ebb3bd3f8d73a2e9cabef5b244fa073a0 Mon Sep 17 00:00:00 2001 From: ViperEkura <3081035982@qq.com> Date: Mon, 14 Jul 2025 14:52:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(utils):=20=E4=BC=98=E5=8C=96=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E5=A4=84=E7=90=86=E4=B8=AD=E7=9A=84=E5=88=86?= =?UTF-8?q?=E5=9D=97=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 9de8d0e..e88c1ec 100644 --- a/utils.py +++ b/utils.py @@ -65,7 +65,7 @@ def process_dataset( total_samples = len(train_dataset) num_chunks = (total_samples // chunk_size) + 1 - lim_chunks = max_chunk_size if max_chunk_size else num_chunks + lim_chunks = min(max_chunk_size, num_chunks) if max_chunk_size else num_chunks script_dir = os.path.dirname(os.path.abspath(__file__)) output_dir = os.path.join(script_dir, "dataset", output_subdir)