# Feature-classifiers error

**URL:** https://forum.qiime2.org/t/feature-classifiers-error/11946
**Category:** User Support
**Created:** [October 12, 2019, 10:45pm UTC](https://forum.qiime2.org/t/feature-classifiers-error/11946 "2019-10-12T22:45:25Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Bethanie](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/b/9dc877/32.png) [@Bethanie](https://forum.qiime2.org/u/Bethanie)
#### Post date: [October 12, 2019, 10:45pm UTC](https://forum.qiime2.org/t/feature-classifiers-error/11946/1 "2019-10-12T22:45:25Z")

</div>

Hi,

I'm having difficulties with the feature-classifier plugin, in qiime 2019.7. When I run the following command:

qiime feature-classifier classify-sklearn   
--i-classifier silva-132-99-nb-classifier.qza   
--i-reads rep-seqs.qza   
--p-pre-dispatch 'n\_jobs'   
--o-classification taxonomy.qza   
--verbose

I receive this error:  
Traceback (most recent call last):  
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/q2cli/commands.py", line 327, in **call**  
results = action(\*\*arguments)  
File "\</home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/decorator.py:decorator-gen-347\>", line 2, in classify\_sklearn  
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py", line 229, in bound\_callable  
spec.view\_type, recorder)  
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/result.py", line 289, in \_view  
result = transformation(self.\_archiver.data\_dir)  
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/core/transform.py", line 70, in transformation  
new\_view = transformer(view)  
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/q2\_feature\_classifier/\_taxonomic\_classifier.py", line 72, in \_1  
pipeline = joblib.load(os.path.join(dirname, 'sklearn\_pipeline.pkl'))  
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/joblib/numpy\_pickle.py", line 598, in load  
obj = \_unpickle(fobj, filename, mmap\_mode)  
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/joblib/numpy\_pickle.py", line 526, in \_unpickle  
obj = unpickler.load()  
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/pickle.py", line 1050, in load  
dispatchkey[0]  
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/joblib/numpy\_pickle.py", line 352, in load\_build  
self.stack.append(array\_wrapper.read(self))  
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/joblib/numpy\_pickle.py", line 195, in read  
array = self.read\_array(unpickler)  
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/joblib/numpy\_pickle.py", line 141, in read\_array  
array = unpickler.np.empty(count, dtype=self.dtype)  
numpy.core.\_exceptions.MemoryError: Unable to allocate array with shape (895606784,) and data type float64

Plugin error from feature-classifier:

Unable to allocate array with shape (895606784,) and data type float64

I've tried this with and without the --p-pre-dispatch 'n\_jobs' \ but the result is always the same. The VM currently has around 8gb ram allocated to it, and is on a dynamic disk, with the host having around 100gb storage on the drive

Thanks!

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [October 13, 2019, 3:11pm UTC](https://forum.qiime2.org/t/feature-classifiers-error/11946/2 "2019-10-13T15:11:36Z")

</div>

> [@Bethanie](#):
>
> numpy.core.\_exceptions.MemoryError: Unable to allocate array with shape (895606784,) and data type float64

This is a memory error; essentially you do not have enough memory to open the SILVA classifier on your computer.

> [@Bethanie](#):
>
> The VM currently has around 8gb ram allocated to it

This is low for the SILVA classifier — it will often take up to 32GB+ if left to its own devices!

There's a couple of things you might be able to do.

First, you can use the `--p-reads-per-batch` parameter (e.g., set to 1000 or 2000) to reduce the number of reads classified at a time. However, it looks like you do not have enough memory to load the SILVA classifier, not the reads, so this might not help.

The other option is to use the greengenes classifier, which is much smaller and hence less memory-intensive to load.

the only other option will be to find a more powerful machine to run this on, e.g., an computing cluster, AWS.

Good luck!

---

<div class="post-metadata">

### Author: ![Bethanie](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/b/9dc877/32.png) [@Bethanie](https://forum.qiime2.org/u/Bethanie)
#### Post date: [October 20, 2019, 10:18pm UTC](https://forum.qiime2.org/t/feature-classifiers-error/11946/3 "2019-10-20T22:18:59Z")

</div>

Hi

> The other option is to use the greengenes classifier, which is much smaller and hence less memory-intensive to load

I tried this and it worked!! Thanks so much!!

---

<div class="post-metadata">

### Author: ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)
#### Post date: [November 21, 2019, 4:19am UTC](https://forum.qiime2.org/t/feature-classifiers-error/11946/4 "2019-11-21T04:19:02Z")

</div>

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
