-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
pytorch 2: TypedStorage is deprecated #5862
Comments
Can I use |
rijobro
changed the title
python 3.11 TypedStorage is deprecated
pytorch 2: TypedStorage is deprecated
Jan 17, 2023
I basically followed this method and the expected behaviour is mainly tested here MONAI/tests/test_meta_tensor.py Lines 523 to 536 in 6803061
ForkingPickler can dump and load metatensors.
feel free to update it for the latest API |
wyli
pushed a commit
that referenced
this issue
Jan 17, 2023
Fixes #5862. ### Description if `untyped_storage()` is present (pytorch 2) use it, else use `storage()`. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Richard Brown <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
With pytorch 2, I'm getting lots of instances of this warning:
/home/rbrown/miniconda3/envs/py3.11/lib/python3.11/site-packages/torch/_tensor.py:1287: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly. To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage()
ret = func(*args, **kwargs)
The only usage of
torch.storage()
is here, so I suspect that's the problem. @wyli I see you added the code, can we do without it or modify it?The text was updated successfully, but these errors were encountered: