-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[Fix]: Remove sampling hardcode. #6317
[Fix]: Remove sampling hardcode. #6317
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6317 +/- ##
==========================================
+ Coverage 61.80% 61.81% +0.01%
==========================================
Files 315 315
Lines 25157 25172 +15
Branches 4185 4186 +1
==========================================
+ Hits 15549 15561 +12
- Misses 8798 8800 +2
- Partials 810 811 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
May also update docs https://mmdetection.readthedocs.io/en/latest/tutorials/customize_losses.html. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* [Fix]: Remove sampling hardcode. * add doc
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
Remove hardcode of determining sampling by loss type.
Resolve #5717 [Bug]: Can not using custom loss when determine sampling by loss type.
Modification
Sampling or not is determined by
sampler
intrain_cfg
now.If there is no
sampler
or settingPseudoSampler
in train_cfg, sampling will be False, otherwise, be True.And to avoid BC-breaking, when
sampler
is set intrain_cfg
, we still keep the loss type logic and raise a warning. These codes will be removed after several versions.BC-breaking (Optional)
Yes. sampling will not be determined by loss type in the future.
Need to check backward compatibility.
Use cases (Optional)
If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.
Checklist