esm
esm copied to clipboard
How do I fix the issue of "TypeError: get_batch_converter() takes 1 positional argument but 2 were given"
Hi Team, When i run the command below without any coding change after cloning repo, I got the issue: python scripts/extract.py esm2_t33_650M_UR50D examples/data/some_proteins.fasta \
examples/data/some_proteins_emb_esm2 --repr_layers 0 32 33 --include mean per_tok
Issue:
Downloading: "https://dl.fbaipublicfiles.com/fair-esm/regression/esm2_t33_650M_UR50D-contact-regression.pt" to /mnt/home/xxxx/.cache/torch/hub/checkpoints/esm2_t33_650M_UR50D-contact-regression.pt
Transferred model to GPU
Traceback (most recent call last):
File "scripts/extract.py", line 136, in
Could you please point it out whether there is anything wrong? Thanks
Remove the parameter args.truncation_seq_length should yield the results. This is due to the un update file "./env/lib/python3.8/site-packages/esm/data.py: def get_batch_converter(self):" in your pip install esm package.
Thanks for reporting this! I'll rebuild the package to incorporate all the recent changes shortly.
I also encounter this problem and hope to be solved soon. Thanks!
This is a version mismatch problem and will be fixed if you pip install the same version as you're running: git checkout v1.0.2 or pip install . from repo root.
@JiayuanDing100 @HelloYiHan Sorry for the delay, please try to upgrade to the latest package version (1.0.3) from pip and check if the issue is still in place?
It was solved by: pip install git+https://github.com/facebookresearch/esm.git
Thank you for your help!