Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import fails #306

Closed
janosh opened this issue Jun 2, 2020 · 4 comments
Closed

Import fails #306

janosh opened this issue Jun 2, 2020 · 4 comments

Comments

@janosh
Copy link
Member

janosh commented Jun 2, 2020

Trying to import automatminer fails with IndexError: list index out of range. Tested locally and on Google Colab, same behavior.

Full stack trace
----> 2 import automatminer as amm

/usr/local/Caskroom/miniconda/base/envs/default/lib/python3.6/site-packages/automatminer/__init__.py in 
      1 from automatminer.automl import SinglePipelineAdaptor, TPOTAdaptor  # noqa
----> 2 from automatminer.featurization import AutoFeaturizer  # noqa
      3 from automatminer.pipeline import MatPipe  # noqa
      4 from automatminer.preprocessing import DataCleaner, FeatureReducer  # noqa
      5 from automatminer.presets import get_preset_config  # noqa

/usr/local/Caskroom/miniconda/base/envs/default/lib/python3.6/site-packages/automatminer/featurization/__init__.py in 
----> 1 from .core import AutoFeaturizer  # noqa

/usr/local/Caskroom/miniconda/base/envs/default/lib/python3.6/site-packages/automatminer/featurization/core.py in 
     25 from automatminer.utils.pkg import check_fitted, set_fitted
     26 from automatminer.base import DFTransformer
---> 27 from automatminer.featurization.sets import (
     28     CompositionFeaturizers,
     29     StructureFeaturizers,

/usr/local/Caskroom/miniconda/base/envs/default/lib/python3.6/site-packages/automatminer/featurization/sets.py in 
      8 """
      9 import matminer.featurizers.composition as cf
---> 10 import matminer.featurizers.structure as sf
     11 import matminer.featurizers.dos as dosf
     12 import matminer.featurizers.bandstructure as bf

/usr/local/Caskroom/miniconda/base/envs/default/lib/python3.6/site-packages/matminer/featurizers/structure.py in 
     34 
     35 from matminer.featurizers.base import BaseFeaturizer
---> 36 from matminer.featurizers.site import OPSiteFingerprint, \
     37     CoordinationNumber, LocalPropertyDifference, CrystalNNFingerprint, \
     38     AverageBondAngle, AverageBondLength

/usr/local/Caskroom/miniconda/base/envs/default/lib/python3.6/site-packages/matminer/featurizers/site.py in 
   1668 
   1669 # TODO: Figure out whether to take NN-counting method as an option (see VoronoiFingerprint)
-> 1670 class LocalPropertyDifference(BaseFeaturizer):
   1671     """
   1672     Differences in elemental properties between site and its neighboring sites.

/usr/local/Caskroom/miniconda/base/envs/default/lib/python3.6/site-packages/matminer/featurizers/site.py in LocalPropertyDifference()
   1693     """
   1694 
-> 1695     def __init__(self, data_source=MagpieData(), weight='area',
   1696                  properties=('Electronegativity',), signed=False):
   1697         """ Initialize the featurizer

/usr/local/Caskroom/miniconda/base/envs/default/lib/python3.6/site-packages/matminer/utils/data.py in __init__(self)
    213                                           lines[atomic_no - 1].split()]
    214                         else:
--> 215                             prop_value = float(lines[atomic_no - 1])
    216                     except ValueError:
    217                         prop_value = float("NaN")

IndexError: list index out of range
@janosh
Copy link
Member Author

janosh commented Jun 2, 2020

Happens with pip install automatminer==1.0.2.20191110 as well.

@utf
Copy link
Member

utf commented Jun 2, 2020

Can you try updating matminer?

This should have been fixed in hackingmaterials/matminer#452

@ardunn
Copy link
Contributor

ardunn commented Jun 2, 2020 via email

@janosh
Copy link
Member Author

janosh commented Jun 2, 2020

pip install scikit-learn==0.22.2 did the trick.

@janosh janosh closed this as completed Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants