Skip to content

compatible with New Config in mmpretrain.apis.get_model - #1868

Open
youqingxiaozhua wants to merge 2 commits into
open-mmlab:mainfrom
youqingxiaozhua:main
Open

compatible with New Config in mmpretrain.apis.get_model#1868
youqingxiaozhua wants to merge 2 commits into
open-mmlab:mainfrom
youqingxiaozhua:main

Conversation

@youqingxiaozhua

Copy link
Copy Markdown
Contributor

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:

  • Pre-commit or other linting tools are used to fix the potential lint issues.
  • Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests.
  • The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • The documentation has been modified accordingly, like docstring or example tutorials.

After PR:

  • If the modification has potential influence on downstream or other related projects, this PR should be tested with those projects, like MMDet or MMSeg.
  • CLA has been signed and all committers have signed the CLA in this PR.

@codecov

codecov Bot commented Jan 22, 2024

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.77%. Comparing base (89eaa92) to head (121ff32).
⚠️ Report is 140 commits behind head on main.

Files with missing lines Patch % Lines
mmpretrain/apis/model.py 60.00% 1 Missing and 1 partial ⚠️
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    17062     +2366     
- Misses       2046     9496     +7450     
- Partials      501      622      +121     
Flag Coverage Δ
unittests 62.77% <60.00%> (-22.46%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant