lambdaloop/aniposelib

Numba decorator error

oliver-batchelor opened this issue · 8 comments

I have numba 0.52.0 installed, python3.7.

  File "/home/cosc/guest/owb14/sync/aniposelib/aniposelib/cameras.py", line 616, in CameraGroup
    @jit(nopython=True, parallel=True, forceobj=True)
  File "/home/cosc/guest/owb14/miniconda3/lib/python3.7/site-packages/numba/core/decorators.py", line 150, in jit
    raise ValueError("Only one of 'nopython' or 'forceobj' can be True.")

@saulzar that's why numba is pinned to 0.50.1

'numba==0.50.1', 'pandas',

Fixed now with aniposelib 0.4.2

I believe 6391efa makes Numba slower. Measuring performance while doing the upgrade was on my TODO list, but I couldn't get back to it.

When I tried it out, it still did use all my CPU cores, so I don't think it's dramatically slower at least.

I don't have time to optimize the code at this level and I think for new users it's worth it to not have numba pinned to make it compatible with the numba pinned in DeepLabCut

If you do end up having time to test it out and find anything, let me know!
I'd certainly be interested in performance gains if we can get them with the latest numba

It will use all CPU cores any way, but that may it be Python bytecode, not the optimized machiine code that Numba can produce. So this needs some real benchmarks. As I am new to the whole Numba and DeepLabCut stuff, I am not sure I am able to create the benchmarking setup myself.

But I agree that solving the dependency hell was more important than performance in this case.

Or do you mean that in Python object mode Numba uses only one CPU core?

Ah no it previously used all CPU cores as well. Without Numba it uses only one CPU core.

I think based on the discuss here and elsewhere we shouldn't be able to do "nopython" and "forceobj" at the same time, so perhaps there is really only one solution here anyhow.