Closed pengzhangzhi closed 2 years ago
@pengzhangzhi Reinstall the package from main branch.
Yes it sounds like a version conflict. Can you pip uninstall
and then pip install
again and make sure the version is 1.0.2 which just appeared on pip today?
Seems like the version I install is just 1.0.2. I just install the pkg and find this error. After uninstall and re-install with pip install fair-esm==1.0.2
. The same problem still show up.
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Untitled-1.ipynb Cell 1 in <cell line: 2>()
[1](vscode-notebook-cell:Untitled-1.ipynb?jupyter-notebook#W0sdW50aXRsZWQ%3D?line=0) import torch
----> [2](vscode-notebook-cell:Untitled-1.ipynb?jupyter-notebook#W0sdW50aXRsZWQ%3D?line=1) import esm
[4](vscode-notebook-cell:Untitled-1.ipynb?jupyter-notebook#W0sdW50aXRsZWQ%3D?line=3) # Load ESM-2 model
[5](vscode-notebook-cell:Untitled-1.ipynb?jupyter-notebook#W0sdW50aXRsZWQ%3D?line=4) model, alphabet = esm.pretrained.esm2_t48_15B_UR50D()
File ~/anaconda3/envs/torch/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.esm1'; 'esm.model' is not a package
I also have this problem, installing from main and also from pypi with fair-esm==1.0.2
into a fresh conda env with python=3.9
on linux:
I also have a similar problem when I try to run the extract.py script
File "/home/dikshyant/anaconda3/lib/python3.7/site-packages/esm/init.py", line 9, in
I had this issue too, but I could run it with a trick. first of all uninstall your package and use this command:
pip install git+https://github.com/facebookresearch/esm.git
after that if you are using Jupyter (like colab), first run this block of code, to download the model completely:
import torch
import esm
model, alphabet = esm.pretrained.esm2_t36_3B_UR50D()
after several minutes you can run rest of your code.
Hi folks thanks for flagging this issue. The build was broken due to an old file (model.py
) accidentally being included in the pip wheel. Note that there was no issue on the github main branch, so as @pooriyapfn points out pip install git+https://github.com/facebookresearch/esm.git
still worked.
The wheel is fixed now, so please go ahead and pip uninstall, then pip install fair-esm
or pip install fair-esm==1.0.2
.
Sorry for the inconvenience.
Problem solved! Happy to see that!
I install by
pip install fair-esm
. Then try the example code:The following error is raised: