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] Register optimizer constructor with mmseg #1456

Merged
merged 24 commits into from
Apr 16, 2022

Conversation

linfangjian01
Copy link
Contributor

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 to register optimizer constructor directly into mmcv.

Modification

  1. Add mmseg/core/builder.py to register OPTIMIZER_BUILDERS of mmcv.
  2. Change the build_optimizer import from mmcv to mmseg in mmseg/apis/train.py.
  3. Change the OPTIMIZER_BUILDERS import from mmcv to mmseg in mmseg/core/utils/layer_decay_optimizer_constructor.py and mmseg/core/layer_decay_optimizer_constructor.py.

@linfangjian01 linfangjian01 changed the title [fix] register optimizer onstructor with mmseg [fix] register optimizer constructor with mmseg Apr 7, 2022
@linfangjian01 linfangjian01 changed the title [fix] register optimizer constructor with mmseg [Fix] register optimizer constructor with mmseg Apr 7, 2022
@linfangjian01 linfangjian01 changed the title [Fix] register optimizer constructor with mmseg [Fix] Register optimizer constructor with mmseg Apr 7, 2022
@codecov
Copy link

codecov bot commented Apr 7, 2022

Codecov Report

Merging #1456 (bb3548a) into master (23ae1eb) will increase coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1456      +/-   ##
==========================================
+ Coverage   90.24%   90.30%   +0.06%     
==========================================
  Files         139      140       +1     
  Lines        8310     8335      +25     
  Branches     1397     1400       +3     
==========================================
+ Hits         7499     7527      +28     
+ Misses        572      570       -2     
+ Partials      239      238       -1     
Flag Coverage Δ
unittests 90.30% <100.00%> (+0.06%) ⬆️

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

Impacted Files Coverage Δ
mmseg/apis/train.py 19.51% <100.00%> (ø)
mmseg/core/__init__.py 100.00% <100.00%> (ø)
mmseg/core/builder.py 100.00% <100.00%> (ø)
mmseg/core/layer_decay_optimizer_constructor.py 88.63% <100.00%> (+0.26%) ⬆️
...eg/core/utils/layer_decay_optimizer_constructor.py 94.87% <100.00%> (+0.06%) ⬆️
mmseg/models/losses/cross_entropy_loss.py 86.90% <0.00%> (+4.18%) ⬆️

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 23ae1eb...bb3548a. Read the comment docs.

@MeowZheng
Copy link
Collaborator

Please revise the tag [Fix] -> [WIP], as WIP (working in process) means this pr is not ready to review

@linfangjian01 linfangjian01 changed the title [Fix] Register optimizer constructor with mmseg [WIP] Register optimizer constructor with mmseg Apr 8, 2022
@linfangjian01 linfangjian01 changed the title [WIP] Register optimizer constructor with mmseg [Fix] Register optimizer constructor with mmseg Apr 8, 2022
@MeowZheng MeowZheng merged commit 5b605b0 into open-mmlab:master Apr 16, 2022
ZhimingNJ pushed a commit to AetrexTechnology/mmsegmentation that referenced this pull request Jun 29, 2022
* [fix] register optimizer onstructor with mmseg

* fix lint

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* Update tests/test_core/test_optimizer.py

* Update tests/test_core/test_optimizer.py

* Update tests/test_core/test_optimizer.py

* Update tests/test_core/test_optimizer.py

* fix lint

Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>
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