You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running one of the example scripts from the command line (either line by line in a python3 shell, or as 'python3 test.py') everything works fine. When running from what I believe to be a properly configured JupyterLab, I get cmake and make errors.
The chosen test script:
import torch
import pykeops.torch as pktorch
x = torch.arange(1, 10, dtype=torch.float32).view(-1, 3)
y = torch.arange(3, 9, dtype=torch.float32).view(-1, 3)
my_conv = pktorch.Genred('SqNorm2(x-y)', ['x = Vi(3)', 'y = Vj(3)'])
print(my_conv(x, y))
The first part of the errors, showing make and cmake errors while python is still running:
Compiling libKeOpstorch91c92bd508 in /root/.cache/pykeops-1.0.2/:
formula: Sum_Reduction(SqNorm2(x-y),1)
aliases: x = Vi(0,3); y = Vj(1,3);
dtype : float32
...
--------------------- CMAKE DEBUG -----------------
Command '['cmake', '/opt/conda/lib/python3.6/site-packages/pykeops', '-DCMAKE_BUILD_TYPE=Release', '-DFORMULA_OBJ=Sum_Reduction(SqNorm2(x-y),1)', '-DVAR_ALIASES=auto x = Vi(0,3); auto y = Vj(1,3); ', '-Dshared_obj_name=libKeOpstorch91c92bd508', '-D__TYPE__=float', '-DPYTHON_LANG=torch', '-DPYTORCH_INCLUDE_DIR=/opt/conda/lib/python3.6/site-packages/torch/include;/opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include']' returned non-zero exit status 1.
-- Configuring incomplete, errors occurred!
--------------------- ----------- -----------------
--------------------- MAKE DEBUG -----------------
Command '['cmake', '--build', '.', '--target', 'libKeOpstorch91c92bd508']' returned non-zero exit status 1.
--------------------- ----------- -----------------
Done.
Followed immediately by the python errors themselves:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
/opt/conda/lib/python3.6/site-packages/pykeops/common/keops_io.py in load_keops(formula, aliases, dtype, lang, optional_flags)
44 # high frequency path
---> 45 return importlib.import_module(dll_name)
46 except ImportError:
/opt/conda/lib/python3.6/importlib/__init__.py in import_module(name, package)
125 level += 1
--> 126 return _bootstrap._gcd_import(name[level:], package, level)
127
/opt/conda/lib/python3.6/importlib/_bootstrap.py in _gcd_import(name, package, level)
/opt/conda/lib/python3.6/importlib/_bootstrap.py in _find_and_load(name, import_)
/opt/conda/lib/python3.6/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)
ModuleNotFoundError: No module named 'libKeOpstorch91c92bd508'
During handling of the above exception, another exception occurred:
ModuleNotFoundError Traceback (most recent call last)
/opt/conda/lib/python3.6/site-packages/pykeops/common/keops_io.py in _safe_compile_and_load(formula, aliases, dll_name, dtype, lang, optional_flags)
28 # already compiled, just load
---> 29 return importlib.import_module(dll_name)
30 except ImportError:
/opt/conda/lib/python3.6/importlib/__init__.py in import_module(name, package)
125 level += 1
--> 126 return _bootstrap._gcd_import(name[level:], package, level)
127
/opt/conda/lib/python3.6/importlib/_bootstrap.py in _gcd_import(name, package, level)
/opt/conda/lib/python3.6/importlib/_bootstrap.py in _find_and_load(name, import_)
/opt/conda/lib/python3.6/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)
ModuleNotFoundError: No module named 'libKeOpstorch91c92bd508'
During handling of the above exception, another exception occurred:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-387377d109a7> in <module>
7
8 my_conv = pktorch.Genred('SqNorm2(x-y)', ['x = Vi(3)', 'y = Vj(3)'])
----> 9 print(my_conv(x, y))
/opt/conda/lib/python3.6/site-packages/pykeops/torch/generic/generic_red.py in __call__(self, backend, device_id, ranges, *args)
311
312 """
--> 313 out = GenredAutograd.apply(self.formula, self.aliases, backend, self.dtype, device_id, ranges, *args)
314 nx, ny = get_sizes(self.aliases, *args)
315 nout = nx if self.axis==1 else ny
/opt/conda/lib/python3.6/site-packages/pykeops/torch/generic/generic_red.py in forward(ctx, formula, aliases, backend, dtype, device_id, ranges, *args)
17 def forward(ctx, formula, aliases, backend, dtype, device_id, ranges, *args):
18
---> 19 myconv = load_keops(formula, aliases, dtype, 'torch', ['-DPYTORCH_INCLUDE_DIR=' + ';'.join(include_dirs)])
20
21 # Context variables: save everything to compute the gradient:
/opt/conda/lib/python3.6/site-packages/pykeops/common/keops_io.py in load_keops(formula, aliases, dtype, lang, optional_flags)
46 except ImportError:
47 # could not import (ie not compiled), safely compile/import
---> 48 return _safe_compile_and_load(formula, aliases, dll_name, dtype, lang, optional_flags)
/opt/conda/lib/python3.6/site-packages/pykeops/common/utils.py in wrapper_filelock(*args, **kwargs)
68 with open(build_folder + '/' + lock_file_name, 'w') as f:
69 with FileLock(f):
---> 70 return func(*args, **kwargs)
71
72 return wrapper_filelock
/opt/conda/lib/python3.6/site-packages/pykeops/common/keops_io.py in _safe_compile_and_load(formula, aliases, dll_name, dtype, lang, optional_flags)
32 # print(dll_name + " not found")
33 compile_generic_routine(formula, aliases, dll_name, dtype, lang, optional_flags)
---> 34 return importlib.import_module(dll_name)
35
36 # create the name from formula, aliases and dtype.
/opt/conda/lib/python3.6/importlib/__init__.py in import_module(name, package)
124 break
125 level += 1
--> 126 return _bootstrap._gcd_import(name[level:], package, level)
127
128
/opt/conda/lib/python3.6/importlib/_bootstrap.py in _gcd_import(name, package, level)
/opt/conda/lib/python3.6/importlib/_bootstrap.py in _find_and_load(name, import_)
/opt/conda/lib/python3.6/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)
ModuleNotFoundError: No module named 'libKeOpstorch91c92bd508'
I will note that after running various test scripts successfully from the command line, the following contents are in /root/.cache/pykeops-1.0.2, which is in the sys.path as printed from the jupyter script.
System:
When running one of the example scripts from the command line (either line by line in a python3 shell, or as 'python3 test.py') everything works fine. When running from what I believe to be a properly configured JupyterLab, I get cmake and make errors.
The chosen test script:
The first part of the errors, showing make and cmake errors while python is still running:
Followed immediately by the python errors themselves:
I will note that after running various test scripts successfully from the command line, the following contents are in /root/.cache/pykeops-1.0.2, which is in the sys.path as printed from the jupyter script.
The text was updated successfully, but these errors were encountered: