mmpretrain
mmpretrain copied to clipboard
compatible with New Config in `mmpretrain.apis.get_model`
Motivation
In the new config setting, the type value will change from str to class. Modify the get_model function to adopt class value.
Modification
If the type value in the config is a class, use the class directly.
BC-breaking (Optional)
Does the modification introduce changes that break the backward compatibility of the downstream repositories? If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.
No.
Use cases (Optional)
If this PR introduces a new feature, it is better to list some use cases here and update the documentation.
No.
Checklist
Before PR:
- [x] Pre-commit or other linting tools are used to fix the potential lint issues.
- [x] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests.
- [x] The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
- [x] The documentation has been modified accordingly, like docstring or example tutorials.
After PR:
- [x] If the modification has potential influence on downstream or other related projects, this PR should be tested with those projects, like MMDet or MMSeg.
- [x] CLA has been signed and all committers have signed the CLA in this PR.
Codecov Report
Attention: 1 lines in your changes are missing coverage. Please review.
Comparison is base (
89eaa92) 85.22% compared to head (a3ffe2e) 62.77%. Report is 139 commits behind head on main.
:exclamation: Current head a3ffe2e differs from pull request most recent head 121ff32. Consider uploading reports for the commit 121ff32 to get more accurate results
| Files | Patch % | Lines |
|---|---|---|
| configs/hivit/hivit-tiny-p16_16xb64_in1k.py | 50.00% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #1868 +/- ##
===========================================
- Coverage 85.22% 62.77% -22.46%
===========================================
Files 229 375 +146
Lines 17243 27180 +9937
Branches 2707 4310 +1603
===========================================
+ Hits 14696 17063 +2367
- Misses 2046 9496 +7450
- Partials 501 621 +120
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 62.77% <96.00%> (-22.46%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.