mirror of
https://github.com/pytorch/pytorch.git
synced 2026-11-20 09:04:25 +08:00
a8a44a1aa2
This PR: - adds deprecation warnings when calling the functorch APIs - adds documentation saying that those APIs are deprecated It does this by creating thin wrappers around the original APIs that (1) raise deprecation warnings and (2) have an additional line in their documentation that they are deprecated. NB: - Python surpresses DeprecationWarning, so we use UserWarning instead. Test Plan: - New tests - the functorch.* APIs are still tested for correctness because that's what test/functorch/* use (as opposed to directly calling the torch.func.* APIs) Pull Request resolved: https://github.com/pytorch/pytorch/pull/92279 Approved by: https://github.com/albanD, https://github.com/soulitzer