Skip to content

interleave_datasets seed with multiple workers #7567

Open
@jonathanasdf

Description

@jonathanasdf

Describe the bug

Using interleave_datasets with multiple dataloader workers and a seed set causes the same dataset sampling order across all workers.

Should the seed be modulated with the worker id?

Steps to reproduce the bug

See above

Expected behavior

See above

Environment info

  • datasets version: 3.5.1
  • Platform: macOS-15.4.1-arm64-arm-64bit
  • Python version: 3.12.9
  • huggingface_hub version: 0.30.2
  • PyArrow version: 19.0.1
  • Pandas version: 2.2.3
  • fsspec version: 2024.12.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