facebookresearch / esm

Evolutionary Scale Modeling (esm): Pretrained language models for proteins
MIT License
3.16k stars 627 forks source link

ModuleNotFoundError - "model" directory is missed in setup.py #253

Closed ptynecki closed 2 years ago

ptynecki commented 2 years ago

Bug description "model" directory is missed in "packages" argument in setup.py script. That issue raised ModuleNotFoundError: No module named 'esm.model' exception.

Reproduction steps Try to install esm package from PyPI or from the GitHub repository.

Expected behavior I was expected successful installation.

Logs

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Input In [1], in <cell line: 2>()
      1 import torch
----> 2 import esm

File ~/protein_embeddings/env/lib/python3.8/site-packages/esm/__init__.py:9, in <module>
      6 from .version import version as __version__  # noqa
      8 from .data import Alphabet, BatchConverter, FastaBatchedDataset  # noqa
----> 9 from .model.esm1 import ProteinBertModel  # noqa
     10 from .model.esm2 import ESM2  # noqa
     11 from .model.msa_transformer import MSATransformer  #noqa

ModuleNotFoundError: No module named 'esm.model'
brycejoh16 commented 2 years ago

having the same issue right now looking for a solution. (i am not on ESM team)

ptynecki commented 2 years ago

@brycejoh16

PR is waiting: https://github.com/facebookresearch/esm/pull/254

brycejoh16 commented 2 years ago

@ptynecki thank you!

ptynecki commented 2 years ago

@tomsercu PR #254 is resolving the issue problem but there is another during the installation.

The fairscale package is required (not added to setup.py as well).

nikitos9000 commented 2 years ago

Hi @ptynecki @brycejoh16 thanks for spotting that! It's fixed now in https://github.com/facebookresearch/esm/pull/254, the fairscale dependency will be fixed soon.

matteoferla commented 2 years ago

I might be wrong, but the setup.py is rather curiously written, I don't know your guys setup and I have not looked at the history, but it very much looks like be a case of files being erroneously switched for a test or similar. Say

So might be worth checking there's no weird accident in the version!

tomsercu commented 2 years ago

Thanks yes much about our build/release process could be improved.

256 addressed the fairscale dependency.

@ptynecki let us know if your issues are resolved now. Thanks all for your input!