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

Update linspace and logspace to throw an error when steps is not provided #55951

Open
mruberry opened this issue Apr 13, 2021 · 0 comments
Open
Labels
module: deprecation module: tensor creation triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@mruberry
Copy link
Collaborator

mruberry commented Apr 13, 2021

torch.linspace() and torch.logspace() currently throw warnings when not given steps:

torch.linspace(1, 10)
: UserWarning: Not providing a value for linspace's steps is deprecated and will throw a runtime error in a future release. This warning will appear only once per process. (Triggered internally at  ../aten/src/ATen/native/RangeFactories.cpp:20.)

torch.logspace(1, 10)
UserWarning: Not providing a value for logspace's steps is deprecated and will throw a runtime error in a future release. This warning will appear only once per process. (Triggered internally at  ../aten/src/ATen/native/RangeFactories.cpp:51.)

and their documentation also warns that failing to provide steps is deprecated (linspace docs, logspace docs).

We should update these operators to require steps be specified for PyTorch 1.9.

cc @gchanan @mruberry

@mruberry mruberry added triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module module: deprecation module: tensor creation labels Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: deprecation module: tensor creation triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant