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] CheckpointHook behavior incorrect if given filename_tmpl argument #518

Merged
merged 5 commits into from
Sep 22, 2022

Conversation

C1rN09
Copy link
Collaborator

@C1rN09 C1rN09 commented Sep 8, 2022

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

Fix TypeError when saving checkpoints if is CheckpointHook is constructed with argument filename_tmpl

Modification

  • Add filename_tmpl to CheckpointHook's keyword argument
  • Add more unit tests

BC-breaking (Optional)

No

Use cases (Optional)

Checklist

  • Pre-commit or other linting tools are used to fix the potential lint issues.
  • The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDet or MMCls.
  • The documentation has been modified accordingly, like docstring or example tutorials.

@C1rN09 C1rN09 changed the title [WIP] CheckpointHook behavior incorrect if given filename_tmpl argument [Fix] CheckpointHook behavior incorrect if given filename_tmpl argument Sep 8, 2022
@codecov
Copy link

codecov bot commented Sep 8, 2022

Codecov Report

Base: 77.68% // Head: 77.85% // Increases project coverage by +0.16% 🎉

Coverage data is based on head (26b2352) compared to base (ca0364b).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head 26b2352 differs from pull request most recent head 11b7f7a. Consider uploading reports for the commit 11b7f7a to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #518      +/-   ##
==========================================
+ Coverage   77.68%   77.85%   +0.16%     
==========================================
  Files         116      116              
  Lines        8612     8610       -2     
  Branches     1778     1779       +1     
==========================================
+ Hits         6690     6703      +13     
+ Misses       1623     1609      -14     
+ Partials      299      298       -1     
Flag Coverage Δ
unittests 77.85% <100.00%> (+0.16%) ⬆️

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

Impacted Files Coverage Δ
mmengine/hooks/checkpoint_hook.py 89.94% <100.00%> (+0.10%) ⬆️
mmengine/utils/dl_utils/collect_env.py 44.44% <0.00%> (-0.77%) ⬇️
mmengine/model/averaged_model.py 94.82% <0.00%> (ø)
mmengine/structures/instance_data.py 100.00% <0.00%> (ø)
...engine/model/wrappers/fully_sharded_distributed.py 0.00% <0.00%> (ø)
mmengine/runner/runner.py 86.20% <0.00%> (+0.46%) ⬆️
mmengine/hooks/ema_hook.py 100.00% <0.00%> (+6.66%) ⬆️
mmengine/utils/dl_utils/parrots_wrapper.py 58.82% <0.00%> (+10.29%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ZwwWayne ZwwWayne added this to the 0.2.0 milestone Sep 9, 2022
@ZwwWayne ZwwWayne merged commit c64243a into open-mmlab:main Sep 22, 2022
xcnick pushed a commit to xcnick/mmengine that referenced this pull request Sep 26, 2022
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.

3 participants