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

tests: skip if pytest.pool not used #2930

Merged

Conversation

martin-kokos
Copy link
Contributor

@martin-kokos martin-kokos commented Feb 1, 2025

What does this PR do?

Fixes failing test when

tests/unittests/bases/test_ddp.py sssssssssssssssF

=================================================================================================================== FAILURES ===================================================================================================================
______________________________________________________________________________________________________ test_sync_with_unequal_size_lists _______________________________________________________________________________________________________

    @pytest.mark.DDP
    @pytest.mark.skipif(not _TORCH_GREATER_EQUAL_2_1, reason="test only works on newer torch versions")
    @pytest.mark.skipif(sys.platform == "win32", reason="DDP not available on windows")
    def test_sync_with_unequal_size_lists():
        """Test that synchronization of states can be enabled and disabled for compute."""
>       pytest.pool.map(_test_sync_with_unequal_size_lists, range(NUM_PROCESSES))
E       AttributeError: module 'pytest' has no attribute 'pool'


tests/unittests/bases/test_ddp.py:346: AttributeError
=========================================================================================================== short test summary info ============================================================================================================
FAILED tests/unittests/bases/test_ddp.py::test_sync_with_unequal_size_lists - AttributeError: module 'pytest' has no attribute 'pool'
Before submitting
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • [] Did you make sure to update the docs?
  • [] Did you write any new necessary tests?
PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃


📚 Documentation preview 📚: https://torchmetrics--2930.org.readthedocs.build/en/2930/

Copy link

codecov bot commented Feb 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36%. Comparing base (520a868) to head (0347709).
Report is 15 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (520a868) and HEAD (0347709). Click for more details.

HEAD has 270 uploads less than BASE
Flag BASE (520a868) HEAD (0347709)
torch2.6.0+cpu 10 2
Windows 15 3
python3.11 20 4
cpu 84 17
torch2.0.1+cpu 15 3
python3.10 44 9
torch2.5.0+cpu 15 3
python3.12 15 3
macOS 20 4
torch2.5.0 5 1
torch2.6.0 5 1
torch2.0.1 10 2
Linux 49 10
torch2.4.1+cpu 10 2
torch2.3.1+cpu 4 1
torch2.1.2+cpu 5 1
torch2.2.2+cpu 5 1
python3.9 5 1
gpu 1 0
unittest 1 0
Additional details and impacted files
@@           Coverage Diff            @@
##           master   #2930     +/-   ##
========================================
- Coverage      69%     36%    -33%     
========================================
  Files         346     332     -14     
  Lines       19146   18996    -150     
========================================
- Hits        13233    6793   -6440     
- Misses       5913   12203   +6290     

@Borda Borda changed the title tests: skip if pytest.pool not used tests: skip if pytest.pool not used Feb 3, 2025
@Borda Borda merged commit c57197e into Lightning-AI:master Feb 3, 2025
55 of 62 checks passed
@mergify mergify bot added the ready label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants