Skip to content

fix: enable parallel test execution with pytest-xdist in CI workflow #620

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

deependujha
Copy link
Collaborator

@deependujha deependujha commented Jun 11, 2025

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?

What does this PR do?

partial work on #612
follow-up work from #608 and #338

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 🙃

Copy link

codecov bot commented Jun 12, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 25%. Comparing base (6f5b74a) to head (4d730a5).
Report is 1 commits behind head on main.

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

❗ There is a different number of reports uploaded between BASE (6f5b74a) and HEAD (4d730a5). Click for more details.

HEAD has 7 uploads less than BASE
Flag BASE (6f5b74a) HEAD (4d730a5)
unittests 6 4
windows-2022 2 0
3.9 3 1
ubuntu-22.04 2 1
Additional details and impacted files
@@          Coverage Diff          @@
##           main   #620     +/-   ##
=====================================
- Coverage    80%    25%    -55%     
=====================================
  Files        43     43             
  Lines      6462   6464      +2     
=====================================
- Hits       5155   1587   -3568     
- Misses     1307   4877   +3570     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

run: coverage run --source litdata -m pytest tests -v --durations=100
run: |
pip install pytest-xdist
coverage run --source litdata -m pytest tests -v --durations=100 -n auto
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
coverage run --source litdata -m pytest tests -v --durations=100 -n auto
coverage run --source litdata -m pytest tests -v --durations=100 -n 2

lets start just with 2 and we can bump the scale later

@@ -556,6 +556,8 @@ def _terminate(self) -> None:
if self.remover and self.remover.is_alive():
self.remover.join()

sleep(5) # Give some buffer time for file creation/deletion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather have loop testing the it was created/deleted

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