huggingface / datasets

🤗 The largest hub of ready-to-use datasets for ML models with fast, easy-to-use and efficient data manipulation tools
https://huggingface.co/docs/datasets
Apache License 2.0
19.29k stars 2.7k forks source link

Feature Request: Add functionality to pass split types like train, test in DatasetDict.map #7240

Open jp1924 opened 1 month ago

jp1924 commented 1 month ago

Hello datasets!

We often encounter situations where we need to preprocess data differently depending on split types such as train, valid, and test.

However, while DatasetDict.map has features to pass rank or index, there's no functionality to pass split types. Therefore, I propose adding a 'with_splits' parameter to DatasetDict, which would allow passing the split type through fn_kwargs.