FIX: fetch covtype dataset concurrent-safe - #23113
Merged
Merged
Conversation
ogrisel
reviewed
Apr 12, 2022
ogrisel
left a comment
Member
There was a problem hiding this comment.
The change LGTM. Could you please document the fix in doc/whats_new/v1.1.rst?
Co-authored-by: Olivier Grisel <[email protected]>
Contributor
Author
|
Done! |
ogrisel
approved these changes
Apr 13, 2022
ogrisel
left a comment
Member
There was a problem hiding this comment.
Thanks for the fix!
I tested it successfully with concurrent workers:
Parallel(n_jobs=4)(delayed(fetch_covtype)() for _ in range(10))after having deleted by $HOME/scikit_learn_data folder and everything is fine.
jjerphan
pushed a commit
to jjerphan/scikit-learn
that referenced
this pull request
Apr 29, 2022
Co-authored-by: Olivier Grisel <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
Fixes #23048.
What does this implement/fix? Explain your changes.
When fetching the dataset, write the data files to a temporary first, then atomically rename to their target location. (similar to #21833)
This approach avoids trouble with concurrent runs and partially written data.
Any other comments?
It looks like most dataset fetchers don't currently implement a mechanism like this. Would it be worthwhile to apply the same procedure to the others? If so, would separate PRs be prefered or do I tack it on to this one?