Skip to content

Commit cbaccc1

Browse files
Revert "sync 3.2.2.post1 (#270)" (#272)
1 parent f4f9792 commit cbaccc1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+141
-2513
lines changed

cookbook/local/open_generate.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"\n",
3939
"!pip install py3Dmol\n",
4040
"import py3Dmol\n",
41+
"\n",
4142
"from esm.models.esm3 import ESM3\n",
4243
"from esm.sdk.api import ESMProtein, GenerationConfig\n",
4344
"from esm.utils.structure.protein_chain import ProteinChain"

cookbook/local/raw_forwards.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import torch
44
import torch.nn.functional as F
5+
56
from esm.pretrained import (
67
ESM3_function_decoder_v0,
78
ESM3_sm_open_v0,
@@ -12,9 +13,7 @@
1213
from esm.tokenization.function_tokenizer import (
1314
InterProQuantizedTokenizer as EsmFunctionTokenizer,
1415
)
15-
from esm.tokenization.sequence_tokenizer import (
16-
EsmSequenceTokenizer,
17-
)
16+
from esm.tokenization.sequence_tokenizer import EsmSequenceTokenizer
1817
from esm.utils.structure.protein_chain import ProteinChain
1918
from esm.utils.types import FunctionAnnotation
2019

cookbook/snippets/fold_invfold.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from typing import cast
33

44
import numpy as np
5+
56
from esm.sdk.api import (
67
ESM3InferenceClient,
78
ESMProtein,

cookbook/tutorials/1_esmprotein.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"outputs": [],
7373
"source": [
7474
"from biotite.database import rcsb\n",
75+
"\n",
7576
"from esm.sdk.api import ESMProtein\n",
7677
"from esm.utils.structure.protein_chain import ProteinChain\n",
7778
"from esm.utils.types import FunctionAnnotation\n",
@@ -496,9 +497,10 @@
496497
"# Functions for visualizing InterPro function annotations\n",
497498
"\n",
498499
"from dna_features_viewer import GraphicFeature, GraphicRecord\n",
499-
"from esm.utils.function.interpro import InterPro, InterProEntryType\n",
500500
"from matplotlib import colormaps\n",
501501
"\n",
502+
"from esm.utils.function.interpro import InterPro, InterProEntryType\n",
503+
"\n",
502504
"\n",
503505
"def visualize_function_annotations(\n",
504506
" annotations: list[FunctionAnnotation],\n",

cookbook/tutorials/2_embed.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,18 @@
4949
"cell_type": "markdown",
5050
"metadata": {},
5151
"source": [
52-
"Grab a token from [Forge](https://forge.evolutionaryscale.ai/) and add it below. Note that your token is like a password for your account and you should take care to protect it. For this reason it is recommended to frequently create a new token and delete old, unused ones. It is also recommended to paste the token directly into an environment variable or use a utility like `getpass` as shown below so tokens are not accidentally shared or checked into code repositories."
52+
"Grab a token from [the Forge console](https://forge.evolutionaryscale.ai/console) and add it below. Note that your token is like a password for your account and you should take care to protect it. For this reason it is recommended to frequently create a new token and delete old, unused ones. It is also recommended to paste the token directly into an environment variable or use a utility like `getpass` as shown below so tokens are not accidentally shared or checked into code repositories."
5353
]
5454
},
5555
{
5656
"cell_type": "code",
57-
"execution_count": null,
57+
"execution_count": 1,
5858
"metadata": {},
5959
"outputs": [],
6060
"source": [
6161
"from getpass import getpass\n",
6262
"\n",
63-
"token = getpass(\"Token from Forge: \")"
63+
"token = getpass(\"Token from Forge console: \")"
6464
]
6565
},
6666
{

cookbook/tutorials/3_gfp_design.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"import matplotlib.pyplot as pl\n",
6565
"import py3Dmol\n",
6666
"import torch\n",
67+
"\n",
6768
"from esm.sdk import client\n",
6869
"from esm.sdk.api import ESMProtein, GenerationConfig\n",
6970
"from esm.utils.structure.protein_chain import ProteinChain"
@@ -79,18 +80,18 @@
7980
"\n",
8081
"The largest ESM3 (98 billion parameters) was trained with 1.07e24 FLOPs on 2.78 billion proteins and 771 billion unique tokens. To create esmGFP we used the 7 billion parameter variant of ESM3. We'll use this model via the [EvolutionaryScale Forge](https://forge.evolutionaryscale.ai) API.\n",
8182
"\n",
82-
"Grab a token from [Forge](https://forge.evolutionaryscale.ai/) and add it below. Note that your token is like a password for your account and you should take care to protect it. For this reason it is recommended to frequently create a new token and delete old, unused ones. It is also recommended to paste the token directly into an environment variable or use a utility like `getpass` as shown below so tokens are not accidentally shared or checked into code repositories.\n"
83+
"Grab a token from [the Forge console](https://forge.evolutionaryscale.ai/console) and add it below. Note that your token is like a password for your account and you should take care to protect it. For this reason it is recommended to frequently create a new token and delete old, unused ones. It is also recommended to paste the token directly into an environment variable or use a utility like `getpass` as shown below so tokens are not accidentally shared or checked into code repositories.\n"
8384
]
8485
},
8586
{
8687
"cell_type": "code",
87-
"execution_count": null,
88+
"execution_count": 3,
8889
"metadata": {
8990
"id": "zNrU9Q2SYonX"
9091
},
9192
"outputs": [],
9293
"source": [
93-
"token = getpass(\"Token from Forge: \")"
94+
"token = getpass(\"Token from Forge console: \")"
9495
]
9596
},
9697
{

cookbook/tutorials/4_forge_generate.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"\n",
3737
"!pip install py3Dmol\n",
3838
"import py3Dmol\n",
39+
"\n",
3940
"from esm.sdk import client\n",
4041
"from esm.sdk.api import ESMProtein, GenerationConfig\n",
4142
"from esm.utils.structure.protein_chain import ProteinChain"
@@ -52,7 +53,7 @@
5253
"cell_type": "markdown",
5354
"metadata": {},
5455
"source": [
55-
"Grab a token from [Forge](https://forge.evolutionaryscale.ai/) and add it below. Note that your token is like a password for your account and you should take care to protect it. For this reason it is recommended to frequently create a new token and delete old, unused ones. It is also recommended to paste the token directly into an environment variable or use a utility like `getpass` as shown below so tokens are not accidentally shared or checked into code repositories."
56+
"Grab a token from [the Forge console](https://forge.evolutionaryscale.ai/console) and add it below. Note that your token is like a password for your account and you should take care to protect it. For this reason it is recommended to frequently create a new token and delete old, unused ones. It is also recommended to paste the token directly into an environment variable or use a utility like `getpass` as shown below so tokens are not accidentally shared or checked into code repositories."
5657
]
5758
},
5859
{
@@ -63,7 +64,7 @@
6364
"source": [
6465
"from getpass import getpass\n",
6566
"\n",
66-
"token = getpass(\"Token from Forge: \")\n",
67+
"token = getpass(\"Token from Forge console: \")\n",
6768
"model = client(model=\"esm3-open\", url=\"https://forge.evolutionaryscale.ai\", token=token)"
6869
]
6970
},

cookbook/tutorials/5_guided_generation.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"source": [
5050
"import biotite.structure as bs\n",
5151
"import py3Dmol\n",
52+
"\n",
5253
"from esm.sdk.api import ESMProtein, GenerationConfig\n",
5354
"from esm.sdk.experimental import ESM3GuidedDecoding, GuidedDecodingScoringFunction"
5455
]
@@ -119,7 +120,7 @@
119120
"\n",
120121
"from esm.sdk import client\n",
121122
"\n",
122-
"token = getpass(\"Token from Forge: \")\n",
123+
"token = getpass(\"Token from Forge console: \")\n",
123124
"model = client(\n",
124125
" model=\"esm3-medium-2024-08\", url=\"https://forge.evolutionaryscale.ai\", token=token\n",
125126
")"

esm/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
__version__ = "3.2.2.post1"
2-
1+
__version__ = "3.2.2"

esm/layers/attention.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
import torch.nn.functional as F
66
from torch import nn
77

8-
from esm.layers.rotary import (
9-
RotaryEmbedding,
10-
TritonRotaryEmbedding,
11-
)
8+
from esm.layers.rotary import RotaryEmbedding, TritonRotaryEmbedding
129

1310
try:
1411
from flash_attn import flash_attn_varlen_qkvpacked_func

0 commit comments

Comments
 (0)