Skip to content

all_exhausted_without_replacement working same as first_exhausted #7954

@prathamk-tw

Description

@prathamk-tw

Describe the bug

from datasets import Dataset, interleave_datasets
d1 = Dataset.from_dict({"a": [0, 1, 2]})
d2 = Dataset.from_dict({"a": [10, 11, 12, 13]})
d3 = Dataset.from_dict({"a": [20, 21, 22]})
dataset = interleave_datasets([d1, d2, d3], stopping_strategy="all_exhausted_without_replacement")
dataset["a"][:100]
[0, 10, 20, 1, 11, 21, 2, 12, 22]

expected output: [0, 10, 20, 1, 11, 21, 2, 12, 22,13]

datasets version 4.5.0

Steps to reproduce the bug

from datasets import Dataset, interleave_datasets
d1 = Dataset.from_dict({"a": [0, 1, 2]})
d2 = Dataset.from_dict({"a": [10, 11, 12, 13]})
d3 = Dataset.from_dict({"a": [20, 21, 22]})
dataset = interleave_datasets([d1, d2, d3], stopping_strategy="all_exhausted_without_replacement")
dataset["a"][:100]

Expected behavior

[0, 10, 20, 1, 11, 21, 2, 12, 22,13]

Environment info

datasets version 4.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions