Repository navigation
Reject a pre_dispatch below one - #1839
Merged
Nanored4498 merged 7 commits intoSep 15, 2026
Merged
Conversation
Parallel(n_jobs=2, pre_dispatch=0) returned an empty list: the amount is fed straight into islice, so nothing was ever dispatched and the caller got no results and no error for work they asked to run. A negative value surfaced an islice error about sys.maxsize instead. batch_size next to it already refuses a non-positive value, so this follows the same shape and reports the expression as it was passed.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1839 +/- ##
==========================================
- Coverage 94.15% 94.12% -0.04%
==========================================
Files 46 46
Lines 8145 8152 +7
==========================================
+ Hits 7669 7673 +4
- Misses 476 479 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Nanored4498
reviewed
Aug 25, 2026
Nanored4498
left a comment
Contributor
There was a problem hiding this comment.
Thanks for this PR. Just a few comments. Then I think it could be merged.
Contributor
|
Thanks for the modifications. Could you add a brief note in the |
…hChandan/joblib into pr/RavSinghChandan/1839
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.
Parallel(n_jobs=2, pre_dispatch=0)returns an empty list:The amount is fed straight into
islice, so nothing is ever dispatched and the caller gets no results and no error for work they asked to run. A negative value surfaces anisliceerror aboutsys.maxsizeinstead, which says nothing about the argument that was passed.batch_sizenext to it already refuses a non-positive value, so this follows the same shape and reports the expression as it was passed (so'0*n_jobs'is echoed rather than the0it evaluated to).Reverting the change fails the four new tests