getkeops / keops

KErnel OPerationS, on CPUs and GPUs, with autodiff and without memory overflows
https://www.kernel-operations.io
MIT License
1.03k stars 65 forks source link

Missing imports in the pykeops v2.0b3 package (beta version) #232

Closed jeanfeydy closed 2 years ago

jeanfeydy commented 2 years ago

Hi @joanglaunes, @bcharlier,

Unfortunately, the latest beta package seems to be broken. On Google Colab, running:

!pip install pykeops==2.0b3
import pykeops
pykeops.clean_pykeops()

fails with:

[KeOps] Compiling cuda jit compiler engine ... OK
[pyKeOps] Compiling nvrtc binder for python ... OK
[KeOps] /root/.cache/keops2.0b3/build has been cleaned.
[KeOps] Compiling cuda jit compiler engine ... OK
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
[<ipython-input-3-8ba0ccbcc3b3>](https://localhost:8080/#) in <module>()
----> 1 pykeops.clean_pykeops()
      2 pykeops.test_numpy_bindings()
      3 pykeops.test_torch_bindings()

[/usr/local/lib/python3.7/dist-packages/pykeops/__init__.py](https://localhost:8080/#) in clean_pykeops(recompile_jit_binaries)
     46 def clean_pykeops(recompile_jit_binaries=True):
     47     keopscore.clean_keops(recompile_jit_binary=recompile_jit_binaries)
---> 48     keops_binder = pykeops.common.keops_io.keops_binder
     49     for key in keops_binder:
     50         keops_binder[key].reset()

NameError: name 'pykeops' is not defined

I assume that this can be fixed with a simple import in __init__.py, but I wonder when this bug was introduced on the main branch, and if other parts of the package were affected. What do you think?

See you soon, Jean

joanglaunes commented 2 years ago

It is fixed now in main. Sorry about it, I think it was due to my updates two days ago (merging branch imports_fix).

jeanfeydy commented 2 years ago

Hi @joanglaunes,

Thanks! Could @bcharlier maybe release a 2.0b4 package (without forgetting to fix the keopscore version issue, if this is still needed) and I will try this as soon as possible?

See you soon, Jean

joanglaunes commented 2 years ago

Yes the 2.0b4 version is arriving in a few minutes...

bcharlier commented 2 years ago

I just upload it on pypi...

jeanfeydy commented 2 years ago

Thanks!