Cannot import DSM model

#1
by DaniDubi - opened

Hi GleghornLab and Synthyra,
@lhallee

Thank you for releasing this new great model! I'm excited to try it out.

But I can't import the base model, by using either the page docs:

from models.modeling_dsm import DSM
ModuleNotFoundError: No module named 'models'

or the using the code written in "Use this model" bottom:

from transformers import ESM_Diff
ImportError: cannot import name 'ESM_Diff' from 'transformers' (/home/ddubi29_horizon285_com/miniconda3/lib/python3.13/site-packages/transformers/__init__.py)

The only package called "models" I found is this: https://pypi.org/project/models/ - but it does not seem to work or be related either.

Thank you for your help!
Dani

Hi again @lhallee ,

I managed to install all the required modules using the instructions in Gleghorn-Lab GitHub,
now the base import works:
>>> import models

However, the specific import as given in the Model Card in HuggingFace does not:

>>> from models.modeling_dsm import DSM
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ddubi29_horizon285_com/DSM/models/modeling_dsm.py", line 6, in <module>
    from .FastPLMs.modeling_fastesm import FastEsmModel, FastEsmForMaskedLM, FastEsmConfig
ModuleNotFoundError: No module named 'models.FastPLMs.modeling_fastesm'

Many thanks
Dani

Gleghorn Lab org

Hey @DaniDubi ,

FastPLMs is a submodule that is required for the code to run correctly. You can initialize them after cloning the DSM git repo by running

git submodule update --init --remote --recursive

We've updated the readmes with this step.
Please let us know if you run into any other issues. Happy protein modeling!
Best,
Logan

DaniDubi changed discussion status to closed

Sign up or log in to comment