n_jobs parameter in instantiation of Parallel should be an integer#1549
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1549 +/- ##
==========================================
- Coverage 95.16% 95.09% -0.07%
==========================================
Files 44 44
Lines 7562 7567 +5
==========================================
Hits 7196 7196
- Misses 366 371 +5 ☔ View full report in Codecov by Sentry. |
|
Thanks for the PR @androids-electric-sheep, can you give a bit more context about what is the current behavior, does it fail if it's not an int ? (what about n_jobs=3.0, n_jobs="3"). So we know if the PR is about generating a better, earlier error message, or actually add constraints on the input type that didn't exist before. |
|
From the issue this PR is based on, and reproduced locally using the example code provided, if a float is provided to the n_jobs parameter slicing will later fail because it requires an int. So it's a combination of both really, adding the type constraint and then providing a more understandable error message if it's violated |
|
Hello! Thanks for the PR! We are trying to make a release by Friday so I changed the PR directly and made the test cover more cases. |
|
The failure in the CI is unrelated, merging this PR. |
Based on #1539