Repository navigation
Update dependency datasets to v5 - autoclosed - #14663
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.1.0 in pyproject.toml. Feedback highlights that this major version upgrade could break internal imports in weather/trainer.py, and recommends refactoring those imports to use the public API to ensure compatibility.
| version = "1.0.0" | ||
| dependencies = [ | ||
| "datasets==4.0.0", | ||
| "datasets==5.1.0", |
There was a problem hiding this comment.
Upgrading datasets to a new major version (5.1.0) can introduce breaking changes, especially for internal imports. In weather/trainer.py (lines 22-23), Dataset and DatasetDict are imported from internal modules (datasets.arrow_dataset and datasets.dataset_dict). These internal paths are subject to change or removal in major releases. It is highly recommended to update those imports to use the public API: from datasets import Dataset, DatasetDict to ensure compatibility and long-term maintainability.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
==4.0.0→==5.1.0Release Notes
huggingface/datasets (datasets)
v5.1.0Compare Source
New Formats
Dataset Features
Other improvements and bug fixes
deepcopybottleneck in state_dict() by @yuxin00j in #8387_consolidatetype numpy scalars by @Yonghui-Lee in #8665New Contributors
Full Changelog: huggingface/datasets@5.0.1...5.1.0
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:
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.