Skip to content

Commit c25510f

Browse files
committed
fix unit
1 parent 7a21e75 commit c25510f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/nlp/arrow_dataset.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1304,8 +1304,9 @@ def apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples=F
13041304
try:
13051305
# Loop over single examples or batches and write to buffer/file if examples are to be updated
13061306
pbar_iterable = self if not batched else range(0, len(self), batch_size)
1307+
pbar_unit = "ex" if not batched else "ba"
13071308
pbar_desc = "#" + str(rank) if rank is not None else None
1308-
pbar = tqdm(pbar_iterable, disable=not_verbose, position=rank, unit="ba", desc=pbar_desc)
1309+
pbar = tqdm(pbar_iterable, disable=not_verbose, position=rank, unit=pbar_unit, desc=pbar_desc)
13091310
if not batched:
13101311
for i, example in enumerate(pbar):
13111312
example = apply_function_on_filtered_inputs(example, i)

0 commit comments

Comments
 (0)