-
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
[Types] Fix misleading List[Tensor]
types
#2535
[Types] Fix misleading List[Tensor]
types
#2535
Conversation
This is the return type of predict() which returns postprocess_result()
Codecov ReportBase: 83.40% // Head: 83.40% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## 1.x #2535 +/- ##
=======================================
Coverage 83.40% 83.40%
=======================================
Files 145 145
Lines 8510 8510
Branches 1274 1274
=======================================
Hits 7098 7098
Misses 1198 1198
Partials 214 214
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. |
Looks like I accidentally created this PR for |
## 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. Co-authored-by: MeowZheng <meowzheng@outlook.com>
…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 <meowzheng@outlook.com>
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 isTensor
. This can be seen by following the trace of what each functions return internally, which eventually leads toseg_logits: Tensor
.This type annotation is misleading and confusing when a user is trying to read and understand the code.
Modification
List[Tensor]
toTensor
.list
toSampleList
.Checklist