{ "cells": [ { "cell_type": "markdown", "id": "c35e567a-517a-4995-8aa9-350d777d6c34", "metadata": { "tags": [] }, "source": [ "# Module 2: Run Protein Structure Design and Protein Structure Prediction\n" ] }, { "cell_type": "markdown", "id": "349a9fdf-0b63-4439-bd00-13405b03e142", "metadata": {}, "source": [ "NOTE: The authors recommend running this notebook in Amazon SageMaker Studio with the following environment settings: \n", "* **PyTorch 1.13 Python 3.9 GPU-optimized** image \n", "* **Python 3** kernel \n", "* **ml.g4dn.xlarge** instance type \n", "\n", "---" ] }, { "cell_type": "markdown", "id": "a7d6f50f-8480-4776-acb4-0011962b6641", "metadata": {}, "source": [ "Analyzing large macromolecules like proteins is an essential part of designing new therapeutics. Recently, a number of deep-learning based approaches have improved the speed and accuracy of protein structure analysis. Some of these methods are shown in the image below.\n", "\n", "![A diagram of common protein structure design steps](img/01.png)\n", "\n", "In this module, we will use several AI algorithms to design **new** variants of the heavy chain for the structure of Herceptin (Trastuzumab). The steps for the pipeline are as follows:\n", "\n", "* [RFDiffusion](https://github.com/RosettaCommons/RFdiffusion) is used to generate a small number of variant designs. We will only attempt to redesign parts of the variable region.\n", "\n", "* [ProteinMPNN](https://github.com/dauparas/ProteinMPNN) is then used to discover novel sequences that are expected to fold to the novel structure.\n", "\n", "* [ESMFold](https://github.com/facebookresearch/esm) is then used to score each of the candidate proteins. ESMFold returns the average predicted local distance difference test (pLDDT) score; which represents the confidence (averaged over all residues) in the predicted structure. This will be used to assess whether the predicted structure is likely to be correct.\n", "\n", "For running ESMFold, we will use the ESMFold endpoint deployed in Module 1, so please ensure that you have run that module **before** running this one." ] }, { "cell_type": "markdown", "id": "f3439cfe-4302-4c67-81d6-ab416019f5f4", "metadata": {}, "source": [ "---\n", "## 1. Setup and installation" ] }, { "cell_type": "markdown", "id": "954d42aa-dc06-4dd4-88e7-4e154b6c8429", "metadata": {}, "source": [ "Install RFDiffusion and it's dependencies" ] }, { "cell_type": "code", "execution_count": null, "id": "715d02b9-dc64-4fec-b8de-dd76f2df32c9", "metadata": { "tags": [] }, "outputs": [], "source": [ "%pip install -U -q -r protein-design-requirements.txt --disable-pip-version-check" ] }, { "cell_type": "markdown", "id": "0c147e3f-f8aa-4f69-adf5-7b8a2229f263", "metadata": {}, "source": [ "Download and extract the RFDiffusion and ProteinMPNN model weights (This will take several minutes)" ] }, { "cell_type": "code", "execution_count": null, "id": "64bc76b6-4ff0-4595-b1fa-300a705be5cb", "metadata": { "tags": [] }, "outputs": [], "source": [ "%%bash\n", "mkdir -p \"data/weights/rfdiffusion\" \"data/weights/proteinmpnn\" \n", "aws s3 cp --no-sign-request \"s3://aws-batch-architecture-for-alphafold-public-artifacts/compressed/rfdiffusion_parameters_220407.tar.gz\" \"weights.tar.gz\"\n", "tar --extract -z --file=\"weights.tar.gz\" --directory=\"data/weights/rfdiffusion\" --no-same-owner\n", "rm \"weights.tar.gz\"\n", "wget -q -P \"data/weights/proteinmpnn\" https://github.com/dauparas/ProteinMPNN/raw/main/vanilla_model_weights/v_48_020.pt\n", "wget -q -P \"data\" https://files.rcsb.org/download/1N8Z.pdb" ] }, { "cell_type": "markdown", "id": "d32f66e4-9b21-4d2b-bce9-48c7b22aa861", "metadata": {}, "source": [ "---\n", "## 2. Generate new heavy chain structures with RFdiffusion\n", "First we will run RFdiffusion to generate some novel protein structures. To do this, we give the model a starting structure and tell it which which parts to change. We want it to redesign **only** the residues 98-109 on the B chain, while keeping the rest of the structure the same.\n", "\n", "Let's take a look at the regions of interest. In the following view, the part of the heavy chain we want to redesign is colored blue and the target region is in green.\n", "\n", "![A view of the antibody heavy chain in blue and the target molecule in green](img/herceptin_redesign_target.png)\n" ] }, { "cell_type": "code", "execution_count": null, "id": "f2ffc610-9566-4c87-98aa-539ad302a289", "metadata": { "tags": [] }, "outputs": [], "source": [ "import py3Dmol\n", "\n", "view = py3Dmol.view(width=600, height=400)\n", "with open(\"data/1N8Z.pdb\") as ifile:\n", " experimental_structure = \"\".join([x for x in ifile])\n", "view.addModel(experimental_structure)\n", "view.setStyle({\"chain\": \"A\"}, {\"opacity\": 0})\n", "view.setStyle({\"chain\": \"B\"}, {\"cartoon\": {\"color\": \"blue\", \"opacity\": 0.4}})\n", "view.addStyle(\n", " {\"chain\": \"B\", \"resi\": \"98-109\"}, {\"cartoon\": {\"color\": \"#57C4F8\", \"opacity\": 1.0}}\n", ")\n", "view.setStyle({\"chain\": \"C\"}, {\"cartoon\": {\"color\": \"green\", \"opacity\": 0.4}})\n", "view.setStyle(\n", " {\"chain\": \"C\", \"resi\": \"540-580\"}, {\"cartoon\": {\"color\": \"#37F20E\", \"opacity\": 1.0}}\n", ")\n", "view.zoomTo()\n", "view.show()" ] }, { "cell_type": "markdown", "id": "d3856c56-e4e7-4e3d-a743-e501215ce6a1", "metadata": { "tags": [] }, "source": [ "Here are our design constraints:\n", "\n", "- Look at residues 540-580 of the target molecule (green structure in image above)\n", "- Create a new structure that includes residues 1-97 of the heavy chain (blue above), then generate 10 new residues, then add residues 110-120 from the heavy chain.\n", "- Use residues 570 and 573 from the target molecule as \"hotspots\", meaning we want to make sure that the new structure interacts with these specific amino acids.\n", "- Create 4 designs in total\n", "- Leave the rest of the RFdiffusion parameters as the default values\n", "\n", "The RFDiffusion job will take about 5 minutes to complete on a ml.g4dn.xlarge instance type." ] }, { "cell_type": "code", "execution_count": null, "id": "d6c003d7-6f06-4da7-b25c-44d77334d126", "metadata": { "tags": [] }, "outputs": [], "source": [ "%%time\n", "!mkdir -p data/results/rfdiffusion\n", "\n", "from prothelpers.rfdiffusion import create_structures\n", "\n", "create_structures(\n", " overrides=[\n", " \"inference.input_pdb=data/1N8Z.pdb\",\n", " \"inference.output_prefix=data/results/rfdiffusion/rfdiffusion_result\",\n", " \"inference.model_directory_path=data/weights/rfdiffusion\",\n", " \"contigmap.contigs=[C540-580/0 B1-97/13/B110-120]\",\n", " \"ppi.hotspot_res=[C570,C573]\",\n", " \"inference.num_designs=4\",\n", " ]\n", ")" ] }, { "cell_type": "markdown", "id": "6f2a0b2f-9e50-4501-a81a-2e0314516b7b", "metadata": {}, "source": [ "Our new designs are in the `data/results/rfdiffusion` folder. Let's take a look at them." ] }, { "cell_type": "code", "execution_count": null, "id": "0309a81c-c345-466b-b8ab-dc4e4d9817fe", "metadata": { "tags": [] }, "outputs": [], "source": [ "from prothelpers.structure import extract_structures_from_dir, create_tiled_py3dmol_view\n", "\n", "rfdiffusion_results_dir = \"data/results/rfdiffusion\"\n", "structures = extract_structures_from_dir(rfdiffusion_results_dir)\n", "\n", "view = create_tiled_py3dmol_view(structures, total_cols=2)\n", "\n", "view.setStyle({\"chain\": \"A\"}, {\"cartoon\": {\"color\": \"blue\", \"opacity\": 0.4}})\n", "view.setStyle(\n", " {\"chain\": \"A\", \"resi\": \"98-109\"}, {\"cartoon\": {\"color\": \"#57C4F8\", \"opacity\": 1.0}}\n", ")\n", "view.setStyle({\"chain\": \"B\"}, {\"cartoon\": {\"color\": \"green\"}})\n", "\n", "view.zoomTo()\n", "view.show()" ] }, { "cell_type": "markdown", "id": "071f3f9a-306f-4a71-99f5-4a8d8aa5dae1", "metadata": { "tags": [] }, "source": [ "## 3. Translate Structure into Sequence with ProteinMPNN\n", "ProteinMPNN is a tool for **inverse protein folding**. In inverse protein folding, the input is a protien tertiary structure, while the output is a sequence (or sequences) that are predicted to fold in the specified structure. Here is a schematic for how it works:\n", "
\n", " \"A\n", "
\n", " \n", "*image credit: https://huggingface.co/spaces/simonduerr/ProteinMPNN.* \n", " \n", "ProteinMPNN will returns the sequences in [FASTA format](https://software.broadinstitute.org/software/igv/FASTA). Here's an example for the Herceptin Fab antibody that we want to redesign:\n", "```\n", ">1N8Z_2|Chain B|Herceptin Fab (antibody) - heavy chain|Mus musculus (10090)\n", "EVQLVESGGGLVQPGGSLRLSCAASGFNIKDTYIHWVRQAPGKGLEWVARIYPTNGYTRYADSVKGRFTISADTSKN\n", "TAYLQMNSLRAEDTAVYYC**SRWGGDGFYAMDY**WGQGTLVTVSSASTKGPSVFPLAPSSKSTSGGTAALGCLVK\n", "DYFPEPVTVSWNSGALTSGVHTFPAVLQSSGLYSLSSVVTVPSSSLGTQTYICNVNHKPSNTKVDKKVEP\n", "```\n" ] }, { "cell_type": "markdown", "id": "f4ed84e5-1024-4bf2-a573-162fce30615e", "metadata": {}, "source": [ "We gather the locations of the RFDiffusion output structures and submit them to ProteinMPNN. This will take about 15 seconds on a ml.g4dn.xlarge instance." ] }, { "cell_type": "code", "execution_count": null, "id": "001e2f63-2feb-444a-be25-578dcc486736", "metadata": { "tags": [] }, "outputs": [], "source": [ "%%time\n", "!mkdir -p data/results/proteinmpnn\n", "\n", "from prothelpers import proteinmpnn\n", "from prothelpers.sequence import list_files_in_dir\n", "\n", "rfdiffusion_candidates = list_files_in_dir(rfdiffusion_results_dir, extension=\".pdb\")\n", "\n", "proteinmpnn_results_dir = \"data/results/proteinmpnn\"\n", "\n", "for path in rfdiffusion_candidates:\n", " proteinmpnn.design(\n", " pdb_path=path,\n", " out_folder=proteinmpnn_results_dir,\n", " num_seq_per_target=4,\n", " pdb_path_chains=\"A\",\n", " path_to_model_weights=\"data/weights/proteinmpnn\",\n", " batch_size=1,\n", " suppress_print=1,\n", " )" ] }, { "cell_type": "markdown", "id": "b2886d2d-24a3-46df-83b1-4f81ff4a0dcd", "metadata": {}, "source": [ "Let's look at the results" ] }, { "cell_type": "code", "execution_count": null, "id": "da8f1f07-078f-4a9d-a24f-32382d9cd99e", "metadata": { "tags": [] }, "outputs": [], "source": [ "import os\n", "from prothelpers.sequence import extract_seqs_from_dir\n", "\n", "mpnn_dir = os.path.join(proteinmpnn_results_dir, \"seqs\")\n", "mpnn_sequences = extract_seqs_from_dir(mpnn_dir, extension=\"fa\")\n", "print(mpnn_sequences)" ] }, { "cell_type": "markdown", "id": "a30dd6b3-dd23-4ee7-8db6-0776fdb77f2c", "metadata": {}, "source": [ "## Run Inference on ESMFold\n", "\n", "ProteinMPNN has generated 16 new sequences, 4 per predicted structure. But which one should we test in the lab? There are lots of metrics we could use, like isoelectric point, patent status, or homology with other sequences. For this example, we're going to measure the \"foldability\" of each sequence using ESMFold. This is a popular way to identify those sequences that are most similar to other experimentally-determined structures. Specifically, we'll use the average predicted local distance difference test (pLDDT) score, a measure of the ESMFold prediction confidence.\n", "\n", "** NOTE: STOP HERE if you have not finished deploying the ESMFold prediction endpoint from module 1.**" ] }, { "cell_type": "code", "execution_count": null, "id": "16b954fc-aa7d-4937-85f2-375d0619905d", "metadata": { "tags": [] }, "outputs": [], "source": [ "%store -r endpoint_name" ] }, { "cell_type": "code", "execution_count": null, "id": "12eea790-6834-46b1-8f2a-34b3812a6b67", "metadata": { "tags": [] }, "outputs": [], "source": [ "import boto3\n", "\n", "# Wait until ESMFold endpoint from module 1 is in service\n", "waiter = boto3.client('sagemaker').get_waiter('endpoint_in_service')\n", "waiter.wait(EndpointName=endpoint_name)" ] }, { "cell_type": "code", "execution_count": null, "id": "23163003-360f-4b91-baa6-9c403f8bf549", "metadata": { "tags": [] }, "outputs": [], "source": [ "%%time\n", "!mkdir -p data/results/esmfold\n", "\n", "import json\n", "from prothelpers.structure import get_mean_plddt\n", "import pandas as pd\n", "import sagemaker\n", "from sagemaker.predictor import Predictor\n", "\n", "predictor = Predictor(\n", " endpoint_name=endpoint_name,\n", " sagemaker_session=sagemaker.Session(),\n", " serializer=sagemaker.serializers.CSVSerializer(),\n", " deserializer=sagemaker.deserializers.StringDeserializer(),\n", ")\n", "\n", "metrics = []\n", "for i, seq in enumerate(mpnn_sequences):\n", " print(f\"Generating structure prediction {i} for {seq}\")\n", " esmfold_output = json.loads(predictor.predict(seq))[0]\n", " mean_plddt = get_mean_plddt(esmfold_output)\n", " output_file = f\"data/results/esmfold/prediction_{i}.pdb\"\n", " with open(output_file, \"w\") as f:\n", " f.write(esmfold_output)\n", " metrics.append(\n", " {\"seq\": seq, \"esmfold_result\": output_file, \"mean_plddt\": mean_plddt}\n", " )\n", "\n", "metrics_df = (\n", " pd.DataFrame(metrics)\n", " .sort_values(by=\"mean_plddt\", ascending=False)\n", " .reset_index(drop=True)\n", ")\n", "metrics_df" ] }, { "cell_type": "markdown", "id": "36e2a95e-650c-4e47-a436-491b8283f694", "metadata": {}, "source": [ "You can see from the results above that the designed proteins have a PLDDT of 0.8 or greater, meaning that ESMFold has high confidence in the structures. The highest-scoring sequences are good candidates for synthesis and testing." ] }, { "cell_type": "markdown", "id": "0623181f-3853-4376-947d-3761f9ec8160", "metadata": { "tags": [] }, "source": [ "Here is a screenshot of one example of the designed antibody (blue) superimposed on the orignal antibody (green). The orange and red corresponds to the extracellular domain of HER2. Note that the structure of the designed antibody is similair, but not identical to the original.\n", "\n", "![Picture of designed protein](img/03.png)\n" ] }, { "cell_type": "markdown", "id": "d8f890af-db91-42f5-b352-1ffc1d250422", "metadata": {}, "source": [ "When you are finished with this module, uncomment and run the cell below to delete the ESMFold endpoint." ] }, { "cell_type": "code", "execution_count": null, "id": "c2380aaf-5313-43f9-86f5-5336e1d1bca8", "metadata": { "tags": [] }, "outputs": [], "source": [ "%store -z\n", "\n", "try:\n", " predictor.delete_endpoint()\n", "except:\n", " pass" ] }, { "cell_type": "code", "execution_count": null, "id": "e8028bb8-51de-4250-adc1-2b7839325240", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "availableInstances": [ { "_defaultOrder": 0, "_isFastLaunch": true, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 4, "name": "ml.t3.medium", "vcpuNum": 2 }, { "_defaultOrder": 1, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 8, "name": "ml.t3.large", "vcpuNum": 2 }, { "_defaultOrder": 2, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 16, "name": "ml.t3.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 3, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 32, "name": "ml.t3.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 4, "_isFastLaunch": true, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 8, "name": "ml.m5.large", "vcpuNum": 2 }, { "_defaultOrder": 5, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 16, "name": "ml.m5.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 6, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 32, "name": "ml.m5.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 7, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 64, "name": "ml.m5.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 8, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 128, "name": "ml.m5.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 9, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 192, "name": "ml.m5.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 10, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 256, "name": "ml.m5.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 11, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 384, "name": "ml.m5.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 12, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 8, "name": "ml.m5d.large", "vcpuNum": 2 }, { "_defaultOrder": 13, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 16, "name": "ml.m5d.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 14, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 32, "name": "ml.m5d.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 15, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 64, "name": "ml.m5d.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 16, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 128, "name": "ml.m5d.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 17, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 192, "name": "ml.m5d.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 18, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 256, "name": "ml.m5d.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 19, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 384, "name": "ml.m5d.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 20, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "hideHardwareSpecs": true, "memoryGiB": 0, "name": "ml.geospatial.interactive", "supportedImageNames": [ "sagemaker-geospatial-v1-0" ], "vcpuNum": 0 }, { "_defaultOrder": 21, "_isFastLaunch": true, "category": "Compute optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 4, "name": "ml.c5.large", "vcpuNum": 2 }, { "_defaultOrder": 22, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 8, "name": "ml.c5.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 23, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 16, "name": "ml.c5.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 24, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 32, "name": "ml.c5.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 25, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 72, "name": "ml.c5.9xlarge", "vcpuNum": 36 }, { "_defaultOrder": 26, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 96, "name": "ml.c5.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 27, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 144, "name": "ml.c5.18xlarge", "vcpuNum": 72 }, { "_defaultOrder": 28, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 192, "name": "ml.c5.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 29, "_isFastLaunch": true, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 16, "name": "ml.g4dn.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 30, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 32, "name": "ml.g4dn.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 31, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 64, "name": "ml.g4dn.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 32, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 128, "name": "ml.g4dn.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 33, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 4, "hideHardwareSpecs": false, "memoryGiB": 192, "name": "ml.g4dn.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 34, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 256, "name": "ml.g4dn.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 35, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 61, "name": "ml.p3.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 36, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 4, "hideHardwareSpecs": false, "memoryGiB": 244, "name": "ml.p3.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 37, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 8, "hideHardwareSpecs": false, "memoryGiB": 488, "name": "ml.p3.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 38, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 8, "hideHardwareSpecs": false, "memoryGiB": 768, "name": "ml.p3dn.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 39, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 16, "name": "ml.r5.large", "vcpuNum": 2 }, { "_defaultOrder": 40, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 32, "name": "ml.r5.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 41, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 64, "name": "ml.r5.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 42, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 128, "name": "ml.r5.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 43, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 256, "name": "ml.r5.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 44, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 384, "name": "ml.r5.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 45, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 512, "name": "ml.r5.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 46, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "hideHardwareSpecs": false, "memoryGiB": 768, "name": "ml.r5.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 47, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 16, "name": "ml.g5.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 48, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 32, "name": "ml.g5.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 49, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 64, "name": "ml.g5.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 50, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 128, "name": "ml.g5.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 51, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "hideHardwareSpecs": false, "memoryGiB": 256, "name": "ml.g5.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 52, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 4, "hideHardwareSpecs": false, "memoryGiB": 192, "name": "ml.g5.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 53, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 4, "hideHardwareSpecs": false, "memoryGiB": 384, "name": "ml.g5.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 54, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 8, "hideHardwareSpecs": false, "memoryGiB": 768, "name": "ml.g5.48xlarge", "vcpuNum": 192 }, { "_defaultOrder": 55, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 8, "hideHardwareSpecs": false, "memoryGiB": 1152, "name": "ml.p4d.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 56, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 8, "hideHardwareSpecs": false, "memoryGiB": 1152, "name": "ml.p4de.24xlarge", "vcpuNum": 96 } ], "instance_type": "ml.g4dn.xlarge", "kernelspec": { "display_name": "Python 3 (PyTorch 1.13 Python 3.9 GPU Optimized)", "language": "python", "name": "python3__SAGEMAKER_INTERNAL__arn:aws:sagemaker:us-east-1:081325390199:image/pytorch-1.13-gpu-py39" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.16" } }, "nbformat": 4, "nbformat_minor": 5 }