-
Notifications
You must be signed in to change notification settings - Fork 538
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
Run HF dataset processing on local rank 0 first #716
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! lgtm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pytest runs on a single process so hard to test the functionality using unit test. However, I would recommend adding a unit test to test the functionality either in this PR or the next depending on the criticality of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, couple nits:
(1) update the PR title to "only" => "first"? Or "use cached arrow processing results for non-rank-0" ?
(2) add comment to explain the map/filter/load functions are all cached via arrow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I would refactor the barrier structure so all ranks enter the same barrier
@karan6181 @mvpatel2000 @xiaohanzhan-db refactored to not have the confusingly placed barriers. |
@karan6181 @irenedea added more explanatory comments |
Adjust the HF dataset processing code to only process the data on local rank 0. Other ranks will use the cached arrow dataset. This is both much faster than processing on all ranks, and seems to resolve various hangs and crashed we have seen for large datasets.
Manual test that this doesn't affect loss curve in anyway