Tuple 'shapelets' length must be smaller than 1000.
jmrichardson opened this issue · comments
Description
Hi, I am getting this error message
st = ShapeletTransform(n_jobs=cpus)
st.fit(X_trn_seg, y_trn_seg)
joblib.externals.loky.process_executor._RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/jmrichardson/anaconda3/envs/tipjar/lib/python3.7/site-packages/joblib/externals/loky/process_executor.py", line 431, in _process_worker
r = call_item()
File "/home/jmrichardson/anaconda3/envs/tipjar/lib/python3.7/site-packages/joblib/externals/loky/process_executor.py", line 285, in __call__
return self.fn(*self.args, **self.kwargs)
File "/home/jmrichardson/anaconda3/envs/tipjar/lib/python3.7/site-packages/joblib/_parallel_backends.py", line 595, in __call__
return self.func(*args, **kwargs)
File "/home/jmrichardson/anaconda3/envs/tipjar/lib/python3.7/site-packages/joblib/parallel.py", line 253, in __call__
for func, args, kwargs in self.items]
File "/home/jmrichardson/anaconda3/envs/tipjar/lib/python3.7/site-packages/joblib/parallel.py", line 253, in <listcomp>
for func, args, kwargs in self.items]
File "/home/jmrichardson/anaconda3/envs/tipjar/lib/python3.7/site-packages/pyts/transformation/shapelet_transform.py", line 522, in _fit_one_time_series
X, window_sizes, shapelets, lengths, fit=True)
File "/home/jmrichardson/anaconda3/envs/tipjar/lib/python3.7/site-packages/pyts/transformation/shapelet_transform.py", line 115, in _derive_all_distances
X, n_samples, n_timestamps, window_sizes, shapelets, lengths
File "/home/jmrichardson/anaconda3/envs/tipjar/lib/python3.7/site-packages/numba/core/dispatcher.py", line 404, in _compile_for_args
error_rewrite(e, 'unsupported_error')
File "/home/jmrichardson/anaconda3/envs/tipjar/lib/python3.7/site-packages/numba/core/dispatcher.py", line 344, in error_rewrite
reraise(type(e), e, None)
File "/home/jmrichardson/anaconda3/envs/tipjar/lib/python3.7/site-packages/numba/core/utils.py", line 80, in reraise
raise value.with_traceback(tb)
numba.core.errors.UnsupportedError: Failed in nopython mode pipeline (step: ensure IR is legal prior to lowering)
Tuple 'shapelets' length must be smaller than 1000.
Large tuples lead to the generation of a prohibitively large LLVM IR which causes excessive memory pressure and large compile times.
As an alternative, the use of a 'list' is recommended in place of a 'tuple' as lists do not suffer from this problem.
File "../anaconda3/envs/tipjar/lib/python3.7/site-packages/pyts/transformation/shapelet_transform.py", line 71:
@njit()
def _derive_all_squared_distances_fit(
^
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "pipeline.py", line 25, in <module>
X_trn, st = shaplet(X_trn_seg, y_trn_seg, X_trn) # Shapelet features
File "/home/jmrichardson/tipjar/tipjar/prepare/shapelet.py", line 14, in shaplet
st.fit(X_trn_seg, y_trn_seg)
File "/home/jmrichardson/anaconda3/envs/tipjar/lib/python3.7/site-packages/pyts/transformation/shapelet_transform.py", line 304, in fit
window_steps, n_jobs, rng) = self._check_params(X, y)
File "/home/jmrichardson/anaconda3/envs/tipjar/lib/python3.7/site-packages/pyts/transformation/shapelet_transform.py", line 499, in _check_params
window_sizes = self._auto_length_computation(X, y, rng, n_jobs)
File "/home/jmrichardson/anaconda3/envs/tipjar/lib/python3.7/site-packages/pyts/transformation/shapelet_transform.py", line 623, in _auto_length_computation
self.remove_similar, n_jobs, rng
File "/home/jmrichardson/anaconda3/envs/tipjar/lib/python3.7/site-packages/pyts/transformation/shapelet_transform.py", line 570, in _fit
for i in range(n_samples))
File "/home/jmrichardson/anaconda3/envs/tipjar/lib/python3.7/site-packages/joblib/parallel.py", line 1042, in __call__
self.retrieve()
File "/home/jmrichardson/anaconda3/envs/tipjar/lib/python3.7/site-packages/joblib/parallel.py", line 921, in retrieve
self._output.extend(job.get(timeout=self.timeout))
File "/home/jmrichardson/anaconda3/envs/tipjar/lib/python3.7/site-packages/joblib/_parallel_backends.py", line 542, in wrap_future_result
return future.result(timeout=timeout)
File "/home/jmrichardson/anaconda3/envs/tipjar/lib/python3.7/concurrent/futures/_base.py", line 435, in result
return self.__get_result()
File "/home/jmrichardson/anaconda3/envs/tipjar/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
numba.core.errors.UnsupportedError: Failed in nopython mode pipeline (step: ensure IR is legal prior to lowering)
Tuple 'shapelets' length must be smaller than 1000.
Large tuples lead to the generation of a prohibitively large LLVM IR which causes excessive memory pressure and large compile times.
As an alternative, the use of a 'list' is recommended in place of a 'tuple' as lists do not suffer from this problem.
File "../anaconda3/envs/tipjar/lib/python3.7/site-packages/pyts/transformation/shapelet_transform.py", line 71:
@njit()
def _derive_all_squared_distances_fit(
^
Versions
NumPy 1.19.2
SciPy 1.4.1
Scikit-Learn 0.23.1
Numba 0.49.1
Pyts 0.12.dev0