This is because einops has been updated to version 0.7.0 on conda-forge. We need to set einops to use 0.6.1 version to solve this issue.
Reproduction steps
Install from scratch following the steps in the README. Run esm-fold command with any input. You will get the invalid syntax error.
Expected behavior
No syntax error should happen during the loading model phase.
Logs
23/10/11 02:18:01 | INFO | root | Reading sequences from ...
23/10/11 02:18:01 | INFO | root | Loaded 1 sequences from ...
23/10/11 02:18:01 | INFO | root | Loading model
Traceback (most recent call last):
File "/mnt/miniconda3/envs/esmfold/bin/esm-fold", line 8, in <module>
sys.exit(main())
File "/mnt/miniconda3/envs/esmfold/lib/python3.7/site-packages/esm/scripts/fold.py", line 202, in main
run(args)
File "/mnt/miniconda3/envs/esmfold/lib/python3.7/site-packages/esm/scripts/fold.py", line 143, in run
model = esm.pretrained.esmfold_v1()
File "/mnt/miniconda3/envs/esmfold/lib/python3.7/site-packages/esm/pretrained.py", line 419, in esmfold_v1
import esm.esmfold.v1.pretrained
File "/mnt/miniconda3/envs/esmfold/lib/python3.7/site-packages/esm/esmfold/v1/pretrained.py", line 10, in <module>
from esm.esmfold.v1.esmfold import ESMFold
File "/mnt/miniconda3/envs/esmfold/lib/python3.7/site-packages/esm/esmfold/v1/esmfold.py", line 17, in <module>
from esm.esmfold.v1.misc import (
File "/mnt/miniconda3/envs/esmfold/lib/python3.7/site-packages/esm/esmfold/v1/misc.py", line 10, in <module>
from einops import rearrange, repeat
File "/mnt/miniconda3/envs/esmfold/lib/python3.7/site-packages/einops/__init__.py", line 14, in <module>
from .einops import rearrange, reduce, repeat, einsum, parse_shape, asnumpy
File "/mnt/miniconda3/envs/esmfold/lib/python3.7/site-packages/einops/einops.py", line 807
def einsum(tensor: Tensor, pattern: str, /) -> Tensor:
^
SyntaxError: invalid syntax
Additional context
To fix, change the following in the environment.yml (if installing the conda environment through the file)
conda-forge::einops
into the following
conda-forge::einops=0.6.1
Or if you are not using the conda environment installation, revert to einops 0.6.1 after installation:
Bug description When running esm-fold command from a new install, you will now get an error:
This is because einops has been updated to version 0.7.0 on conda-forge. We need to set einops to use 0.6.1 version to solve this issue.
Reproduction steps Install from scratch following the steps in the README. Run esm-fold command with any input. You will get the invalid syntax error.
Expected behavior No syntax error should happen during the loading model phase.
Logs
Additional context To fix, change the following in the environment.yml (if installing the conda environment through the file)
into the following
Or if you are not using the conda environment installation, revert to einops 0.6.1 after installation: