Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extracting Features "numba.core.errors.UnsupportedRewriteError: Failed in nopython mode pipeline (step: convert to parfors) Only constant step size of 1 is supported for prange" #386

Open
ltaxi opened this issue Aug 29, 2024 · 4 comments

Comments

@ltaxi
Copy link

ltaxi commented Aug 29, 2024

Hello! I've recently installed the newest version of simba and am getting the following error when trying to extract features from dlc tracking/video data--have tried uninstalling/reinstalling, creating a new env and making sure I'm running python 3.6, checking to make sure that my project_folder/logs/video_info.csv file has all the requisite info! I'm at a bit of a loss for what to do moving forward. Any guidance appreciated!

Exception in thread Thread-4:
Traceback (most recent call last):
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\simba\ui\tkinter_functions.py", line 436, in execute_command
cmd(**evaluated_kwargs)
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\simba\SimBA.py", line 719, in run_feature_extraction
feature_extractor_classes = get_bp_config_code_class_pairs()
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\simba\utils\lookups.py", line 99, in get_bp_config_code_class_pairs
from simba.feature_extractors.amber_feature_extractor import
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\simba\feature_extractors\amber_feature_extractor.py", line 10, in
from simba.mixins.circular_statistics import CircularStatisticsMixin
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\simba\mixins\circular_statistics.py", line 9, in
class CircularStatisticsMixin(object):
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\simba\mixins\circular_statistics.py", line 668, in CircularStatisticsMixin
def rao_spacing(data: np.array):
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\numba\core\decorators.py", line 221, in wrapper
disp.compile(sig)
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\numba\core\compiler_lock.py", line 32, in _acquire_compile_lock
return func(*args, **kwargs)
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\numba\core\dispatcher.py", line 857, in compile
cres = self._compiler.compile(args, return_type)
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\numba\core\dispatcher.py", line 77, in compile
status, retval = self._compile_cached(args, return_type)
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\numba\core\dispatcher.py", line 91, in _compile_cached
retval = self._compile_core(args, return_type)
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\numba\core\dispatcher.py", line 109, in _compile_core
pipeline_class=self.pipeline_class)
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\numba\core\compiler.py", line 602, in compile_extra
return pipeline.compile_extra(func)
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\numba\core\compiler.py", line 352, in compile_extra
return self._compile_bytecode()
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\numba\core\compiler.py", line 414, in _compile_bytecode
return self._compile_core()
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\numba\core\compiler.py", line 394, in _compile_core
raise e
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\numba\core\compiler.py", line 385, in _compile_core
pm.run(self.state)
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\numba\core\compiler_machinery.py", line 339, in run
raise patched_exception
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\numba\core\compiler_machinery.py", line 330, in run
self._runPass(idx, pass_inst, state)
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\numba\core\compiler_lock.py", line 32, in _acquire_compile_lock
return func(*args, **kwargs)
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\numba\core\compiler_machinery.py", line 289, in _runPass
mutated |= check(pss.run_pass, internal_state)
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\numba\core\compiler_machinery.py", line 262, in check
mangled = func(compiler_state)
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\numba\core\typed_passes.py", line 290, in run_pass
parfor_pass.run()
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\numba\parfors\parfor.py", line 2730, in run
ConvertLoopPass(self).run(self.func_ir.blocks)
File "C:\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\numba\parfors\parfor.py", line 2440, in run
loc=inst.loc,
numba.core.errors.UnsupportedRewriteError: Failed in nopython mode pipeline (step: convert to parfors)
Only constant step size of 1 is supported for prange

File "....\ProgramData\anaconda3\envs\simbaenvnew\lib\site-packages\simba\mixins\circular_statistics.py", line 691:
def rao_spacing(data: np.array):

)
for j in prange(data.shape[0] - 1, -1, -1):
^

@sronilsson
Copy link
Collaborator

Hi @ltaxi - yes my bad, not sure how this sneaked in 😬 , let me update and get back to you.

@sronilsson
Copy link
Collaborator

can you let me know how it looks like in simba 2.1.1 after running pip install simba-uw-tf-dev --upgrade ?

@ltaxi
Copy link
Author

ltaxi commented Aug 29, 2024

it's working now! Thank you so much!

@sronilsson
Copy link
Collaborator

Thanks for reporting, very helpful 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants