Skip to content
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

test_nested_parallel_limit fails on 1-core-VM #758

Closed
bmwiedemann opened this issue Aug 25, 2018 · 2 comments · Fixed by #759
Closed

test_nested_parallel_limit fails on 1-core-VM #758

bmwiedemann opened this issue Aug 25, 2018 · 2 comments · Fixed by #759

Comments

@bmwiedemann
Copy link

bmwiedemann commented Aug 25, 2018

While working on reproducible builds for openSUSE, I noticed
that 2 tests would fail on 1-core-VMs (using python-joblib 0.12.1)

_______________________ test_nested_parallel_limit[loky] _______________________

>       assert backend_types_and_levels == expected_types_and_levels
E       AssertionError: assert [('LokyBacken...lBackend', 2)] == [('LokyBackend...lBackend', 3)]

____________________ test_nested_parallel_limit[threading] _____________________        
backend = 'threading'

    @with_multiprocessing
    @parametrize('backend', ['loky', 'threading'])
    def test_nested_parallel_limit(backend):
        with parallel_backend(backend, n_jobs=2):
            backend_types_and_levels = _recursive_backend_info()

        top_level_backend_type = backend.title() + 'Backend'
        expected_types_and_levels = [
            (top_level_backend_type, 0),
            ('ThreadingBackend', 1),
            ('SequentialBackend', 2),
            ('SequentialBackend', 3)
        ]
>       assert backend_types_and_levels == expected_types_and_levels
E       AssertionError: assert [('ThreadingB...lBackend', 2)] == [('ThreadingBa...lBackend', 3)]
@ogrisel
Copy link
Contributor

ogrisel commented Aug 27, 2018

Thanks for the report.

I can reproduce on master with:

$ taskset -c 0 pytest -k test_nested_parallelism_limit

I will investigate.

@bmwiedemann
Copy link
Author

I verified that it also fixes the tests in our 1-core-VMs. Thanks for the quick response 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants