Skip to content

Conversation

@pmeier
Copy link
Contributor

@pmeier pmeier commented Feb 13, 2023

Addresses #7215 (comment). There is no general issue with the tests, but rather missing sample inputs for perspective_bounding_box. We only tested with coefficients=..., but left startpoints=endpoints=None:

def sample_inputs_perspective_bounding_box():
for bounding_box_loader in make_bounding_box_loaders():
yield ArgsKwargs(
bounding_box_loader, bounding_box_loader.format, None, None, coefficients=_PERSPECTIVE_COEFFS[0]
)

This means we never hit never hit this branch

elif startpoints is not None and endpoints is not None:
return _get_perspective_coeffs(startpoints, endpoints)

Meaning, the test suite never noticed that we passed garbage there. I've added tests for passing startpoints and endpoints explicitly. Without the fix in this PR, the bounding box test would now fail.

cc @vfdev-5 @bjuncek

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

Thanks Philip

@pmeier pmeier merged commit 2489f37 into pytorch:main Feb 13, 2023
@pmeier pmeier deleted the ci-datapoints-dispatch branch February 13, 2023 10:58
facebook-github-bot pushed a commit that referenced this pull request Mar 28, 2023
Reviewed By: vmoens

Differential Revision: D44416261

fbshipit-source-id: ac7c6b974876948a38df23a6373b3b785772377e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants