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

fix import error #64

Open jmlinx opened 8 months ago

jmlinx commented 8 months ago

Importing sklearn resolves the _impl import error on M2 MacBook.

patrick-kidger commented 8 months ago

Signatory shouldn't depend on sklearn at all. I'm not sure where you're getting this from?

jmlinx commented 8 months ago

I used to have an Intel MacBook and signatory v1.2.6.1.9.0 with Python 3.8/3.9 worked well. After I switched to an M2 MacBook, with the same version of signatory and Python, I encountered an import error at line from . import _impl when I tried to import signatory. By chance I once imported sklearn before signatory and everything worked through. It seems to implicitly resolve some dependency issues. Of course, there should be a better way to address this problem.