Skip to content

Commit aaed83a

Browse files
committed
sync 3.2.2.post1
1 parent 7454c3d commit aaed83a

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

+2513
-141
lines changed

cookbook/local/open_generate.ipynb

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

cookbook/local/raw_forwards.py

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

33
import torch
44
import torch.nn.functional as F
5-
65
from esm.pretrained import (
76
ESM3_function_decoder_v0,
87
ESM3_sm_open_v0,
@@ -13,7 +12,9 @@
1312
from esm.tokenization.function_tokenizer import (
1413
InterProQuantizedTokenizer as EsmFunctionTokenizer,
1514
)
16-
from esm.tokenization.sequence_tokenizer import EsmSequenceTokenizer
15+
from esm.tokenization.sequence_tokenizer import (
16+
EsmSequenceTokenizer,
17+
)
1718
from esm.utils.structure.protein_chain import ProteinChain
1819
from esm.utils.types import FunctionAnnotation
1920

cookbook/snippets/fold_invfold.py

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

44
import numpy as np
5-
65
from esm.sdk.api import (
76
ESM3InferenceClient,
87
ESMProtein,

cookbook/tutorials/1_esmprotein.ipynb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"outputs": [],
7373
"source": [
7474
"from biotite.database import rcsb\n",
75-
"\n",
7675
"from esm.sdk.api import ESMProtein\n",
7776
"from esm.utils.structure.protein_chain import ProteinChain\n",
7877
"from esm.utils.types import FunctionAnnotation\n",
@@ -497,9 +496,8 @@
497496
"# Functions for visualizing InterPro function annotations\n",
498497
"\n",
499498
"from dna_features_viewer import GraphicFeature, GraphicRecord\n",
500-
"from matplotlib import colormaps\n",
501-
"\n",
502499
"from esm.utils.function.interpro import InterPro, InterProEntryType\n",
500+
"from matplotlib import colormaps\n",
503501
"\n",
504502
"\n",
505503
"def visualize_function_annotations(\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 [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."
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."
5353
]
5454
},
5555
{
5656
"cell_type": "code",
57-
"execution_count": 1,
57+
"execution_count": null,
5858
"metadata": {},
5959
"outputs": [],
6060
"source": [
6161
"from getpass import getpass\n",
6262
"\n",
63-
"token = getpass(\"Token from Forge console: \")"
63+
"token = getpass(\"Token from Forge: \")"
6464
]
6565
},
6666
{

cookbook/tutorials/3_gfp_design.ipynb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
"import matplotlib.pyplot as pl\n",
6565
"import py3Dmol\n",
6666
"import torch\n",
67-
"\n",
6867
"from esm.sdk import client\n",
6968
"from esm.sdk.api import ESMProtein, GenerationConfig\n",
7069
"from esm.utils.structure.protein_chain import ProteinChain"
@@ -80,18 +79,18 @@
8079
"\n",
8180
"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",
8281
"\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"
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"
8483
]
8584
},
8685
{
8786
"cell_type": "code",
88-
"execution_count": 3,
87+
"execution_count": null,
8988
"metadata": {
9089
"id": "zNrU9Q2SYonX"
9190
},
9291
"outputs": [],
9392
"source": [
94-
"token = getpass(\"Token from Forge console: \")"
93+
"token = getpass(\"Token from Forge: \")"
9594
]
9695
},
9796
{

cookbook/tutorials/4_forge_generate.ipynb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
"\n",
3737
"!pip install py3Dmol\n",
3838
"import py3Dmol\n",
39-
"\n",
4039
"from esm.sdk import client\n",
4140
"from esm.sdk.api import ESMProtein, GenerationConfig\n",
4241
"from esm.utils.structure.protein_chain import ProteinChain"
@@ -53,7 +52,7 @@
5352
"cell_type": "markdown",
5453
"metadata": {},
5554
"source": [
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."
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."
5756
]
5857
},
5958
{
@@ -64,7 +63,7 @@
6463
"source": [
6564
"from getpass import getpass\n",
6665
"\n",
67-
"token = getpass(\"Token from Forge console: \")\n",
66+
"token = getpass(\"Token from Forge: \")\n",
6867
"model = client(model=\"esm3-open\", url=\"https://forge.evolutionaryscale.ai\", token=token)"
6968
]
7069
},

cookbook/tutorials/5_guided_generation.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
"source": [
5050
"import biotite.structure as bs\n",
5151
"import py3Dmol\n",
52-
"\n",
5352
"from esm.sdk.api import ESMProtein, GenerationConfig\n",
5453
"from esm.sdk.experimental import ESM3GuidedDecoding, GuidedDecodingScoringFunction"
5554
]
@@ -120,7 +119,7 @@
120119
"\n",
121120
"from esm.sdk import client\n",
122121
"\n",
123-
"token = getpass(\"Token from Forge console: \")\n",
122+
"token = getpass(\"Token from Forge: \")\n",
124123
"model = client(\n",
125124
" model=\"esm3-medium-2024-08\", url=\"https://forge.evolutionaryscale.ai\", token=token\n",
126125
")"

esm/__init__.py

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

esm/layers/attention.py

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

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

1013
try:
1114
from flash_attn import flash_attn_varlen_qkvpacked_func

0 commit comments

Comments
 (0)