FIX nested backend not changed by SequentialBackend#792
Merged
tomMoral merged 2 commits intojoblib:masterfrom Oct 16, 2018
Merged
FIX nested backend not changed by SequentialBackend#792tomMoral merged 2 commits intojoblib:masterfrom
tomMoral merged 2 commits intojoblib:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #792 +/- ##
==========================================
- Coverage 95.33% 95.33% -0.01%
==========================================
Files 44 44
Lines 6307 6319 +12
==========================================
+ Hits 6013 6024 +11
- Misses 294 295 +1
Continue to review full report at Codecov.
|
ogrisel
approved these changes
Oct 16, 2018
joblib/_parallel_backends.py
Outdated
| return SequentialBackend(nesting_level=nested_level), None | ||
| # SequentialBackend should neither change the nesting level, the | ||
| # default backend or the number of jobs. Just return the current one. | ||
| from .parallel import get_active_backend |
Contributor
There was a problem hiding this comment.
Explain that the local import is to prevent cyclic import issues.
joblib/test/test_parallel.py
Outdated
| def check_nested_backend(expected_backend_type, expected_n_job): | ||
| # Assert that the sequential backend at top level, does not change | ||
| if expected_backend_type is None: | ||
| expected_backend_type = 'loky' |
Contributor
There was a problem hiding this comment.
This if block can be removed as the expected_backend_type is never None.
yarikoptic
added a commit
to yarikoptic/joblib
that referenced
this pull request
Apr 12, 2019
* tag '0.13.0': Release 0.13.0 Use https (joblib#805) MTN bump loky to 2.4.2 (joblib#804) DOC: provide some useful variables for Makefile (joblib#794) DOC serialization and processes (joblib#803) ENH update loky 2.4.0 (joblib#802) FIX backward compatibility for nested backend (joblib#789) enable python 3.7 (joblib#795) memory: add test for call_and_shelve performance (joblib#791) FIX nested backend not changed by SequentialBackend (joblib#792) cloudpickle 0.6.0 (joblib#788) FIX nested backend setting n_jobs=-1 (joblib#785) Raises a more explicit exception when a corrupted MemorizedResult is loaded (joblib#768) Back to dev mode
yarikoptic
added a commit
to yarikoptic/joblib
that referenced
this pull request
Apr 12, 2019
* releases: Release 0.13.0 Use https (joblib#805) MTN bump loky to 2.4.2 (joblib#804) DOC: provide some useful variables for Makefile (joblib#794) DOC serialization and processes (joblib#803) ENH update loky 2.4.0 (joblib#802) FIX backward compatibility for nested backend (joblib#789) enable python 3.7 (joblib#795) memory: add test for call_and_shelve performance (joblib#791) FIX nested backend not changed by SequentialBackend (joblib#792) cloudpickle 0.6.0 (joblib#788) FIX nested backend setting n_jobs=-1 (joblib#785) Raises a more explicit exception when a corrupted MemorizedResult is loaded (joblib#768) Back to dev mode
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.
The nested backend in
SequentialBackendshould not be changed as we do not got deeper in the nesting. This causes issue for libraries that relies onParalleleven whenn_jobs=1, with subsequent nested calls (see eg scikit-learn/scikit-learn#12389 ).This PR should fix this and test the behavior.