Closed surajpaib closed 3 months ago
The recent changes enhance clarity and error handling across various components of the system. Key updates include renaming the directory
parameter to path
in the LighterFileWriter
class, improving its semantic meaning. In dynamic imports, a more user-friendly logging approach replaces prior error-raising behavior. Adjustments in configuration files streamline definitions, and integration tests have been expanded to cover new functionality, thereby improving robustness and maintainability of the codebase.
Files | Change Summary |
---|---|
lighter/callbacks/writer/file.py |
Renamed directory parameter to path in LighterFileWriter . Added validation in write method for valid directory paths. |
lighter/utils/dynamic_imports.py |
Updated import_module_from_path to log a warning if a module is already imported, replacing the prior ValueError . |
projects/cifar10/experiments/monai_bundle_prototype.yaml |
Changed key from directory to path for LighterFileWriter configuration, improving semantic clarity. |
tests/integration/test_cifar.py |
Added test and predict method names to the test_trainer_method , expanding the testing scope without altering existing configuration structures. |
tests/integration/test_overrides.yaml |
Removed line setting trainer#callbacks to null , simplifying the configuration and allowing for default behavior in callback management during training. |
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
In the code, a path we find,
A rabbit's hop, a leap of mind.
With warnings clear and tests so bright,
We write our code, a joyful sight!
Hooray for changes, letβs all cheer,
For every bug we've banished here! πβ¨
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?
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