Skip to content

In HF Dataprep CLI, infer num_cpus based on what is available.#31

Merged
artemru merged 2 commits into
mainfrom
mattsetzler/infer_cpus
Dec 15, 2025
Merged

In HF Dataprep CLI, infer num_cpus based on what is available.#31
artemru merged 2 commits into
mainfrom
mattsetzler/infer_cpus

Conversation

@mattsetz

Copy link
Copy Markdown
Contributor

Why?

Currently the HF dataprep example script uses 10 cores for parallel-processing. But this won't work in all environments. Eg on GoogleCollab notebook this stalls out because there aren't the necessary resources.

How ?

Infer number of available cpus, and use this to determine number of parallel threads for data processing.

Test plan

Run the HF dataprep script on default Collab notebook.

@mattsetz mattsetz requested a review from artemru as a code owner November 19, 2025 15:07
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 19, 2025
@artemru artemru force-pushed the mattsetzler/infer_cpus branch from facabfd to 2bbca52 Compare December 15, 2025 18:22
@artemru artemru merged commit 5688166 into main Dec 15, 2025
2 checks passed
@artemru artemru deleted the mattsetzler/infer_cpus branch December 15, 2025 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants