Closed scottcha closed 4 years ago
same question here.
according to this QA, I made some modification to the code:
def generate_kernels(input_length, num_kernels, np_kss=np.array([7, 9, 11]), pad=True, dilate=True):
candidate_lengths = np_kss
It works. At least the error goes away...
Closed as I've now loaded a new solution that works as expected.
As also noted in this other users post to the forum https://forums.fast.ai/t/time-series-sequential-data-study-group/29686/588 I'm also seeing the numba error when attempting to execute the rocket notebook.
I've tried with numba versions 0.45.1, 0.46 and 0.47 all with the same results The error seems to blame this line: candidate_lengths = np.array(([7, 9, 11])) but when I executing that in its own nb cell I don't get an error.
Offending nb line and error: `kernels = generate_kernels(seq_len, 10000)
NotImplementedError Traceback (most recent call last) ~/anaconda3/envs/fastai/lib/python3.7/site-packages/numba/targets/base.py in get_constant_generic(self, builder, ty, val) 498 try: --> 499 impl = self._get_constants.find((ty,)) 500 return impl(self, builder, ty, val)
~/anaconda3/envs/fastai/lib/python3.7/site-packages/numba/targets/base.py in find(self, sig) 49 if out is None: ---> 50 out = self._find(sig) 51 self._cache[sig] = out
~/anaconda3/envs/fastai/lib/python3.7/site-packages/numba/targets/base.py in _find(self, sig) 58 else: ---> 59 raise NotImplementedError(self, sig) 60
NotImplementedError: (<numba.targets.base.OverloadSelector object at 0x7f84b4955890>, (reflected list(int64),))
During handling of the above exception, another exception occurred:
NotImplementedError Traceback (most recent call last) ~/anaconda3/envs/fastai/lib/python3.7/site-packages/numba/errors.py in new_errorcontext(fmt, *args, **kwargs) 661 try: --> 662 yield 663 except NumbaError as e:
~/anaconda3/envs/fastai/lib/python3.7/site-packages/numba/lowering.py in lowerblock(self, block) 257 loc=self.loc, errcls=defaulterrcls): --> 258 self.lower_inst(inst) 259
~/anaconda3/envs/fastai/lib/python3.7/site-packages/numba/lowering.py in lower_inst(self, inst) 300 ty = self.typeof(inst.target.name) --> 301 val = self.lower_assign(ty, inst) 302 self.storevar(val, inst.target.name)
~/anaconda3/envs/fastai/lib/python3.7/site-packages/numba/lowering.py in lower_assign(self, ty, inst) 476 const = self.context.get_constant_generic(self.builder, valty, --> 477 pyval) 478 # cast it to the variable type
~/anaconda3/envs/fastai/lib/python3.7/site-packages/numba/targets/base.py in get_constant_generic(self, builder, ty, val) 501 except NotImplementedError: --> 502 raise NotImplementedError("Cannot lower constant of type '%s'" % (ty,)) 503
NotImplementedError: Cannot lower constant of type 'reflected list(int64)'
During handling of the above exception, another exception occurred:
LoweringError Traceback (most recent call last)