Skip to content

Commit 76207e7

Browse files
committed
* fix several test cases and bugs
1 parent 6cdb758 commit 76207e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/ops/mapper/test_optimize_prompt_mapper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import math
23
import unittest
34

45
from datasets import load_dataset
@@ -28,7 +29,7 @@ def _run_op(self, model="Qwen/Qwen2.5-7B-Instruct", enable_vllm=False, is_hf_mod
2829

2930
results = dataset.map(op.process, num_proc=num_proc, with_rank=True, batched=True, batch_size=batch_size)
3031

31-
num_batches = len(dataset) // batch_size
32+
num_batches = math.ceil(len(dataset) / batch_size)
3233
self.assertEqual(len(results), len(dataset) + num_batches * gen_num)
3334

3435
def test(self):

0 commit comments

Comments
 (0)