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

Backward merge #2535 from 1.x into dev-1.x #2546

Merged
merged 5 commits into from
Feb 1, 2023
Merged

Backward merge #2535 from 1.x into dev-1.x #2546

merged 5 commits into from
Feb 1, 2023

Conversation

siddancha
Copy link
Contributor

@siddancha siddancha commented Jan 31, 2023

Motivation

This is essentially #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 #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 #2535.

MeowZheng and others added 5 commits December 6, 2022 17:11
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._
@siddancha siddancha marked this pull request as ready for review January 31, 2023 16:13
@codecov
Copy link

codecov bot commented Jan 31, 2023

Codecov Report

Base: 83.33% // Head: 83.32% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (fafce87) compared to base (534b27b).
Patch coverage: 80.34% of modified lines in pull request are covered.

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

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     
Flag Coverage Δ
unittests 83.32% <80.34%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
mmseg/apis/inference.py 0.00% <0.00%> (ø)
mmseg/datasets/transforms/formatting.py 88.88% <0.00%> (-8.09%) ⬇️
mmseg/models/decode_heads/decode_head.py 93.85% <ø> (ø)
mmseg/models/segmentors/cascade_encoder_decoder.py 91.48% <ø> (ø)
mmseg/models/segmentors/encoder_decoder.py 90.08% <ø> (ø)
mmseg/utils/__init__.py 100.00% <ø> (ø)
mmseg/utils/misc.py 87.50% <0.00%> (-7.96%) ⬇️
mmseg/models/decode_heads/mask2former_head.py 89.83% <50.00%> (+0.17%) ⬆️
mmseg/models/decode_heads/maskformer_head.py 93.84% <50.00%> (+0.09%) ⬆️
mmseg/utils/class_names.py 83.82% <50.00%> (-2.12%) ⬇️
... and 13 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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MeowZheng
Copy link
Collaborator

Thanks a lot! I should have reviewed the pr more carefully

@MeowZheng MeowZheng merged commit 698dee9 into open-mmlab:dev-1.x Feb 1, 2023
@siddancha siddancha deleted the backward-merge-1.x branch February 1, 2023 06:41
aravind-h-v pushed a commit to aravind-h-v/mmsegmentation that referenced this pull request Mar 27, 2023
nahidnazifi87 pushed a commit to nahidnazifi87/mmsegmentation_playground that referenced this pull request Apr 5, 2024
…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]>
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.

None yet

3 participants