mhcnuggets icon indicating copy to clipboard operation
mhcnuggets copied to clipboard

Predict import fails after installation using pip

Open christopher-mohr opened this issue 2 years ago • 5 comments

After installing MHCnuggets using pip (pip install mhcnuggets), the import from mhcnuggets.src.predict import predict fails.

python
Python 3.7.12 | packaged by conda-forge | (default, Oct 26 2021, 05:59:23) 
[Clang 11.1.0 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from mhcnuggets.src.predict import predict
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".../lib/python3.7/site-packages/mhcnuggets/src/predict.py", line 15, in <module>
    from keras.optimizers import Adam
ImportError: cannot import name 'Adam' from 'keras.optimizers' (.../lib/python3.7/site-packages/keras/optimizers.py)

The following versions have been installed:

 tensorflow-2.8.0
 keras-2.8.0

The correct import statement for the respective keras version seems to be the following:

from keras.optimizers import adam_v2

Are there plans for making MHCnuggets compatible with these versions and to create a new release?

christopher-mohr avatar May 06 '22 14:05 christopher-mohr