-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix #130
Conversation
WalkthroughThe recent changes enhance clarity and error handling across various components of the system. Key updates include renaming the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant LighterFileWriter
participant DynamicImports
participant Trainer
User->>LighterFileWriter: Initialize with path
LighterFileWriter->>LighterFileWriter: Validate path
LighterFileWriter->>User: Confirm successful initialization
User->>DynamicImports: Import module
alt Module already imported
DynamicImports-->>User: Log warning
else New module
DynamicImports-->>User: Proceed with import
end
User->>Trainer: Start training
Trainer->>Trainer: Execute callbacks
Trainer-->>User: Training complete
Poem
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 Configuration 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: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (5)
- lighter/callbacks/writer/file.py (2 hunks)
- lighter/utils/dynamic_imports.py (1 hunks)
- projects/cifar10/experiments/monai_bundle_prototype.yaml (1 hunks)
- tests/integration/test_cifar.py (1 hunks)
- tests/integration/test_overrides.yaml (1 hunks)
Files skipped from review due to trivial changes (2)
- projects/cifar10/experiments/monai_bundle_prototype.yaml
- tests/integration/test_overrides.yaml
Additional comments not posted (6)
tests/integration/test_cifar.py (2)
19-22
: LGTM! The addition of the "test" method name enhances test coverage.The changes are consistent with the existing structure and improve the robustness of the test suite.
24-27
: LGTM! The addition of the "predict" method name enhances test coverage.The changes are consistent with the existing structure and improve the robustness of the test suite.
lighter/utils/dynamic_imports.py (1)
69-70
: LGTM! Replacing theValueError
with a logging warning improves robustness.The change allows the function to handle previously imported modules gracefully, enhancing the user experience.
lighter/callbacks/writer/file.py (3)
23-23
: LGTM! Renamingdirectory
topath
improves semantic clarity.The new parameter name better reflects its purpose.
30-31
: LGTM! The constructor update is consistent with the parameter rename.The changes ensure that the base class receives the correctly named argument.
52-53
: LGTM! Adding a validation check for the directory path enhances error handling.The check ensures that the provided path is a valid directory, preventing potential runtime errors.
Ah, sorry, thanks man. I feel like it has to be a little testathon otherwise there are always more pressing tasks 😅 |
@ibro45
LighterFileWriter
broke because of changes toLighterBaseWriter
I've added some more tests to check
test
andpredict
functionality.I think we should take time to write a more extensive test suite in the near future so we don't break functionality without knowledge.
Summary by CodeRabbit
New Features
Bug Fixes
directory
topath
for improved clarity in file writing settings.Tests
Chores