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

"TypedStorage is deprecated" while Training #330

Closed
MikuAuahDark opened this issue Apr 14, 2023 · 1 comment · Fixed by #336
Closed

"TypedStorage is deprecated" while Training #330

MikuAuahDark opened this issue Apr 14, 2023 · 1 comment · Fixed by #336
Labels
bug Something isn't working

Comments

@MikuAuahDark
Copy link

MikuAuahDark commented Apr 14, 2023

Describe the bug
Spammy "TypedStorage is deprecated" warning on every epoch.

[23:52:12] WARNING  [23:52:12] C:\omited\venv\lib\site-packages\torch\_utils.py:776: UserWarning:        warnings.py:109
                    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()
                      return self.fget.__get__(instance, owner)()

To Reproduce
Simply train a voice.

Additional context
I updated to 3.6.1 today and start seeing the issue. Unfortunately I didn't know what was last good known version.

I'm training a voice using CREPE F0 predictor and using PyTorch 2.0.0 in Windows 11 if that matters.

@MikuAuahDark MikuAuahDark added the bug Something isn't working label Apr 14, 2023
@Lordmau5
Copy link
Collaborator

Lordmau5 commented Apr 14, 2023

From my understanding this is an issue with some library / package that this project is utilizing, as I can't find any usage of tensor.storage() or TypedStorage in general in the code

I don't know which package is using it and if it already has an updated version that uses UntypedStorage instead

This warning can be safely ignored for now as it shouldn't affect training 😁 (at least it doesn't for me)


I noticed that it's spamming it for every DataLoader instance... if you want to disable that warning, change the following line in your venv:

Line 316 in venv\lib\site-packages\torch\storage.py

    warnings.warn(message, UserWarning, stacklevel=stacklevel + 1)

to

    # warnings.warn(message, UserWarning, stacklevel=stacklevel + 1)

It seems this was addressed in the development code for pytorch already here:
pytorch/pytorch#97207
pytorch/pytorch@fbc803d

It hasn't been included in a new release, however, meaning we have to wait for 2.0.1.

The alternative would be to suppress the warning for the TypedStorage deprecation for the time being.

I'll quickly spin up a pull request for that 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants