{ "cells": [ { "cell_type": "markdown", "id": "432d9996-f346-417b-b149-2ab301934829", "metadata": {}, "source": [ "# How to use Vector Enrichment Jobs for Map Matching" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "---\n", "\n", "This notebook's CI test result for us-west-2 is as follows. CI test results in other regions can be found at the end of the notebook. \n", "\n", "![This us-west-2 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/us-west-2/sagemaker-geospatial|vector-enrichment-map-matching|vector-enrichment-map-matching.ipynb)\n", "\n", "---" ] }, { "cell_type": "markdown", "id": "c848d74f-927f-4d9c-93a6-6bffb8ff684b", "metadata": {}, "source": [ "This notebook demonstrates how to use Amazon SageMaker geospatial capabilities to perform a vector-based map matching operation and visualize the results.\n", "\n", "Map matching allows you to snap GPS coordinates to road segments. With Amazon SageMaker geospatial capabilities it is possible to perform a Vector Enrichtment Job (VEJ) for map matching. This type of job takes a CSV file with route information (such as longitude, latitude and timestamps of GPS measurements) as input, and produces a GeoJSON file that contains the predicted route.\n", "\n", "The workflow is as follows:\n", "\n", "- Step 1: [Import SageMaker geospatial capabilities SDK](#Import-SageMaker-geospatial-capabilities-SDK)\n", "- Step 2: [Inspect input data and upload to S3](#Inspect-input-data-and-upload-to-S3)\n", "- Step 3: [Create an Vector Enrichtment Job (VEJ) for match making](#Create-an-Vector-Enrichtment-Job-for-match-making)\n", "- Step 4: [Export VEJ output to S3](#Export-VEJ-output-to-S3)\n", "- Step 5: [Visualize predicted routes in Amazon SageMaker geospatial Map SDK](#Visualize-predicted-routes-in-Amazon-SageMaker-geospatial-Map-SDK)" ] }, { "cell_type": "markdown", "id": "7757ae92-ea99-4b57-a037-cb5fe78498ed", "metadata": {}, "source": [ "## Prerequisites\n", "\n", "This notebook runs with Kernel Geospatial 1.0. Note that the following policies need to be attached to the execution role that you used to run this notebook:\n", "\n", "- AmazonSageMakerFullAccess\n", "- AmazonSageMakerGeospatialFullAccess\n", "\n", "You can see the policies attached to the role in the IAM console under the permissions tab. If required, add the roles using the 'Add Permissions' button.\n", "\n", "In addition to these policies, ensure that the execution role's trust policy allows the SageMaker-GeoSpatial service to assume the role. This can be done by adding the following trust policy using the 'Trust relationships' tab:\n", "\n", "```\n", "{\n", " \"Version\": \"2012-10-17\",\n", " \"Statement\": [\n", " {\n", " \"Effect\": \"Allow\",\n", " \"Principal\": {\n", " \"Service\": [\n", " \"sagemaker.amazonaws.com\",\n", " \"sagemaker-geospatial.amazonaws.com\"\n", " ]\n", " },\n", " \"Action\": \"sts:AssumeRole\"\n", " }\n", " ]\n", "}\n", "```" ] }, { "cell_type": "markdown", "id": "1ea44c84-3cd9-4237-95f6-42354e7069be", "metadata": { "tags": [] }, "source": [ "## Import SageMaker geospatial capabilities SDK" ] }, { "cell_type": "code", "execution_count": null, "id": "0c84464c-cce2-4e0a-af2a-dccbe1e35d1b", "metadata": { "tags": [] }, "outputs": [], "source": [ "import boto3\n", "import sagemaker\n", "import sagemaker_geospatial_map\n", "\n", "session = boto3.Session()\n", "execution_role = sagemaker.get_execution_role()\n", "geospatial_client = session.client(service_name=\"sagemaker-geospatial\")" ] }, { "cell_type": "markdown", "id": "4e75e232-17ac-434a-996f-c399a25e81a2", "metadata": { "tags": [] }, "source": [ "## Inspect input data and upload to S3\n", "\n", "The following cells will upload the example input data (synthetic GPS traces in CSV format) to a S3 bucket. The CSV file needs to contain a header line. The header names are used in the `MapMatchingConfig` for the Vector Enrichment Job for mapping the CSV columns to the expected attributes." ] }, { "cell_type": "code", "execution_count": null, "id": "4bcee312-41ac-4212-b0d0-0e081daada83", "metadata": { "tags": [] }, "outputs": [], "source": [ "import pandas as pd\n", "\n", "input_df = pd.read_csv(\"./data/example_gps_traces.csv\")\n", "input_df" ] }, { "cell_type": "code", "execution_count": null, "id": "aa9c2a1f-02dd-4188-8427-832ec9c93f2d", "metadata": { "tags": [] }, "outputs": [], "source": [ "import boto3\n", "\n", "sagemaker_session = sagemaker.Session()\n", "s3_bucket = sagemaker_session.default_bucket() # Alternatively you can use your custom bucket here.\n", "bucket_prefix = \"vej_example_map_matching\"\n", "map_matching_input_object_key = f\"{bucket_prefix}/input/example_gps_traces.csv\"\n", "\n", "s3_client = boto3.client(\"s3\")\n", "response = s3_client.upload_file(\"./data/example_gps_traces.csv\", s3_bucket, map_matching_input_object_key)" ] }, { "cell_type": "markdown", "id": "5b6eafe2-524c-453d-a2fe-eb2cd066c70c", "metadata": {}, "source": [ "## Create an Vector Enrichtment Job for match making\n", "\n", "The following cell will define and start a Vector Enrichment Job for a map matching operation. Selected headers of the CSV file are mapped to required attributes for the map matching algorithm." ] }, { "cell_type": "code", "execution_count": null, "id": "fc1fa4c2-c688-4835-93cf-66207420517f", "metadata": { "tags": [] }, "outputs": [], "source": [ "job_config = {\n", " \"MapMatchingConfig\": {\n", " \"IdAttributeName\": \"route_id\",\n", " \"TimestampAttributeName\": \"timestamp\",\n", " \"XAttributeName\": \"longitude\",\n", " \"YAttributeName\": \"latitude\",\n", " },\n", "}\n", "\n", "input_config = {\n", " \"DataSourceConfig\": {\"S3Data\": {\"S3Uri\": f\"s3://{s3_bucket}/{map_matching_input_object_key}\"}},\n", " \"DocumentType\": \"CSV\",\n", "}\n", "\n", "response = geospatial_client.start_vector_enrichment_job(\n", " Name=\"vej_example_map_matching\",\n", " ExecutionRoleArn=execution_role,\n", " InputConfig=input_config,\n", " JobConfig=job_config,\n", ")\n", "\n", "vej_arn = response[\"Arn\"]\n", "vej_arn" ] }, { "cell_type": "code", "execution_count": null, "id": "7b90bd82-d642-49c9-b735-1d28d17baa2d", "metadata": { "tags": [] }, "outputs": [], "source": [ "import time\n", "import datetime\n", "\n", "# check status of created Vector Enrichtment Job and wait until it is completed\n", "job_completed = False\n", "while not job_completed:\n", " response = geospatial_client.get_vector_enrichment_job(Arn=vej_arn)\n", " print(\n", " \"Job status: {} (Last update: {})\".format(response[\"Status\"], datetime.datetime.now()),\n", " end=\"\\r\",\n", " )\n", " job_completed = True if response[\"Status\"] == \"COMPLETED\" else False\n", " if not job_completed:\n", " time.sleep(30)" ] }, { "cell_type": "markdown", "id": "f3d7a121-89b1-4296-bfba-0105c700830b", "metadata": { "tags": [] }, "source": [ "## Export VEJ output to S3\n", "\n", "An export of a map matching VEJ produces the following output artifacts:\n", "- `links.geojson` is a GeoJSON file containing links of the predicted route\n", "- `waypoints.geojson` is a GeoJSON file containing the snap points provided in the input\n", "- `mapmatch_output.json` is a regular JSON file containing links and snap points in a combined fashion\n", "\n", "The following cell will export the output of the VEJ into a S3 bucket." ] }, { "cell_type": "code", "execution_count": null, "id": "37077cd3-e5ba-4118-9d61-803bc9b119d8", "metadata": { "tags": [] }, "outputs": [], "source": [ "bucket_output_prefix = f\"{bucket_prefix}/output/\"\n", "\n", "response = geospatial_client.export_vector_enrichment_job(\n", " Arn=vej_arn,\n", " ExecutionRoleArn=execution_role,\n", " OutputConfig={\"S3Data\": {\"S3Uri\": f\"s3://{s3_bucket}/{bucket_output_prefix}\"}},\n", ")\n", "\n", "# Wait until VEJ has been exported to S3\n", "while not response[\"ExportStatus\"] == \"SUCCEEDED\":\n", " response = geospatial_client.get_vector_enrichment_job(Arn=vej_arn)\n", " print(\n", " \"Export status: {} (Last update: {})\".format(\n", " response[\"ExportStatus\"], datetime.datetime.now()\n", " ),\n", " end=\"\\r\",\n", " )\n", " if not response[\"ExportStatus\"] == \"SUCCEEDED\":\n", " time.sleep(15)" ] }, { "cell_type": "markdown", "id": "5187b7d9-be49-4bbf-9bfd-72d12d504f2b", "metadata": { "tags": [] }, "source": [ "## Visualize predicted routes in Amazon SageMaker geospatial Map SDK\n", "\n", "The following cells will create an interactive map with the Amazon SageMaker geospatial Map SDK. The output data of the VEJ, the predicted routes, will be loaded from S3 into a geopandas dataframe and then visualized in the embedded map." ] }, { "cell_type": "code", "execution_count": null, "id": "2a20409b-601b-4f3c-8a20-ac0aedc6b150", "metadata": { "tags": [] }, "outputs": [], "source": [ "Map = sagemaker_geospatial_map.create_map({\"is_raster\": True})\n", "Map.set_sagemaker_geospatial_client(geospatial_client)" ] }, { "cell_type": "code", "execution_count": null, "id": "3ad9c025-f0ad-4fe3-8787-d3b9a65265b7", "metadata": { "tags": [] }, "outputs": [], "source": [ "Map.render()" ] }, { "cell_type": "markdown", "id": "cf402ffd-80d3-41e2-bb4c-fa22c3e41d13", "metadata": { "tags": [] }, "source": [ "### Load predicted route data into geopandas dataframe" ] }, { "cell_type": "code", "execution_count": null, "id": "80a19c2a-a6d2-4553-a43f-e37777c8a7da", "metadata": { "tags": [] }, "outputs": [], "source": [ "import boto3\n", "import geopandas\n", "\n", "s3_client = boto3.client(\"s3\")\n", "\n", "\n", "def get_file_content_from_s3(bucket_name, object_key):\n", " response = s3_client.get_object(Bucket=bucket_name, Key=object_key)\n", " return response.get(\"Body\")\n", "\n", "\n", "s3_bucket_resource = session.resource(\"s3\").Bucket(s3_bucket)\n", "s3_link_data_output_key = \"\"\n", "s3_waypoint_data_output_key = \"\"\n", "\n", "for s3_object in s3_bucket_resource.objects.filter(Prefix=bucket_output_prefix).all():\n", " if s3_object.key.endswith(\"links.geojson\"):\n", " s3_link_data_output_key = s3_object.key\n", " if s3_object.key.endswith(\"waypoints.geojson\"):\n", " s3_waypoint_data_output_key = s3_object.key\n", "\n", "link_df = geopandas.read_file(get_file_content_from_s3(s3_bucket, s3_link_data_output_key))\n", "waypoint_df = geopandas.read_file(get_file_content_from_s3(s3_bucket, s3_waypoint_data_output_key))" ] }, { "cell_type": "markdown", "id": "e10bdc82-79ec-46c9-873d-4db1e2aa90b8", "metadata": { "tags": [] }, "source": [ "### Add data of first drive (route_id 1) to map visualization " ] }, { "cell_type": "code", "execution_count": null, "id": "657fd515-8612-441e-9027-5553b23f8399", "metadata": {}, "outputs": [], "source": [ "dataset_links_drive_01 = Map.add_dataset(\n", " {\"data\": link_df.loc[link_df[\"driveId\"] == \"1\"], \"label\": \"drive_01_links\"},\n", " auto_create_layers=True,\n", ")\n", "\n", "dataset_waypoints_drive_01 = Map.add_dataset(\n", " {\"data\": waypoint_df.loc[waypoint_df[\"driveId\"] == \"1\"], \"label\": \"drive_01_waypoints\"},\n", " auto_create_layers=True,\n", ")" ] }, { "cell_type": "markdown", "id": "db4cfca5-8c93-4d67-858a-8d35f71e420f", "metadata": {}, "source": [ "### Add data of second drive (route_id 2) to map visualization " ] }, { "cell_type": "code", "execution_count": null, "id": "2eeff347-7860-403d-8a40-6d5614eb85f1", "metadata": { "tags": [] }, "outputs": [], "source": [ "dataset_links_drive_02 = Map.add_dataset(\n", " {\"data\": link_df.loc[link_df[\"driveId\"] == \"2\"], \"label\": \"drive_02_links\"},\n", " auto_create_layers=True,\n", ")\n", "\n", "dataset_waypoints_drive_02 = Map.add_dataset(\n", " {\"data\": waypoint_df.loc[waypoint_df[\"driveId\"] == \"2\"], \"label\": \"drive_02_waypoints\"},\n", " auto_create_layers=True,\n", ")" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## Notebook CI Test Results\n", "\n", "This notebook was tested in multiple regions. The test results are as follows, except for us-west-2 which is shown at the top of the notebook.\n", "\n", "![This us-east-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/us-east-1/sagemaker-geospatial|vector-enrichment-map-matching|vector-enrichment-map-matching.ipynb)\n", "\n", "![This us-east-2 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/us-east-2/sagemaker-geospatial|vector-enrichment-map-matching|vector-enrichment-map-matching.ipynb)\n", "\n", "![This us-west-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/us-west-1/sagemaker-geospatial|vector-enrichment-map-matching|vector-enrichment-map-matching.ipynb)\n", "\n", "![This ca-central-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/ca-central-1/sagemaker-geospatial|vector-enrichment-map-matching|vector-enrichment-map-matching.ipynb)\n", "\n", "![This sa-east-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/sa-east-1/sagemaker-geospatial|vector-enrichment-map-matching|vector-enrichment-map-matching.ipynb)\n", "\n", "![This eu-west-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/eu-west-1/sagemaker-geospatial|vector-enrichment-map-matching|vector-enrichment-map-matching.ipynb)\n", "\n", "![This eu-west-2 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/eu-west-2/sagemaker-geospatial|vector-enrichment-map-matching|vector-enrichment-map-matching.ipynb)\n", "\n", "![This eu-west-3 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/eu-west-3/sagemaker-geospatial|vector-enrichment-map-matching|vector-enrichment-map-matching.ipynb)\n", "\n", "![This eu-central-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/eu-central-1/sagemaker-geospatial|vector-enrichment-map-matching|vector-enrichment-map-matching.ipynb)\n", "\n", "![This eu-north-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/eu-north-1/sagemaker-geospatial|vector-enrichment-map-matching|vector-enrichment-map-matching.ipynb)\n", "\n", "![This ap-southeast-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/ap-southeast-1/sagemaker-geospatial|vector-enrichment-map-matching|vector-enrichment-map-matching.ipynb)\n", "\n", "![This ap-southeast-2 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/ap-southeast-2/sagemaker-geospatial|vector-enrichment-map-matching|vector-enrichment-map-matching.ipynb)\n", "\n", "![This ap-northeast-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/ap-northeast-1/sagemaker-geospatial|vector-enrichment-map-matching|vector-enrichment-map-matching.ipynb)\n", "\n", "![This ap-northeast-2 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/ap-northeast-2/sagemaker-geospatial|vector-enrichment-map-matching|vector-enrichment-map-matching.ipynb)\n", "\n", "![This ap-south-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/ap-south-1/sagemaker-geospatial|vector-enrichment-map-matching|vector-enrichment-map-matching.ipynb)\n" ] } ], "metadata": { "availableInstances": [ { "_defaultOrder": 0, "_isFastLaunch": true, "category": "General purpose", "gpuNum": 0, "memoryGiB": 4, "name": "ml.t3.medium", "vcpuNum": 2 }, { "_defaultOrder": 1, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 8, "name": "ml.t3.large", "vcpuNum": 2 }, { "_defaultOrder": 2, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 16, "name": "ml.t3.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 3, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 32, "name": "ml.t3.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 4, "_isFastLaunch": true, "category": "General purpose", "gpuNum": 0, "memoryGiB": 8, "name": "ml.m5.large", "vcpuNum": 2 }, { "_defaultOrder": 5, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 16, "name": "ml.m5.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 6, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 32, "name": "ml.m5.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 7, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 64, "name": "ml.m5.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 8, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 128, "name": "ml.m5.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 9, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 192, "name": "ml.m5.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 10, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 256, "name": "ml.m5.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 11, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 384, "name": "ml.m5.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 12, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 8, "name": "ml.m5d.large", "vcpuNum": 2 }, { "_defaultOrder": 13, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 16, "name": "ml.m5d.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 14, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 32, "name": "ml.m5d.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 15, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 64, "name": "ml.m5d.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 16, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 128, "name": "ml.m5d.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 17, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 192, "name": "ml.m5d.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 18, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 256, "name": "ml.m5d.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 19, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 384, "name": "ml.m5d.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 20, "_isFastLaunch": true, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 4, "name": "ml.c5.large", "vcpuNum": 2 }, { "_defaultOrder": 21, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 8, "name": "ml.c5.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 22, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 16, "name": "ml.c5.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 23, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 32, "name": "ml.c5.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 24, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 72, "name": "ml.c5.9xlarge", "vcpuNum": 36 }, { "_defaultOrder": 25, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 96, "name": "ml.c5.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 26, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 144, "name": "ml.c5.18xlarge", "vcpuNum": 72 }, { "_defaultOrder": 27, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 192, "name": "ml.c5.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 28, "_isFastLaunch": true, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 16, "name": "ml.g4dn.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 29, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 32, "name": "ml.g4dn.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 30, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 64, "name": "ml.g4dn.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 31, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 128, "name": "ml.g4dn.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 32, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 4, "memoryGiB": 192, "name": "ml.g4dn.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 33, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 256, "name": "ml.g4dn.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 34, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 61, "name": "ml.p3.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 35, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 4, "memoryGiB": 244, "name": "ml.p3.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 36, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 8, "memoryGiB": 488, "name": "ml.p3.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 37, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 8, "memoryGiB": 768, "name": "ml.p3dn.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 38, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 16, "name": "ml.r5.large", "vcpuNum": 2 }, { "_defaultOrder": 39, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 32, "name": "ml.r5.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 40, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 64, "name": "ml.r5.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 41, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 128, "name": "ml.r5.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 42, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 256, "name": "ml.r5.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 43, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 384, "name": "ml.r5.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 44, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 512, "name": "ml.r5.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 45, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 768, "name": "ml.r5.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 46, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 16, "name": "ml.g5.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 47, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 32, "name": "ml.g5.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 48, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 64, "name": "ml.g5.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 49, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 128, "name": "ml.g5.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 50, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 256, "name": "ml.g5.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 51, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 4, "memoryGiB": 192, "name": "ml.g5.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 52, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 4, "memoryGiB": 384, "name": "ml.g5.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 53, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 8, "memoryGiB": 768, "name": "ml.g5.48xlarge", "vcpuNum": 192 } ], "instance_type": "ml.m5.4xlarge", "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "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.10.9" }, "vscode": { "interpreter": { "hash": "e045d3f6603b4a5305841bb6d80ca774517c7fbcc1ed53357fddcd6dcb717823" } } }, "nbformat": 4, "nbformat_minor": 5 }