|
11 | 11 | },
|
12 | 12 | {
|
13 | 13 | "cell_type": "code",
|
14 |
| - "execution_count": null, |
| 14 | + "execution_count": 1, |
15 | 15 | "metadata": {},
|
16 |
| - "outputs": [], |
| 16 | + "outputs": [ |
| 17 | + { |
| 18 | + "name": "stderr", |
| 19 | + "output_type": "stream", |
| 20 | + "text": [ |
| 21 | + "/Users/zadorozk/Desktop/code/lobster/.venv/lib/python3.12/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", |
| 22 | + " from .autonotebook import tqdm as notebook_tqdm\n" |
| 23 | + ] |
| 24 | + }, |
| 25 | + { |
| 26 | + "name": "stdout", |
| 27 | + "output_type": "stream", |
| 28 | + "text": [ |
| 29 | + "Supported modalities: ['SMILES', 'amino_acid', 'nucleotide', '3d_coordinates']\n", |
| 30 | + "Vocab size: 1536\n" |
| 31 | + ] |
| 32 | + } |
| 33 | + ], |
17 | 34 | "source": [
|
18 | 35 | "from lobster.model import Ume\n",
|
19 | 36 | "\n",
|
20 |
| - "checkpoint = \"<your checkpoint>\"\n", |
| 37 | + "ume = Ume()\n", |
21 | 38 | "\n",
|
22 |
| - "ume = Ume(checkpoint, freeze=True)" |
| 39 | + "print(f\"Supported modalities: {ume.modalities}\")\n", |
| 40 | + "print(f\"Vocab size: {len(ume.get_vocab())}\")" |
| 41 | + ] |
| 42 | + }, |
| 43 | + { |
| 44 | + "cell_type": "markdown", |
| 45 | + "metadata": {}, |
| 46 | + "source": [ |
| 47 | + "### Load from checkpoint" |
| 48 | + ] |
| 49 | + }, |
| 50 | + { |
| 51 | + "cell_type": "code", |
| 52 | + "execution_count": null, |
| 53 | + "metadata": {}, |
| 54 | + "outputs": [], |
| 55 | + "source": [ |
| 56 | + "checkpoint = \"ume-checkpoints/last.ckpt\" # Replace with the correct checkpoint path\n", |
| 57 | + "\n", |
| 58 | + "ume = Ume.load_from_checkpoint(checkpoint)" |
23 | 59 | ]
|
24 | 60 | },
|
25 | 61 | {
|
|
208 | 244 | }
|
209 | 245 | ],
|
210 | 246 | "metadata": {
|
| 247 | + "kernelspec": { |
| 248 | + "display_name": ".venv", |
| 249 | + "language": "python", |
| 250 | + "name": "python3" |
| 251 | + }, |
211 | 252 | "language_info": {
|
212 |
| - "name": "python" |
| 253 | + "codemirror_mode": { |
| 254 | + "name": "ipython", |
| 255 | + "version": 3 |
| 256 | + }, |
| 257 | + "file_extension": ".py", |
| 258 | + "mimetype": "text/x-python", |
| 259 | + "name": "python", |
| 260 | + "nbconvert_exporter": "python", |
| 261 | + "pygments_lexer": "ipython3", |
| 262 | + "version": "3.12.9" |
213 | 263 | }
|
214 | 264 | },
|
215 | 265 | "nbformat": 4,
|
|
0 commit comments