Installing and using automatminer

Good morning, all.

I was able to install pymatgen, matminer & automatminer (all with ‘pip install’). However, when I try to use automatminer, I run into a problem.
When I do this:

from automatminer import MatPipe

I get (finally): ModuleNotFoundError: No module named ‘sklearn.metrics.scorer’

When I watched a video (from MP) which used automatminer, I could see warnings about depreciation in scikitlearn, e.g., “FutureWarning: The sklearn.metrics.scorer module is deprecated in version 0.22 and will be removed in version 0.24 …”

I have tried downgrading my scikit-learn to earlier versions but this just produces other errors.

Thank you for any help.

Omololu
ICTP-EAIFR, Univ. Rwanda

@ardunn - can you look into updating the sklearn.metrics.scorer import to sklearn.metrics to work with current versions of sklearn?

The other problem could be the user has an improper install of sklearn - @prayerz one way to test this is to open a simple Python shell and type:

import sklearn.metrics
import sklearn.metrics.scorer

if neither of these works, you should check your sklearn install. If the first one works but the second one doesn’t, probably we should update our code.

Thank you very much, Anubhav.

  1. On my laptop which has version 0.22.2 of sklearn:
    import sklearn.metrics works with no warnings/errors
    import sklearn.metrics.scorer works with warnings about deprecation and something will be removed in version 0.24 (of sklearn)
    from automatminer import MatPipe has similar warnings (not errors)

  2. On my desktop,
    import sklearn.metrics works with no warnings/errors
    import sklearn.metrics.scorer does not work. It has this error:
    ModuleNotFoundError: No module named ‘sklearn.metrics.scorer’
    from automatminer import MatPipe does not work. It has this (final) error:
    ModuleNotFoundError: No module named ‘sklearn.metrics.scorer’

  3. Yesterday I downgraded my sklearn but had to downgrade other packages as well. I think this worked finally:
    !pip install pymatgen==2020.01.28
    !pip install matminer==0.6.2
    !pip install skrebate==0.6
    !pip install automatminer==1.0.3.20200727
    !pip3 install ruamel_yaml
    !pip3 install ruamel.yaml --ignore-installed ruamel.yaml

(Maybe I did not need to do all of these?)

Thank you.

o.

Hey @prayerz let me see if I can update the requirements sometime this week

@ardunn
Thanks!

(PS: I also had to use python3.8)

Hi,can you update the automatminer?
i got "No module named ‘sklearn.metrics.scorer’ " when I import MatPipe
Thanks