You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I running the following snippet from the README to use ESMC 6B:
from esm.sdk.forge import ESM3ForgeInferenceClient
from esm.sdk.api import ESMProtein, LogitsConfig
# Apply for forge access and get an access token
forge_client = ESM3ForgeInferenceClient(model="esmc-6b-2024-12", url="https://forge.evolutionaryscale.ai", token="<your forge token>")
protein = ESMProtein(sequence="AAAAA")
try:
protein_tensor = forge_client.encode(protein)
print("Type of protein_tensor:", type(protein_tensor))
if not isinstance(protein_tensor, ESMProteinTensor):
raise TypeError("The encode method did not return an ESMProteinTensor instance. Type received: {}".format(type(protein_tensor)))
logits_output = forge_client.logits(
protein_tensor, LogitsConfig(sequence=True, return_embeddings=True)
)
print(logits_output.logits, logits_output.embeddings)
except Exception as e:
print(f"An error occurred: {e}")
An error occurred: The encode method did not return an ESMProteinTensor instance. Type received: <class 'esm.sdk.api.ESMProteinError'>
It seems that there is something wrong with the code : protein_tensor = forge_client.encode(protein) , but I don't know why.
Thanks for your help.
The text was updated successfully, but these errors were encountered:
Dear ESMC Developer,
When I running the following snippet from the README to use ESMC 6B:
An error occurred: The encode method did not return an ESMProteinTensor instance. Type received: <class 'esm.sdk.api.ESMProteinError'>
It seems that there is something wrong with the code : protein_tensor = forge_client.encode(protein) , but I don't know why.
Thanks for your help.
The text was updated successfully, but these errors were encountered: