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

Fix #416: Fix undesired assignment to "pretrained" in test.py #418

Merged
merged 2 commits into from
Aug 10, 2021

Conversation

gaotongxiao
Copy link
Collaborator

Some models no longer accept pretrained parameter in their constructors and use init_cfg to initialize themselves instead. But test.py still passes None to pretrained whichever the model is being tested. So I added a simple check to skip this step.

Also fixed a linting problem.

@gaotongxiao gaotongxiao linked an issue Aug 10, 2021 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Aug 10, 2021

Codecov Report

Merging #418 (80a0437) into main (f62b451) will decrease coverage by 0.09%.
The diff coverage is n/a.

❗ Current head 80a0437 differs from pull request most recent head c38a4d9. Consider uploading reports for the commit c38a4d9 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #418      +/-   ##
==========================================
- Coverage   82.35%   82.25%   -0.10%     
==========================================
  Files         137      137              
  Lines        9260     9260              
  Branches     1322     1322              
==========================================
- Hits         7626     7617       -9     
- Misses       1336     1345       +9     
  Partials      298      298              
Flag Coverage Δ
unittests 82.25% <ø> (-0.10%) ⬇️

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

Impacted Files Coverage Δ
mmocr/utils/ocr.py 0.00% <ø> (ø)
mmocr/models/textrecog/convertors/seg.py 91.78% <0.00%> (-2.74%) ⬇️
mmocr/datasets/pipelines/transforms.py 80.36% <0.00%> (-1.16%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f62b451...c38a4d9. Read the comment docs.

@cuhk-hbsun cuhk-hbsun merged commit 532e8f8 into open-mmlab:main Aug 10, 2021
@gaotongxiao gaotongxiao deleted the fix branch August 17, 2021 03:34
gaotongxiao added a commit to gaotongxiao/mmocr that referenced this pull request Jul 15, 2022
…py (open-mmlab#418)

* fix ocr linting

* fix undesired assignment to pretrained key
gaotongxiao added a commit to gaotongxiao/mmocr that referenced this pull request Jul 15, 2022
…py (open-mmlab#418)

* fix ocr linting

* fix undesired assignment to pretrained key
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.

Testing with a KIE Model in in the MMOCR_Tutorial.ipynb
2 participants