Skip to content

Conversation

@sanggusti
Copy link
Contributor

@sanggusti sanggusti commented Oct 14, 2025

Fixes #685

Add `configure_logging` to `debugger.py`
  • 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?

Featured #685 to add support for easy logging with configure_logging for the entire library with sensible defaults.

How to use:

from litdata.debugger import configure_logging

configure_logging()

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 🙃
Me: lol

@tchaton
Copy link
Collaborator

tchaton commented Oct 14, 2025

Hey @sanggusti. Would you mind adding a bit more info to the description. Also, it seems the tests are failing.

@sanggusti
Copy link
Contributor Author

hi @tchaton.

it was a import-time error where I tried to call configure_logging directly at __init__.py like how example at litserve does the configure_logging but it fails on 2 tests. It makes caplog at test_dataset.py::test_streaming_dataset_max_cache_dir and test_reader.py::test_get_folder_size no longer capture message from the tests. So I drop it.

for now it's tested on test_debugger.py but not implemented at dataset.py or reader.py

@codecov
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

❌ Patch coverage is 82.14286% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 80%. Comparing base (e69fdd0) to head (421cef3).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@         Coverage Diff         @@
##           main   #736   +/-   ##
===================================
- Coverage    80%    80%   -0%     
===================================
  Files        52     52           
  Lines      7330   7344   +14     
===================================
+ Hits       5868   5876    +8     
- Misses     1462   1468    +6     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Add support for easy logging setup with sensible defaults

2 participants