The scikit-learn version used to generate this artifact does not match the current version of scikit-learn installed

Hello All
I tried to run a command
qiime feature-classifier classify-sklearn --i-classifier gg-13-8-99-515-806-nb-classifier.qza --i-reads merged_seq.qza --o-classification taxonomy.qza.
but it gave an error
The scikit-learn version (0.23.1) used to generate this artifact does not match the current version of scikit-learn installed (0.21.2). Please retrain your classifier for your current deployment to prevent data-corruption errors.

Debug info has been saved to /tmp/qiime2-q2cli-err-vyqm69av.log
the debug info is as
cat /tmp/qiime2-q2cli-err-vyqm69av.log
Traceback (most recent call last):
File “/home/qiime2/miniconda/envs/qiime2-2019.10/lib/python3.6/site-packages/q2cli/commands.py”, line 328, in call
results = action(**arguments)
File “</home/qiime2/miniconda/envs/qiime2-2019.10/lib/python3.6/site-packages/decorator.py:decorator-gen-351>”, line 2, in classify_sklearn
File “/home/qiime2/miniconda/envs/qiime2-2019.10/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.10/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.10/lib/python3.6/site-packages/qiime2/core/transform.py”, line 70, in transformation
new_view = transformer(view)
File “/home/qiime2/miniconda/envs/qiime2-2019.10/lib/python3.6/site-packages/q2_feature_classifier/_taxonomic_classifier.py”, line 64, in _1
% (sklearn_version, sklearn.version))
ValueError: The scikit-learn version (0.23.1) used to generate this artifact does not match the current version of scikit-learn installed (0.21.2). Please retrain your classifier for your current deployment to prevent data-corruption errors.
How to sought this issue out.

Hi @divyaprince321,

I moved your question to a separate thread because is not related to the initial question.
This topic also appear few time in the forum, so I hope the following answer it will help you too:

Even it is mentioning different versions for sk-learn, it is pointing to the same problem!
Basically, the version of qiime2 used to prepare your classify is different from the qiime2 version you are using. The easy fix would be to use the latest version of qiime2.

Luca

3 Likes

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