fix(optimization_tutorial): replace deprecated ToTensor with v2 transforms#3870
fix(optimization_tutorial): replace deprecated ToTensor with v2 transforms#3870Kadermiyanyedi wants to merge 3 commits intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3870
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 4 PendingAs of commit 4d6b286 with merge base 08435cc ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Hi @Kadermiyanyedi! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
|
Claude finished @sekyondaMeta's task in 1m 49s —— View job Review: PR #3870 vs Issue #3854
SummaryThis PR replaces the deprecated Alignment with Issue #3854Based on the PR description, issue #3854 requests replacing the deprecated
Code ReviewThe change is correct and minimal. The diff is +3/-3 lines, touching only what's necessary. One observation (non-blocking): Other tutorials in the same
Since this PR only targets VerdictLGTM — The change is correct, well-scoped, and addresses the issue as described. The v2 replacement is the canonical approach recommended by torchvision. |
|
@sekyondaMeta Hi, I saw the CI failed, I am not sure why. I just rebased again but still can’t find the problem, could you help me please? |
|
@Kadermiyanyedi The failure seems to not be related to what you did in this PR. But taking a deeper look just tob e sure. |
Fixes #3854
Description
torchvision.transforms.ToTensor()withv2.Compose([v2.ToImage(), v2.ToDtype(torch.float32, scale=True)])inbeginner_source/basics/optimization_tutorial.pyChecklist
cc @subramen @svekars