pytorch
7e91728f - Deprecates calling linspace and logspace without setting steps explicitly (#43860)

Commit
5 years ago
Deprecates calling linspace and logspace without setting steps explicitly (#43860) Summary: **BC-breaking note** This change is BC-breaking for C++ callers of linspace and logspace if they were providing a steps argument that could not be converted to an optional. **PR note** This PR deprecates calling linspace and logspace wihout setting steps explicitly by: - updating the documentation to warn that not setting steps is deprecated - warning (once) when linspace and logspace are called without steps being specified A test for this behavior is added to test_tensor_creation_ops. The warning only appears once per process, however, so the test would pass even if no warning were thrown. Ideally there would be a mechanism to force all warnings, include those from TORCH_WARN_ONCE, to trigger. Pull Request resolved: https://github.com/pytorch/pytorch/pull/43860 Reviewed By: izdeby Differential Revision: D23498980 Pulled By: mruberry fbshipit-source-id: c48d7a58896714d184cb6ff2a48e964243fafc90
Author
Mike Ruberry
Parents
Loading