Skip to content

Conversation

@rittik9
Copy link
Collaborator

@rittik9 rittik9 commented Oct 26, 2025

Refactor DDP test to use spawn context for process management.

What does this PR do?

Fixes #<issue_number>
image
Use mp.get_context('spawn') instead of mp.spawn in tests to prevent module reimport.

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--3298.org.readthedocs.build/en/3298/

Refactor DDP test to use spawn context for process management.
pre-commit-ci bot and others added 3 commits October 26, 2025 07:47
@codecov
Copy link

codecov bot commented Oct 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 31%. Comparing base (fd967c0) to head (0847a6c).

❌ Your project check has failed because the head coverage (31%) is below the target coverage (95%). You can increase the head coverage or adjust the target coverage.

❗ There is a different number of reports uploaded between BASE (fd967c0) and HEAD (0847a6c). Click for more details.

HEAD has 680 uploads less than BASE
Flag BASE (fd967c0) HEAD (0847a6c)
gpu 2 0
unittest 2 0
Windows 22 2
cpu 186 17
python3.12 44 4
torch2.8.0+cpu 33 3
torch2.0.1+cpu 33 3
python3.10 131 12
torch2.8.0 11 1
macOS 32 3
Linux 132 12
torch2.7.1+cpu 22 2
torch2.4.1+cpu 11 1
torch2.2.2+cpu 11 1
torch2.0.1 21 2
torch2.5.1+cpu 11 1
torch2.1.2+cpu 11 1
torch2.6.0+cpu 11 1
torch2.3.1+cpu 11 1
python3.9 11 1
Additional details and impacted files
@@           Coverage Diff            @@
##           master   #3298     +/-   ##
========================================
- Coverage      37%     31%     -6%     
========================================
  Files         364     349     -15     
  Lines       20096   19901    -195     
========================================
- Hits         7520    6196   -1324     
- Misses      12576   13705   +1129     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rittik9 rittik9 marked this pull request as draft October 26, 2025 09:21
@rittik9
Copy link
Collaborator Author

rittik9 commented Oct 26, 2025

@Borda @SkafteNicki @justusschock for now can we revert these two prs #3166
#3162 until we fix the test failures in new CI even though they passed in old azure CI?

After reverting we can merge all the pending ready prs.

@Borda
Copy link
Collaborator

Borda commented Oct 26, 2025

You can revert it in this PR and continue in fixing and then re-add it also with this PR

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 this pull request may close these issues.

2 participants