num_proc=0 behave like None and clarify num_proc documentation in .map()
MEMBER
I think we can support num_proc=0 and make it equivalent to `None` to make it simpler
2025-07-30T15:46:03Z
https://github.com/huggingface/datasets/pull/7702#issuecomment-3136895555
https://api.github.com/repos/huggingface/datasets/issues/7702
IC_kwDODunzps66-TpD
https://api.github.com/repos/huggingface/datasets/issues/comments/3136895555/reactions
2025-07-30T15:46:03Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3136895555
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
NONE
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_7702). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
2025-07-30T15:47:46Z
https://github.com/huggingface/datasets/pull/7702#issuecomment-3136901002
https://api.github.com/repos/huggingface/datasets/issues/7702
IC_kwDODunzps66-U-K
https://api.github.com/repos/huggingface/datasets/issues/comments/3136901002/reactions
2025-07-30T15:47:46Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3136901002
https://avatars.githubusercontent.com/u/99929124?v=4
https://api.github.com/users/HuggingFaceDocBuilderDev/events{/privacy}
https://api.github.com/users/HuggingFaceDocBuilderDev/followers
https://api.github.com/users/HuggingFaceDocBuilderDev/following{/other_user}
https://api.github.com/users/HuggingFaceDocBuilderDev/gists{/gist_id}
https://github.com/HuggingFaceDocBuilderDev
HuggingFaceDocBuilderDev
U_kgDOBfTMJA
https://api.github.com/users/HuggingFaceDocBuilderDev/orgs
https://api.github.com/users/HuggingFaceDocBuilderDev/received_events
https://api.github.com/users/HuggingFaceDocBuilderDev/repos
https://api.github.com/users/HuggingFaceDocBuilderDev/starred{/owner}{/repo}
https://api.github.com/users/HuggingFaceDocBuilderDev/subscriptions
User
https://api.github.com/users/HuggingFaceDocBuilderDev
public
CONTRIBUTOR
> I think we can support num_proc=0 and make it equivalent to `None` to make it simpler

Thank you @lhoestq for reviewing it. Please let me know if anything needs to be updated further.
2025-07-31T05:27:19Z
https://github.com/huggingface/datasets/pull/7702#issuecomment-3138604518
https://api.github.com/repos/huggingface/datasets/issues/7702
IC_kwDODunzps67E03m
https://api.github.com/repos/huggingface/datasets/issues/comments/3138604518/reactions
2025-07-31T05:27:19Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3138604518
https://avatars.githubusercontent.com/u/84439872?v=4
https://api.github.com/users/tanuj-rai/events{/privacy}
https://api.github.com/users/tanuj-rai/followers
https://api.github.com/users/tanuj-rai/following{/other_user}
https://api.github.com/users/tanuj-rai/gists{/gist_id}
https://github.com/tanuj-rai
tanuj-rai
MDQ6VXNlcjg0NDM5ODcy
https://api.github.com/users/tanuj-rai/orgs
https://api.github.com/users/tanuj-rai/received_events
https://api.github.com/users/tanuj-rai/repos
https://api.github.com/users/tanuj-rai/starred{/owner}{/repo}
https://api.github.com/users/tanuj-rai/subscriptions
User
https://api.github.com/users/tanuj-rai
public
Fixes issue #7700

This PR makes num_proc=0 behave like None in Dataset.map(), disabling multiprocessing.
It improves UX by aligning with DataLoader(num_workers=0) behavior.
The num_proc docstring is also updated to clearly explain valid values and behavior.

@SunMarc
