Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added num_proc parameter for parallel data loading #974

Merged
merged 3 commits into from
Jul 1, 2024
Merged

Conversation

csrajmohan
Copy link
Collaborator

This adds support to pass an optional num_proc parameter in Unitxt loader so that it can be passed onto hf_load_dataset method of Huggingface Datasets library for parallel dataset loading.

p.s.: The num_proc parameter is used to specify the number of processes to use for multiprocessing in the Hugging Face datasets library. This can speed up operations while loading large datasets.
(Tested with wikitq dataset)

@csrajmohan
Copy link
Collaborator Author

csrajmohan commented Jul 1, 2024

Added to LoadHF right now, but can also be added to few other Unitxt loaders like LoadFromIBMCloud, LoadFromSklearn, LoadFromKaggle that invoke hf_load_dataset, if needed.

Copy link

codecov bot commented Jul 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.04%. Comparing base (4d3ea8e) to head (cf3aaa3).
Report is 1 commits behind head on main.

Current head cf3aaa3 differs from pull request most recent head 8a4c149

Please upload reports for the commit 8a4c149 to get more accurate results.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #974   +/-   ##
=======================================
  Coverage   91.03%   91.04%           
=======================================
  Files         110      110           
  Lines       11841    11843    +2     
=======================================
+ Hits        10780    10782    +2     
  Misses       1061     1061           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@elronbandel elronbandel merged commit 8b23418 into main Jul 1, 2024
7 of 8 checks passed
@elronbandel elronbandel deleted the num_proc branch July 1, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants