How does ESMC implement encoding proteins in a local computer, that is, converting sequences into arrays?
Dear all, is there any tutorial that can be provided, thanks a lot. According to the official documentation, I try to use the following code but it always gives me an error saying: in _tokenize assert pad is not None
`from esm.models.esmc import ESMC from esm.sdk.api import ESMProtein, LogitsConfig
protein = ESMProtein(sequence="AAAAA") client = ESMC.from_pretrained("esmc_300m").to("cpu") # or "cpu" protein_tensor = client.encode(protein) logits_output = client.logits( protein_tensor, LogitsConfig(sequence=True, return_embeddings=True) ) print(logits_output.logits, logits_output.embeddings)`
I finally figured out why, the environment wasn't set up right, and following the instructions on hugging face to download tags.
- biology
- esm
- protein Special thanks to all of you who read my question, thanks!
Hello, excuse me, how did you implement ESMC in a local computer? Can the parameters be downloaded locally?
Hello, excuse me, how did you implement ESMC in a local computer? Can the parameters be downloaded locally?
Yes. You can check this page.
您好,您是如何在本地计算机中实施 ESMC 的?参数可以在本地下载吗?
Yes. The key to solving this problem is to configure the environment and download the various packages needed.