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 v2.Lambda #7566

Merged
merged 4 commits into from
May 8, 2023
Merged

fix v2.Lambda #7566

merged 4 commits into from
May 8, 2023

Conversation

pmeier
Copy link
Collaborator

@pmeier pmeier commented May 8, 2023

Fixes #7563.

Due to its setup, v2.Lambda needs to evaluate the input type inside _transform. Before this PR, it inherited the _transformed_types from the base class and and thus, it didn't apply to other objects than

_transformed_types: Tuple[Union[Type, Callable[[Any], bool]], ...] = (torch.Tensor, PIL.Image.Image)

cc @vfdev-5

@pytorch-bot
Copy link

pytorch-bot bot commented May 8, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/7566

Note: Links to docs will display an error until the docs builds have been completed.

❌ 4 New Failures

As of commit 66a3e4f:

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

Philip can you add few tests please?

Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Philip !

@pmeier pmeier merged commit 205602a into pytorch:main May 8, 2023
@pmeier pmeier deleted the v2-lambda branch May 8, 2023 20:48
facebook-github-bot pushed a commit that referenced this pull request May 15, 2023
Reviewed By: vmoens

Differential Revision: D45694873

fbshipit-source-id: 7acdb2b0ab401250a90df370eed2e3b310119d5b
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.

torchvision.transforms.v2.Lambda Transform Not Working
3 participants