Closed dellis23 closed 1 year ago
Actually, it looks like the readme inside the functorch directory in pytorch also recommends installing from pip
: https://github.com/pytorch/pytorch/tree/master/functorch#install
What are the versions of PyTorch and torchaudio that you are using?
We've updated the installation instructions to document how to use functorch from pytorch as per your feedback. Please see https://pytorch.org/functorch/stable/install.html . In general the runtime crashing is likely due to a version mismatch between PyTorch, functorch, torchaudio.
I was installing functorch
into a vanilla colab instance. See here: https://gist.github.com/dellis23/61bdd9b93ba3d577e73739af8f4f82a9
It looks like the version requirements for functorch
are incompatible with torchaudio
(and torchtext
and torchvision
)?
Note that this also happens even after running the following after installing:
get_ipython().kernel.do_shutdown(True)
Colab has PyTorch 1.12.1 installed by default. The newest released PyTorch and functorch is 1.13.0, but colab does not install those by default yet. Attempting an upgrade of the PyTorch in colab sometimes leads to weirdness in colab. Thank you for pointing this out -- on the functorch side we should just recommend installation of the older version of functorch in our colab install instructions.
The easiest way to use functorch on colab is: in a fresh new colab, pip install functorch==0.2.1
(this is the version of functorch that is compatible with PyTorch 1.12.1). Could you let me know if that doesn't work please?
That seems to crash the session altogether with no error message. See here (though you'll have to execute it to see it happen). Here are screenshots:
"Your session crashed for an unknown reason" is what happens when you execute get_ipython().kernel.do_shutdown(True)
. This is expected. Colab doesn't give a good error message when you restart the kernel.
Are you able to import torchaudio
after ignoring the "Your session crashed for an unknown reason" message?
Ah whoops! You're right, that works. Thanks for the fix. Feel free to do what you want to with this issue. Not sure if you want to leave it open until things are all working on 1.13, or update the docs to mention the specific version installation.
Though the grapevine it sounds like PyTorch 1.13 will be the default in colab soon, so, probably easiest to wait until 1.13 and then we can remove the confusing "crash" in the instructions necessary for installing an external package into colab
Colab now has PyTorch 1.13 installed by default, so closing this issue.
I'm following along with this colab from the functorch installation docs.
After installing and restarting, when I try to import
torchaudio
, the runtime crashes. At first, I got this error:Now, I'm just getting the runtime crashing with no visible error.
I know functorch was merged into pytorch proper, but I don't see any instructions about how to use it from there. Would that fix the issue? If so, should the main docs be updated?