Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces IM2Deep 2.0 API, a major refactoring from version 1.2.0 to 2.0.0-beta. The changes modernize the codebase with comprehensive test coverage, refactored architecture using PyTorch Lightning, and an improved API design with better separation of concerns.
Changes:
- Complete API refactoring with new modular structure (core, calibration, model_ops, constants)
- Added comprehensive test suite with 9 test modules covering ~90% of functionality
- Replaced DeepLC-based models with native PyTorch Lightning implementations
- Updated dependencies: removed version constraint on deeplc, added torch and lightning as core dependencies
- Enhanced CLI with better argument handling and profiling support
Reviewed changes
Copilot reviewed 27 out of 36 changed files in this pull request and generated 29 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/* | New comprehensive test suite with fixtures, unit tests, and integration tests |
| pytest.ini | Pytest configuration with markers for integration and slow tests |
| pyproject.toml | Updated dependencies: removed deeplc constraint and er extras, added torch/lightning |
| im2deep/utils.py | Major expansion with input parsing, validation, CCS conversion, and CLI utilities |
| im2deep/_model_ops.py | New file for PyTorch model loading and prediction operations |
| im2deep/core.py | New high-level API with predict() and predict_and_calibrate() functions |
| im2deep/constants.py | New file centralizing model paths, configurations, and physical constants |
| im2deep/calibration.py | Refactored calibration with abstract base class and LinearCCSCalibration implementation |
| im2deep/_architecture.py | New file with PyTorch Lightning model architectures (IM2Deep, IM2DeepMulti, IM2DeepMultiTransfer) |
| im2deep/_exceptions.py | Minor formatting improvements to exception classes |
| im2deep/main.py | Major CLI refactor with DefaultCommandGroup, improved argument handling, and profiling |
| im2deep/init.py | Updated to version 2.0.0-beta with new API exports |
| README.md | Comprehensive documentation update with CLI examples and API usage |
| .github/workflows/test.yml | New CI/CD workflow for automated testing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.