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

[Fix] fix assertion at RandomChoiceResize #2450

Merged
merged 3 commits into from
Nov 23, 2022

Conversation

xiexinch
Copy link
Contributor

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

Fix the problem of assertion and arguments don't match

Modification

  • mmcv/transforms/processing.py

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.

@CLAassistant
Copy link

CLAassistant commented Nov 23, 2022

CLA assistant check
All committers have signed the CLA.

@zhouzaida zhouzaida linked an issue Nov 23, 2022 that may be closed by this pull request
@@ -1063,7 +1063,7 @@ def __init__(
self.scales = scales
else:
self.scales = [scales]
assert mmengine.is_list_of(self.scales, tuple)
assert mmengine.is_list_of(self.scales, (tuple, int))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be better to use is_seq_of

@zhouzaida zhouzaida merged commit b852c1c into open-mmlab:2.x Nov 23, 2022
tyomj pushed a commit to tyomj/mmcv that referenced this pull request May 8, 2023
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.

Questions about RandomChoiceResize
4 participants