mmagic
mmagic copied to clipboard
[Enhancement] Adopt `BaseModule` for some models
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:
- [x] BigGAN
- [x] CycleGAN
- [x] DCGAN
- [x] DIC
- [x] ESRGAN
- [x] FLAVR
- [x] GCA
- [x] GGAN
- [x] Pix2Pix
- [x] SinGAN
- [x] PE-SinGAN
- [x] SAGAN
- [x] TOF
- [x] 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:
- [x] I have read and followed the workflow indicated in the CONTRIBUTING.md to create this PR.
- [x] Pre-commit or linting tools indicated in CONTRIBUTING.md are used to fix the potential lint issues.
- [x] Bug fixes are covered by unit tests, the case that causes the bug should be added in the unit tests.
- [x] New functionalities are covered by complete unit tests. If not, please add more unit test to ensure the correctness.
- [x] 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.
- [x] CLA has been signed and all committers have signed the CLA in this PR.
Codecov Report
Patch coverage: 57.71%
and project coverage change: -0.07%
:warning:
Comparison is base (
05fa17e
) 82.31% compared to head (f2c07b5
) 82.24%.
:exclamation: 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%) |
:arrow_down: |
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%) |
:arrow_down: |
mmagic/models/editors/dcgan/dcgan_discriminator.py | 69.76% <23.52%> (-23.42%) |
:arrow_down: |
mmagic/models/editors/dcgan/dcgan_generator.py | 82.45% <28.57%> (-12.63%) |
:arrow_down: |
mmagic/models/archs/patch_disc.py | 86.84% <44.44%> (-0.66%) |
:arrow_down: |
...agic/models/editors/cyclegan/cyclegan_generator.py | 86.84% <44.44%> (-0.66%) |
:arrow_down: |
mmagic/models/editors/pix2pix/pix2pix_generator.py | 81.48% <44.44%> (-8.52%) |
:arrow_down: |
...agic/models/editors/biggan/biggan_discriminator.py | 88.31% <77.27%> (+11.30%) |
:arrow_up: |
mmagic/models/editors/biggan/biggan_generator.py | 89.05% <86.36%> (+5.37%) |
:arrow_up: |
mmagic/models/editors/dic/dic_net.py | 98.75% <100.00%> (ø) |
|
... and 12 more |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.