Skip to content

Commit c215cec

Browse files
HDCharlesgemini-code-assist[bot]
authored andcommitted
[ddp] fixing data slice bug (vllm-project#2361)
Summary: that's not how you slice a dataset, previously not tested with world_size==1 Test Plan: [script](https://gist.github.com/HDCharles/282950166fd0c95a7a2594fe922bcb53) (world_size==1) --------- Signed-off-by: HDCharles <charlesdavidhernandez@gmail.com> Signed-off-by: HDCharles <39544797+HDCharles@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: 김대익 <33992354+dik654@users.noreply.github.com>
1 parent a0b0c71 commit c215cec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/llmcompressor/datasets/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def _make_sampler(args: DatasetArguments, dataset: Dataset) -> Sampler:
260260
start, end = _get_partition_start_end(
261261
num_samples, dist.get_rank(), dist.get_world_size()
262262
)
263-
dataset = dataset[start:end]
263+
dataset = dataset.select(range(start, end))
264264

265265
if num_samples is not None and num_samples > len(dataset):
266266
logger.warning(

0 commit comments

Comments
 (0)