-
Notifications
You must be signed in to change notification settings - Fork 2
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
Make checkpoint loading more informative. Remove incorrect Metric type check. Make TableWriter expect a path instead of dir. #126
Conversation
WalkthroughThe recent updates enhance the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Outside diff range and nitpick comments (3)
lighter/callbacks/writer/table.py (1)
19-19
: The parameter description forpath
in the docstring should specify that it can be a path to a file or directory, not just a CSV filepath.lighter/callbacks/writer/base.py (2)
24-24
: The description forpath
in the docstring should clarify that it can refer to either a file or a directory.
Line range hint
5-5
: Remove the unused import ofdatetime.datetime
.- from datetime import datetime
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- lighter/callbacks/writer/base.py (2 hunks)
- lighter/callbacks/writer/table.py (3 hunks)
- lighter/system.py (1 hunks)
- lighter/utils/model.py (1 hunks)
Additional context used
Ruff
lighter/callbacks/writer/base.py
5-5:
datetime.datetime
imported but unused (F401)Remove unused import:
datetime.datetime
Additional comments not posted (5)
lighter/callbacks/writer/table.py (2)
25-26
: The constructor now correctly initializesself.path
instead ofself.directory
. This change aligns with the PR's objective to makeTableWriter
expect a path.
70-70
: Ensure that the CSV file creation handles exceptions, such as potential write permissions issues or disk space limitations.lighter/callbacks/writer/base.py (1)
28-29
: Initialization ofself.path
is now correctly aligned with the new constructor parameter. This change supports the handling of both file and directory paths.lighter/utils/model.py (1)
101-108
: The updated error handling provides more informative messages about mismatches in state dictionaries. This enhancement aligns with the PR's objective to make checkpoint loading more informative.lighter/system.py (1)
Line range hint
1-1
: The filelighter/system.py
has been significantly refactored to enhance flexibility and modularity. The changes support dynamic method definitions and improved error handling, aligning with the PR's objectives.
Description
Time for v0.0.3 #118
Related Issue
#125
#121
#90
Type of Change
Checklist
CODE_OF_CONDUCT.md
document.CONTRIBUTING.md
guide.make codestyle
.Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Improvements