-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Backward merge #2535 from 1.x
into dev-1.x
#2546
Conversation
Merge MMSegmentation 1.x development branch dev-1.x to main branch 1.x for v1.0.0rc2
## Motivation A few functions in the following files: - `decode_head.py` - `encoder_decoder.py` - `cascade_encoder_decoder.py` have a return type annotation as `List[Tensor]` whereas their actual return type is `Tensor`. This can be seen by following the trace of what each functions return internally, which eventually leads to `seg_logits: Tensor`. This type annotation is misleading and confusing when a user is trying to read and understand the code. ## Modification 1. Fix type annotations from `List[Tensor]` to `Tensor`. 2. Make a return type more specific from `list` to `SampleList`. ## Checklist - [x] Pre-commit or other linting tools are used to fix the potential lint issues. - _I've fixed all linting/pre-commit errors._ - [x] The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness. - _This involves only changing type annotations, so there is no need for tests._ - [x] If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDet or MMDet3D. - _I don't think this change affects MMDet or MMDet3D._ - [ ] The documentation has been modified accordingly, like docstring or example tutorials. - _This change fixes existing type annotations, so it may require a change in the documentation/docstring that I don't have access to._
Codecov ReportBase: 83.33% // Head: 83.32% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## dev-1.x #2546 +/- ##
===========================================
- Coverage 83.33% 83.32% -0.02%
===========================================
Files 143 145 +2
Lines 8127 8510 +383
Branches 1211 1274 +63
===========================================
+ Hits 6773 7091 +318
- Misses 1165 1208 +43
- Partials 189 211 +22
Flags with carried forward coverage won't be shown. Click here to find out more.
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. |
Thanks a lot! I should have reviewed the pr more carefully |
…2546) ## Motivation This is essentially open-mmlab#2535 that I had intended to submit to the `dev-1.x` branch but accidentally submitted it directly to the `1.x` branch (apologies!). This also got approved possibly because the core devs also didn't realize this. The problem is that now `1.x` and `dev-1.x` are out of sync -- the changes introduced by open-mmlab#2535 will never be reflected in `dev-1.x`. ## Modification I'm proposing this "backward-merge" so that `1.x` and `dev-1.x` can be in sync again. If you look at "files changed", they are exactly the changes introduced by open-mmlab#2535. Co-authored-by: MeowZheng <[email protected]>
Motivation
This is essentially #2535 that I had intended to submit to the
dev-1.x
branch but accidentally submitted it directly to the1.x
branch (apologies!). This also got approved possibly because the core devs also didn't realize this.The problem is that now
1.x
anddev-1.x
are out of sync -- the changes introduced by #2535 will never be reflected indev-1.x
.Modification
I'm proposing this "backward-merge" so that
1.x
anddev-1.x
can be in sync again. If you look at "files changed", they are exactly the changes introduced by #2535.