Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #6 +/- ##
==================================
+ Coverage 89% 94% +5%
==================================
Files 4 6 +2
Lines 62 69 +7
==================================
+ Hits 55 65 +10
+ Misses 7 4 -3 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Refactors RF-DETR+’s model-weight asset handling to align with the rfdetr >=1.4.3 asset structure, introducing a structured registry while keeping the legacy download mapping available for compatibility.
Changes:
- Added
rfdetr_plus.assets.ModelWeights(backed byrfdetr.assets.model_weights) to centrally define filenames, URLs, and MD5 hashes for platform-licensed weights. - Deprecated the legacy
PLATFORM_MODELSmapping by generating it fromModelWeightsto preserve backward compatibility. - Bumped the
rfdetrdependency requirement to>=1.4.3,<2.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/rfdetr_plus/models/downloads.py |
Replaces hard-coded legacy mapping with a derived dictionary from ModelWeights (keeps compatibility). |
src/rfdetr_plus/assets/model_weights.py |
Introduces the new ModelWeights registry enum with filename/url/md5 metadata. |
src/rfdetr_plus/assets/__init__.py |
Exposes ModelWeights as the public entry point for the assets module. |
pyproject.toml |
Updates rfdetr minimum version to ensure upstream asset APIs are available. |
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.
This pull request introduces a new asset management system for RF-DETR+ model weights, aligning with the updated asset structure in
rf-detrversion 1.4.3. The changes add a newModelWeightsenum for platform-licensed models, update dependencies, and deprecate the old download dictionary in favor of the new approach. These updates make it easier and more robust to reference and manage model weights in the codebase.Asset management improvements:
ModelWeightsenum inrfdetr_plus.assets.model_weightsthat inherits fromModelWeightsBaseand provides structured access to platform-licensed model weights, including filenames, URLs, and MD5 hashes. This improves compatibility and maintainability for large-scale models.rfdetr_plus.assetsmodule with an__init__.pythat exposesModelWeightsfor use throughout the codebase.Dependency updates:
rfdetrdependency version inpyproject.tomlto>=1.4.3,<2to ensure compatibility with the new asset structure.Backward compatibility and deprecation:
PLATFORM_MODELSdictionary inrfdetr_plus/models/downloads.py, replacing it with a dynamically generated dictionary based on the newModelWeightsenum, while maintaining backward compatibility.