patrick-kidger / signatory

Differentiable computations of the signature and logsignature transforms, on both CPU and GPU. (ICLR 2021)
Apache License 2.0
261 stars 34 forks source link

Error importing signatory on Colab (undefined symbol error) #54

Open ysl23 opened 1 year ago

ysl23 commented 1 year ago

Hi Patrick,

I'm hoping to use Signatory for a Colab script, but I'm not able to import the package after successfully installing it. The below error message shows up when I try to import:

image

I first installed Torch and then installed Signatory that's compatible with the version of Torch, and the installation is as below:

image

I'm not sure whether this would be related - I also installed the RAPIDS package and seems like it would install a version of Torch during the process. I see two different versions of Torch when I check version using .__version and pip show, as below:

image

I'm only able to uninstall the version 1.9.0 (which I installed separately) using pip uninstall, but I can't uninstall the one that's installed during the RAPIDS installation (1.13.1+cu116).

If you have any suggestions on how I can successfully import Signatory on Colab, I'd really appreciate it. Thanks!

patrick-kidger commented 1 year ago

This is probably due to the PyTorch version 1.13. See also the FAQ regarding undefined symbols.

I don't have any suggestions for how to resolve that I'm afraid.

ysl23 commented 1 year ago

I used

git clone https://github.com/patrick-kidger/signatory.git cd signatory python setup.py install

as documented in https://signatory.readthedocs.io/en/latest/pages/usage/installation.html

It fixed the issue!