Skip to content

[Bug] datasets>=4.6 removes ShufflingConfig, causing flame.data import failure #53

@ruhai-lin

Description

@ruhai-lin

Describe the Bug

The current dependency constraint for datasets is loose so newer versions such as datasets==4.8.5 may be installed. In that version, ShufflingConfig can no longer be imported from datasets, which causes flame/data.py to fail on import:

ImportError: cannot import name 'ShufflingConfig' from 'datasets'

and crashes the training process.

Suggested local fix:

pip install "datasets==4.5.0"

easy dependency fix:

Pin datasets in pyproject.toml to:

datasets == 4.5.0

which is the last version supports ShufflingConfig.

Steps to Reproduce the Bug

Install a newer datasets version, for example:

pip install "datasets==4.8.5"

Then run:
python - <<'PY'
import flame.data
PY
Actual result:

ImportError: cannot import name 'ShufflingConfig' from 'datasets'

This also causes training to fail during startup when flame.data is imported.

Expected Behavior

flame.data should import successfully with the dependency versions allowed by pyproject.toml.

Environment Information

  1. Torch: 2.12.0+cu130
  2. Triton: 3.7.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions