Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

youqingxiaozhua
Copy link
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.

Copy link

codecov bot commented Jan 22, 2024

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.

❗ 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 ⚠️
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%) ⬇️

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

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

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