Migrating to Datasets 3.4.0
Version 3.4.0 introduces 1 breaking change. This guide details how to update your code.
Released: 3/14/2025
1
Breaking Changes
2
Migration Steps
6
Affected Symbols
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
decordtorchvisionIterableDataset.decodeDatasetDict.mapstring_to_dictVideoBreaking Changes
●Issue #1
Replaced `decord` with `torchvision` for reading videos in folder-based builders due to `decord` being unmaintained and incompatible with recent Python versions. Users should update video loading logic to use `torchvision`.
Migration Steps
- 1If you were using `decord` for video loading, be aware that it has been replaced by `torchvision`. Check the video dataset loading documentation for details on the new loading mechanism.
- 2For faster streaming of image/audio/video folders from Hugging Face, consider using the new `dataset.decode(num_threads=num_threads)` method.
Release Summary
This release introduces significant performance improvements for folder-based dataset building, including Parquet support and faster streaming via multithreading in `IterableDataset.decode`. A major breaking change involves replacing `decord` with `torchvision` for video loading.
Need More Details?
View the full release notes and all changes for Datasets 3.4.0.
View Full Changelog