Repository navigation
Update dependency datasets to v5 [SECURITY] - autoclosed - #14660
renovate-bot wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the datasets dependency from version 4.0.0 to 5.0.1 in pyproject.toml. The review comment correctly points out that this major version upgrade introduces breaking changes that will cause import errors in weather/trainer.py, and provides a clear recommendation to use the public API instead.
| version = "1.0.0" | ||
| dependencies = [ | ||
| "datasets==4.0.0", | ||
| "datasets==5.0.1", |
There was a problem hiding this comment.
Upgrading to datasets==5.0.1 (v5.x) introduces breaking changes regarding internal module structures. In weather/trainer.py, the imports from datasets.arrow_dataset and datasets.dataset_dict will fail with an ImportError because these internal modules have been reorganized or removed in v5. Please update the imports in weather/trainer.py to use the public API: from datasets import Dataset, DatasetDict.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
==4.0.0→==5.0.1Hugging Face Datasets folder-based builders allow path traversal through file_name metadata
CVE-2026-66007 / GHSA-379c-qx7v-6h59
More information
Details
Datasets through 5.0.0, fixed in f989ef9, contains a path traversal vulnerability in folder-based dataset builders where the file_name metadata field is not properly validated before being joined to the dataset directory. Attackers can supply crafted file_name values with directory traversal sequences to read arbitrary local files, which are then embedded into output when save_to_disk or push_to_hub is called.
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
huggingface/datasets (datasets)
v5.0.1Compare Source
Bug fixes
Docs
New Contributors
Full Changelog: huggingface/datasets@5.0.0...5.0.1
v5.0.0Compare Source
Datasets Features
Agent traces
Parse Agent traces messages for SFT using
teichby @lhoestq in #8232teichlibrary (new optional dependency), traces are parsed tomessagesto enable training on traces using e.g.trlNext-level shuffling in streaming mode
Use multiple input shards for shuffle buffer by @lhoestq in #8194
before👎:

after✨:

toy example comparison
before👎:
after✨:
Note:
ds.state_dict()andds.load_state_dict()are still supported for this improved shuffling :) enabling dataset checkpointingNote 2: it uses threads to fetch the first examples in parallel from the input shards
Note 3: This is a BREAKING CHANGE: the default shuffling mechanism now uses multiple input shards. You can get the old mechanism by passing
max_buffer_input_shards=1toIterableDataset.shuffle()New batching features for robotics datasets
Add batch(by_column=...) by @lhoestq in #8172
New supported formats
.conll/.conlludataset format loader (CoNLL-2003 / 2000 / U) by @CrypticCortex in #8219Other improvements and bug fixes
num_procargument toDataset.to_sqlby @EricSaikali in #7791ClassLabeldocs: Correct value for unknown labels by @l-uuz in #7645New Contributors
Full Changelog: huggingface/datasets@4.8.5...5.0.0
v4.8.5Compare Source
Main bug fixes
Other improvements and bug fixes
New Contributors
Full Changelog: huggingface/datasets@4.8.4...4.8.5
v4.8.4Compare Source
What's Changed
Full Changelog: huggingface/datasets@4.8.3...4.8.4
v4.8.3Compare Source
What's Changed
Full Changelog: huggingface/datasets@4.8.2...4.8.3
v4.8.2Compare Source
What's Changed
Full Changelog: huggingface/datasets@4.8.1...4.8.2
v4.8.1Compare Source
What's Changed
Full Changelog: huggingface/datasets@4.8.0...4.8.1
v4.8.0Compare Source
Dataset Features
Read (and write) from HF Storage Buckets: load raw data, process and save to Dataset Repos by @lhoestq in #8064
This also fixes multiprocessed push_to_hub on macos that was causing segfault (now it uses spawn instead of fork).
And it bumps
dillandmultiprocessversions to support python 3.14Datasets streaming iterable packaged improvements and fixes by @Michael-RDev in #8068
max_shard_sizeto IterableDataset.push_to_hub (but requires iterating twice to know the full dataset twice - improvements are welcome)zip://*.jsonl::hf://datasets/username/dataset-name/data.zipWhat's Changed
New Contributors
Full Changelog: huggingface/datasets@4.7.0...4.8.0
v4.7.0Compare Source
Datasets Features
Json()type by @lhoestq in #8027Json()type is used to store such data that would normally not be supported in Arrow/ParquetJson()type inFeatures()for any dataset, it is supported in any functions that acceptsfeatures=likeload_dataset(),.map(),.cast(),.from_dict(),.from_list()on_mixed_types="use_json"to automatically set theJson()type on mixed types in.from_dict(),.from_list()and.map()Examples:
You can use
on_mixed_types="use_json"or specifyfeatures=with a [Json] type:This is also useful for lists of dictionaries with arbitrary keys and values, to avoid filling missing fields with None:
Another example with tool calling data and the
on_mixed_types="use_json"argument (useful to not have to specifyfeatures=manually):What's Changed
New Contributors
Full Changelog: huggingface/datasets@4.6.1...4.7.0
v4.6.1Compare Source
Bug fix
Full Changelog: huggingface/datasets@4.6.0...4.6.1
v4.6.0Compare Source
Dataset Features
Support Image, Video and Audio types in Lance datasets
Push to hub now supports Video types
Write image/audio/video blobs as is in parquet (PLAIN) in
push_to_hub()by @lhoestq in #7976Add
IterableDataset.reshard()by @lhoestq in #7992Reshard the dataset if possible, i.e. split the current shards further into more shards.
This increases the number of shards and the resulting dataset has num_shards >= previous_num_shards.
Equality may happen if no shard can be split further.
The resharding mechanism depends on the dataset file format:
What's Changed
transformers v5andhuggingface_hub v1by @hanouticelina in #7989New Contributors
Full Changelog: huggingface/datasets@4.5.0...4.6.0
v4.5.0Compare Source
Dataset Features
Add lance format support by @eddyxu in #7913
What's Changed
revisioninload_datasetby @Scott-Simmons in #7929New Contributors
Full Changelog: huggingface/datasets@4.4.2...4.5.0
v4.4.2Compare Source
Bug fixes
Minor additions
New Contributors
Full Changelog: huggingface/datasets@4.4.1...4.4.2
v4.4.1Compare Source
Bug fixes and improvements
Full Changelog: huggingface/datasets@4.4.0...4.4.1
v4.4.0Compare Source
Dataset Features
Add nifti support by @CloseChoice in #7815
Add num channels to audio by @CloseChoice in #7840
What's Changed
_batch_setitems()by @sghng in #7817New Contributors
Full Changelog: huggingface/datasets@4.3.0...4.4.0
v4.3.0Compare Source
Dataset Features
Enable large scale distributed dataset streaming:
These improvements require
huggingface_hub>=1.1.0to take full effectWhat's Changed
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Never, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.