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

[Enhancement] Adopt BaseModule for some models #1543

Merged
merged 7 commits into from
Jul 27, 2023

Conversation

LeoXing1996
Copy link
Collaborator

@LeoXing1996 LeoXing1996 commented Dec 19, 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

Adopt BaseModule for some models

Modification

Model list:

  • BigGAN
  • CycleGAN
  • DCGAN
  • DIC
  • ESRGAN
  • FLAVR
  • GCA
  • GGAN
  • Pix2Pix
  • SinGAN
  • PE-SinGAN
  • SAGAN
  • TOF
  • WGAN-GP

Who can help? @ them here!

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.

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

Checklist

Before PR:

  • I have read and followed the workflow indicated in the CONTRIBUTING.md to create this PR.
  • Pre-commit or linting tools indicated in CONTRIBUTING.md are used to fix the potential lint issues.
  • Bug fixes are covered by unit tests, the case that causes the bug should be added in the unit tests.
  • New functionalities are covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • The documentation has been modified accordingly, including docstring or example tutorials.

After PR:

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

@LeoXing1996 LeoXing1996 added the kind/enhancement refactoring, improving CI, template, etc. label Dec 19, 2022
@LeoXing1996 LeoXing1996 self-assigned this Dec 19, 2022
Copy link
Collaborator

@plyfager plyfager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering whether init_cfg is the same with the one in MMEngine. Since Configs havn't be modified yet.

@codecov
Copy link

codecov bot commented Dec 22, 2022

Codecov Report

Patch coverage: 57.71% and project coverage change: -0.07% ⚠️

Comparison is base (05fa17e) 82.31% compared to head (f2c07b5) 82.24%.

❗ Current head f2c07b5 differs from pull request most recent head 30f3417. Consider uploading reports for the commit 30f3417 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1543      +/-   ##
==========================================
- Coverage   82.31%   82.24%   -0.07%     
==========================================
  Files         416      416              
  Lines       27966    27955      -11     
  Branches     4375     4372       -3     
==========================================
- Hits        23020    22992      -28     
- Misses       3997     4025      +28     
+ Partials      949      938      -11     
Flag Coverage Δ
unittests 82.24% <57.71%> (-0.07%) ⬇️

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

Files Changed Coverage Δ
mmagic/models/editors/esrgan/rrdb_net.py 94.20% <ø> (ø)
...magic/models/base_models/base_translation_model.py 72.61% <10.52%> (-18.94%) ⬇️
mmagic/models/editors/dcgan/dcgan_discriminator.py 69.76% <23.52%> (-23.42%) ⬇️
mmagic/models/editors/dcgan/dcgan_generator.py 82.45% <28.57%> (-12.63%) ⬇️
mmagic/models/archs/patch_disc.py 86.84% <44.44%> (-0.66%) ⬇️
...agic/models/editors/cyclegan/cyclegan_generator.py 86.84% <44.44%> (-0.66%) ⬇️
mmagic/models/editors/pix2pix/pix2pix_generator.py 81.48% <44.44%> (-8.52%) ⬇️
...agic/models/editors/biggan/biggan_discriminator.py 88.31% <77.27%> (+11.30%) ⬆️
mmagic/models/editors/biggan/biggan_generator.py 89.05% <86.36%> (+5.37%) ⬆️
mmagic/models/editors/dic/dic_net.py 98.75% <100.00%> (ø)
... and 12 more

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

Copy link
Collaborator

@zengyh1900 zengyh1900 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove tests/data/disco_result.png

Z-Fran
Z-Fran previously approved these changes Jan 17, 2023
Z-Fran
Z-Fran previously approved these changes Feb 23, 2023
zengyh1900
zengyh1900 previously approved these changes Feb 23, 2023
@LeoXing1996 LeoXing1996 dismissed stale reviews from Z-Fran and zengyh1900 via 30f3417 July 27, 2023 05:52
@LeoXing1996 LeoXing1996 changed the base branch from dev-1.x to main July 27, 2023 05:52
@zengyh1900 zengyh1900 self-requested a review July 27, 2023 06:15
Copy link
Collaborator

@zengyh1900 zengyh1900 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@zengyh1900 zengyh1900 merged commit c68fdb8 into open-mmlab:main Jul 27, 2023
7 of 8 checks passed
@LeoXing1996 LeoXing1996 deleted the leoxing/basemodule branch July 27, 2023 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement refactoring, improving CI, template, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants