chore(logging): replace logging.basicConfig with init_logging#3297
Open
jjolla93 wants to merge 2 commits intohuggingface:mainfrom
Open
chore(logging): replace logging.basicConfig with init_logging#3297jjolla93 wants to merge 2 commits intohuggingface:mainfrom
jjolla93 wants to merge 2 commits intohuggingface:mainfrom
Conversation
Standardize logging configuration in: - src/lerobot/rl/eval_policy.py - src/lerobot/rl/gym_manipulator.py - src/lerobot/cameras/zmq/image_server.py
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title
chore(logging): replace logging.basicConfig with init_logging (3 files)
Type / Scope
Summary / Motivation
Currently, LeRobot's logging uses three inconsistent patterns across the codebase:
logging.basicConfig()calls (3 files) — No multi-GPU support or standardized formattinglogging.info()without module-level loggers (47 files)This PR addresses the first pattern by replacing
logging.basicConfig()with the existinginit_logging()utility function.This is Step 1 of a 5-part effort to standardize all logging across the codebase:
Related issues
What changed
Replace
logging.basicConfig(level=logging.INFO)withinit_logging()in three RL/camera modules:src/lerobot/rl/eval_policy.pysrc/lerobot/rl/gym_manipulator.pysrc/lerobot/cameras/zmq/image_server.pyNo breaking changes — init_logging() is drop-in replacement with enhanced configuration.
How was this tested
All tests pass. No functional changes to logging behavior.
Checklist (required before merge)
pre-commit run -a)pytest)Reviewer notes
AI Assistance Disclosure
This PR was developed with assistance from Claude AI. However:
✅ I have fully understood all proposed changes
✅ I wrote, tested, and verified all code thoroughly (30 tests passing, all pre-commit checks passed)
✅ I reviewed the implementation against LeRobot's architecture and conventions
✅ I ensured backward compatibility with existing code and datasets
✅ All changes are production-ready and well-documented
The AI tool was used to assist with code generation, refactoring suggestions, and initial implementations, but every line has been carefully reviewed and validated by the human contributor before submission.