Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: Can't load the model for 'Rostlab/prot_t5_xl_half_uniref50-enc' #1

Open
msarrias opened this issue Aug 30, 2022 · 4 comments

Comments

@msarrias
Copy link

msarrias commented Aug 30, 2022

Hi,

I'm trying to use EMBER3D to compute the structure prediction of a sequence in FASTA format.

After running:

python3 predict.py -i /home/x_maher/Homo_sapiens_akap5.fa -o /home/x_maher

I get the following error:

Traceback (most recent call last):
  File "predict.py", line 31, in <module>
    Ember3D = Ember3D(args.model_checkpoint, args.t5_dir, args.device)
  File "/opt/EMBER3D/Ember3D.py", line 116, in __init__
    self.embedder = T5Embedder(t5_dir, device)
  File "/opt/EMBER3D/T5Embedder.py", line 12, in __init__
    self.model = T5EncoderModel.from_pretrained(transformer_link, cache_dir=t5_dir, output_attentions=True, torch_dtype=torch.float16)
  File "/usr/local/lib/python3.8/dist-packages/transformers/modeling_utils.py", line 1922, in from_pretrained
    config, model_kwargs = cls.config_class.from_pretrained(
  File "/usr/local/lib/python3.8/dist-packages/transformers/configuration_utils.py", line 526, in from_pretrained
    config_dict, kwargs = cls.get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/transformers/configuration_utils.py", line 553, in get_config_dict
    config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/transformers/configuration_utils.py", line 641, in _get_config_dict
    raise EnvironmentError(
OSError: Can't load config for 'Rostlab/prot_t5_xl_half_uniref50-enc'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'Rostlab/prot_t5_xl_half_uniref50-enc' is the correct path to a directory containing a config.json file

Environment:

I'm currently working on a GPU node using a singularity container.

  • Python 3.8.3
  • CUDA Version: 11.7
@JinyuanSun
Copy link

I got the same issue.

@JinyuanSun
Copy link

A similar issue in the previous version.

@kWeissenow
Copy link
Owner

kWeissenow commented Nov 17, 2022

Thanks for reporting this issue!
On first use, EMBER3D will download ProtT5 model checkpoints. By default, the script will try to store those checkpoints in the directory 'ProtT5-XL-U50' within your current working directory.
Were model files downloaded at all or did you get some kind of error message? Could you please check whether you have write access in your working directory and if the directory 'ProtT5-XL-U50' was created at all?
You can also use the parameter --t5_model to point to a different location.

@JinyuanSun
Copy link

image
I got this error message and fixed by clone the https://huggingface.co/Rostlab/prot_t5_xl_half_uniref50-enc repo into /path/to/EMBER3D/Rostlab/.
In some cluster, computation nodes have no access to the network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants