Feat: configure logging. Add support for easy logging setup with sens…
Fixes #685
Add `configure_logging` to `debugger.py`
- [x] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [x] Did you read the contributor guideline, Pull Request section?
- [x] Did you make sure to update the docs?
- [x] 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
Hey @sanggusti. Would you mind adding a bit more info to the description. Also, it seems the tests are failing.
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 Report
:x: Patch coverage is 82.14286% with 5 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 80%. Comparing base (e69fdd0) to head (421cef3).
:warning: 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
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.