pypi / datasets
datasets
What changed in datasets 4 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
14 breaking3 security45 new APIs and options2 performance12 behavior and defaults1 tooling78 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initdatasets 576 changes
Breaking changes 7
Loading pickled pandas dataframes is removed.
Duplicate fields are rejected instead of silently overwriting data.
Rejects a non-callable generator supplied in GeneratorConfig.
External links in HDF5 files are now disallowed.
Batched mapping raises an error when output lengths do not match.
The default shuffling mechanism now uses multiple input shards; pass max_buffer_input_shards=1 to restore the old mechanism.
None values in Json columns remain real nulls instead of being converted to the string "null".
Security 3
Fixes archive path checking that allowed paths to escape into sibling directories.
Fixes arbitrary file writes caused by following symlinks during archive extraction.
Hugging Face Datasets folder-based builders allow path traversal through file_name metadata
New APIs and options 21
The meshfolder builder accepts .gltf files.
Adds BioSequence as a decodable feature for biological sequence data.
Adds BioStructure as a decodable feature for biological structures.
Adds lightweight support for the FASTA file format.
Adds lightweight support for the FASTQ file format.
Adds support for GenBank files containing biological sequence data.
Adds support for mmCIF files containing macromolecular structures.
Adds lightweight support for PDB files.
Adds a strategy argument for splitting iterable datasets by node.
Datasets can now be backed by the Vortex file format.
Supports batched=True when converting a Dataset to a dictionary.
Adds support for Droid agent traces.
Adds support for Hermes traces.
Apache Iceberg format is now supported.
Streaming datasets now support composed splits.
A dataset format loader now supports CoNLL-2003, CoNLL-2000, and CoNLL-U files.
Batch rows by the values of a specified column, enabling batches such as grouped robotics episodes.
Dataset.to_sql now accepts a num_proc argument.
Agent traces can now be loaded and parsed to messages for training, using the optional teich dependency.
3D mesh support and the MeshFolder builder are now available.
A packaged builder now supports TsFile (Apache IoTDB) in per-device wide format.
Performance 2
Image, audio, video, and other folder datasets support fast streaming decode.
JSON export of indexed datasets is faster.
Behavior and default changes 3
The 3D Mesh feature accepts .gltf files.
Importing datasets no longer imports aiohttp.
num_shards can now exceed dataset.num_shards when pushing an iterable dataset to the Hub.
Fixes and other changes 40
Default accumulation no longer causes full downloads.
Batched map works on a dataset with an index when the function returns a table.
large_string and string_view storage is cast.
Concatenation after split_dataset_by_node no longer gives every rank all the data.
Loading indices buffers is fixed.
Taking more elements than available no longer raises IndexError.
Exporting empty datasets preserves headers and document structure.
Deleting a feature updates only the touched column.
Setting a feature updates only the touched column.
Doubled quotes in qualifier values are unescaped.
Mixed-type JSON fields with slashes in their names are handled.
The JSON loader defensively recovers invalid Arrow tables.
Fixes silent data loss when
num_procis greater thannum_shards.Saving works when a batch holds more than 2GB of image or audio files.
Active iterators are preserved when threaded decoding is reconfigured.
BioSequence and BioStructure records are decoded with universal newlines.
Advances a user-supplied generator even when shuffle uses a cache hit.
Fixes handling of fixed-size binary data.
Fixes inverted spans for minus-strand multi-exon GenBank locations.
Shuffling iterable datasets now preserves source shards.
Fixes filtering iterable datasets using arrow, pandas, and polars formats.
Fixes pushing iterable datasets when their features are unknown.
Fixed-shape ArrayXD columns with nulls keep integers on the Python read path.
Validates Arrow IPC record batches.
Preserves on_bad_lines and encoding_errors on pandas 2.0–2.2.
Resuming twice no longer resets the dataloader.
Dataset fingerprints no longer depend on Arrow chunking.
Calling batch(by_column=...) no longer crashes after shard, shuffle, or split operations.
Fixes column dropping in the Arrow path for axis=1 concatenation.
Decodes Json() columns when converting a Dataset to pandas.
Removed splits are no longer left in the dataset card after pushing to the Hub.
Rebatches the Arrow source before formatting to prevent data loss when resuming.
Schema inference now works for JSON files that start with a UTF-8 BOM.
Fixes authentication for Lance.
Fixes casting a nullable LargeList to a different inner type.
Flat numeric columns with nulls remain numeric in numpy format.
Preserves nullable integer columns when exporting to JSON, CSV, or SQL.
Fixes streaming for traces.
Fixes skipping over full Arrow blocks in iterable datasets.
A fix addresses Parquet streaming hangs at the end of a script.
datasets 479 changes
Breaking changes 7
DatasetInfo no longer includes a files list.
Python 3.9 is no longer supported.
TMPDIR is treated as a strict API and failures are raised.
List is introduced as the list feature type, with an optional fixed length.
Sequence is no longer a type; it becomes a utility that returns a List or a dict depending on the subfeature.
Torchcodec replaces soundfile for audio decoding and decord for video decoding, and can stream only the requested audio or video ranges. It requires torch>=2.7.0 and FFmpeg >= 4; it is not available for Windows yet.
The trust_remote_code option is no longer supported.
New APIs and options 24
IterableDataset gains more Arrow-native iterable operations.
Adds max_shard_size; using it requires iterating twice to determine the full dataset size.
Load raw data from HF Storage Buckets using a bucket path or an hf:// path, then process it and publish the result to a Dataset Repo.
Accepts
on_mixed_types="use_json"to automatically useJson()for mixed types in.from_dict(),.from_list()and.map().Adds a feature type for storing arbitrary JSON objects, including mixed types and dictionaries with arbitrary keys, in datasets.
Adds more IterableDataset.from_* methods, including Polars LazyFrame support.
Resplits an iterable dataset's shards when possible; for Parquet, it shards per row group instead of per file.
Lance datasets infer Image, Video and Audio feature types from blobs.
Adds support for pandas 3.
Lance datasets, including metadata and manifests, and standalone .lance files are supported.
Adds support for inspect_ai eval logs.
Adds visualization support for Nifti data and replaces papaya with niivue.
Nifti1ImageWrapper now supports lazy loading.
Adds the num_channels option to select how many audio channels to use, including mono or stereo.
Adds Nifti support for loading medical imaging datasets from the Hub or disk.
from_generator now supports a custom fingerprint.
HDF5 files can now be streamed.
Features now support pyarrow's binary view.
Audio data is loaded as an AudioDecoder, which provides sample access methods; the old array and sampling_rate syntax remains supported.
Column objects provide lazy column access, including iteration over IterableDataset column values and loading a single cell without bringing the full column into memory.
Video decoding can stream only frames in the requested range.
Dataset and IterableDataset push_to_hub now accept num_proc for parallel uploads.
IterableDataset now supports pushing streaming datasets to the Hub.
Video data is loaded as a VideoDecoder, with methods to access individual frames or frames in a range.
Behavior and default changes 9
Empty structs use the Json type.
Glob patterns in archives are better supported, including patterns in hf:// archive paths.
Polars can now be imported in map().
push_to_hub() now supports datasets with Video types.
Adds basic support for more Hugging Face URLs.
JSON string columns now support null values.
Image, audio and video blobs are written as-is in Parquet, enabling cross-format Xet deduplication and faster uploads and downloads.
batch_fn is now picklable, allowing it to be used where pickling is required.
Workers keep the hffs cache while streaming, helping enable large-scale distributed dataset streaming.
Tooling 1
Adds type overloads to improve static type inference for load_dataset.
Fixes and other changes 38
Batching for table-formatted datasets is fixed.
Json() values are decoded before DataFrame.to_json() is called.
Remote files are no longer embedded when preparing downloads to parquet.
Resume state for iterable map is fixed.
JSON types are decoded before to_dict is called.
JSON types are decoded before to_list is called.
Fixed a regression when loading JSON where one file contains one object.
Support for the latest torchvision version was added.
Fixes the split_dataset_by_node step.
Fixed double yields in formatted Arrow iteration.
Improves the error message for invalid data_files pattern formats.
Fixes null filling for columns missing from JSONL data.
Fixes are included for load_dataset_builder kwargs.
Multiprocessed pushes on macOS now use spawn instead of fork, fixing a segfault.
Fixes are included for to_pandas.
Fixes are included for videofolder.
Bad files are no longer extracted.
Handles nested null types in feature alignment when using multi-process map.
Preserves features when chaining
filter()on a typedIterableDataset.Stabilizes tokenizer fingerprinting, enabling map cache reuse.
Sorts metadata extensions to make their handling deterministic.
Uses
num_examplesinstead oflen(self)for iterable dataset split information.Removes a temporary file during push to hub.
from_generator now supports empty shards.
Fixes interleave_datasets with the all_exhausted_without_replacement strategy.
Fixes an index error involving a low but large example.
Invalid revision values are raised early when calling load_dataset.
Fixes add_column erroneously requiring the new_fingerprint parameter.
Fixes add_item erroneously requiring the new_fingerprint parameter.
Streaming retries for 504 and 429 responses are better.
Fixes an issue with columns when using a transform.
Adds support for fsspec 2025.10.0.
Fixes random seed handling in interleave_datasets.
Adds support for Python 3.14.
Fixes random seed handling on shuffle.
Resolves the ValueError raised when creating an array while avoiding a copy.
Opening an hf file is retried, improving reliability when streaming datasets.
Fixes casting image columns to Polars.