Skip to content

Conversation

@pmeier
Copy link
Collaborator

@pmeier pmeier commented Oct 28, 2022

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 28, 2022

🔗 Helpful Links

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

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

❌ 2 Failures

As of commit 2ae120b:

The following jobs have failed:

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

@pmeier pmeier added ciflow/trunk Trigger trunk jobs on your pull request ciflow/periodic Trigger jobs ran periodically on master (periodic.yml) on the PR topic: bc breaking topic category module: python frontend For issues relating to PyTorch's Python frontend labels Oct 28, 2022
pmeier added a commit that referenced this pull request Oct 28, 2022
ghstack-source-id: f38a83a
Pull Request resolved: #87974
@pmeier pmeier added release notes: python_frontend python frontend release notes category and removed module: python frontend For issues relating to PyTorch's Python frontend labels Oct 28, 2022
pmeier added a commit that referenced this pull request Oct 28, 2022
ghstack-source-id: c00ac52
Pull Request resolved: #87974
pmeier added a commit that referenced this pull request Nov 2, 2022
ghstack-source-id: 5b08f32
Pull Request resolved: #87974
@pmeier pmeier marked this pull request as ready for review November 2, 2022 10:26
@@ -1,5 +1,5 @@
"""
This file only exists since `torch.testing.assert_allclose` is deprecated, but used extensively throughout the tests in
This file only exists since `torch.testing.assert_allclose` was removed, but used extensively throughout the tests in
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice doc update

Copy link
Collaborator

@mruberry mruberry left a comment

Choose a reason for hiding this comment

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

Nice to have the deprecations finalized!

@pmeier
Copy link
Collaborator Author

pmeier commented Nov 2, 2022

@pytorchbot merge -f "CI failures are unrelated"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@NicolasHug
Copy link
Member

IIRC pytest is swallowing warnings?

Yeah, this is due to:

-p no:warnings

By default, pytest does show the warnings though. So unless users have manually silenced their pytest warnings (like pytorch), they should have properly seen the deprecation message

@pmeier
Copy link
Collaborator Author

pmeier commented Nov 3, 2022

From #87969 (comment):

Deprecation happened on Feb 25, 2022 in c6f1bbc, which made it into the 1.12 release. Since it is now 245 days later and the next release will be 1.14, the removals later in the stack comply with the BC policy.

The RFC that lead to this deprecation is in #61844.

Was there deprecations warnings that I missed?

If you look at the diff into the deleted file torch.testing._deprecated, you can see that the function emitted a deprecation warning pointing to the RFC I linked above.

@albanD
Copy link
Collaborator

albanD commented Nov 3, 2022

Out of curiosity what would you recommend instead?

tbh I use the direct python test_foo.py locally (with the additional -f -k or -v as needed).
It feels a lot more baremetal and no-magic-added which I prefer (but it is very personal!).

@xuzhao9
Copy link
Contributor

xuzhao9 commented Nov 3, 2022

This PR breaks downstream code such as https://github.com/kornia/kornia/blob/v0.6.8/kornia/testing/__init__.py#L254

@albanD
Copy link
Collaborator

albanD commented Nov 3, 2022

@xuzhao9 sorry about that. I'm a bit confused as the code there seem to imply that this case is only used for PT <1.9 ?

wat3rBro pushed a commit to wat3rBro/d2go that referenced this pull request Nov 3, 2022
Summary:
`assert_close` is preferred over `assert_allclose`: pytorch/pytorch#61844

The `assert_allclose` was removed yesterday in pytorch/pytorch#87974, causing test to fail, eg. https://github.com/facebookresearch/d2go/actions/runs/3389194553/jobs/5632021291

Reviewed By: sstsai-adl

Differential Revision: D41000306

fbshipit-source-id: 8c513a3f570712452367f3210cf3644fb2b94666
@xuzhao9
Copy link
Contributor

xuzhao9 commented Nov 3, 2022

@albanD The authors are aware of this change and is discussing a mitigation: kornia/kornia#1981
The offending line also includes: https://github.com/kornia/kornia/blob/v0.6.8/kornia/testing/__init__.py#L235.

Yes, currently kornia will only work on 1.9 > pytorch >=1.8.1, but it seems authors are working on a fix.

facebook-github-bot pushed a commit to facebookresearch/d2go that referenced this pull request Nov 3, 2022
Summary:
Pull Request resolved: #409

`assert_close` is preferred over `assert_allclose`: pytorch/pytorch#61844

The `assert_allclose` was removed yesterday in pytorch/pytorch#87974, causing test to fail, eg. https://github.com/facebookresearch/d2go/actions/runs/3389194553/jobs/5632021291

Reviewed By: sstsai-adl

Differential Revision: D41000306

fbshipit-source-id: 7bd1cb9d5edf0a4609a909e2283df411bcabdf13
@mehtanirav
Copy link
Contributor

Unfortunately, we need to revert this PR. We have many references to torch.testing.assert_allclose in internal tests that need to be updated before we can re-land this PR.

I will follow up on the task to update all internal reference to torch.testing.assert_allclose and inform @pmeier when it safe to re-land the PR.

@pytorchbot revert -m "Internal breakages from method removal" -c ghfirst

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a revert job. Check the current status here.
Questions? Feedback? Please reach out to the PyTorch DevX Team

@pytorchmergebot
Copy link
Collaborator

@pmeier your PR has been successfully reverted.

pytorchmergebot added a commit that referenced this pull request Nov 4, 2022
This reverts commit 5669e10.

Reverted #87974 on behalf of https://github.com/mehtanirav due to Internal breakages from method removal
@mehtanirav
Copy link
Contributor

cc: @albanD on the revert.

kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Nov 5, 2022
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Nov 5, 2022
This reverts commit 5669e10.

Reverted pytorch#87974 on behalf of https://github.com/mehtanirav due to Internal breakages from method removal
pmeier added a commit that referenced this pull request Dec 1, 2022
After our failed attempt to remove `assert_allclose` in #87974, we decided to add it to the documentation after all. Although we drop the expected removal date, the function continues to be deprecated in favor of `assert_close`.


[ghstack-poisoned]
pmeier added a commit that referenced this pull request Dec 1, 2022
After our failed attempt to remove `assert_allclose` in #87974, we decided to add it to the documentation after all. Although we drop the expected removal date, the function continues to be deprecated in favor of `assert_close`.


[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Dec 1, 2022
After our failed attempt to remove `assert_allclose` in #87974, we decided to add it to the documentation after all. Although we drop the expected removal date, the function continues to be deprecated in favor of `assert_close`.

Pull Request resolved: #89526
Approved by: https://github.com/mruberry
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Dec 10, 2022
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Dec 10, 2022
This reverts commit 5669e10.

Reverted pytorch#87974 on behalf of https://github.com/mehtanirav due to Internal breakages from method removal
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Dec 10, 2022
After our failed attempt to remove `assert_allclose` in pytorch#87974, we decided to add it to the documentation after all. Although we drop the expected removal date, the function continues to be deprecated in favor of `assert_close`.

Pull Request resolved: pytorch#89526
Approved by: https://github.com/mruberry
@facebook-github-bot facebook-github-bot deleted the gh/pmeier/40/head branch June 8, 2023 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/periodic Trigger jobs ran periodically on master (periodic.yml) on the PR ciflow/trunk Trigger trunk jobs on your pull request Merged open source release notes: python_frontend python frontend release notes category Reverted topic: bc breaking topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants