{ "cells": [ { "cell_type": "markdown", "id": "432d9996-f346-417b-b149-2ab301934829", "metadata": {}, "source": [ "# How to use Vector Enrichment Jobs for Reverse Geocoding" ] }, { "cell_type": "markdown", "id": "982790fa", "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-reverse-geocoding|vector-enrichment-reverse-geocoding.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 reverse geocoding and visualize the results.\n", "\n", "Reverse geocoding allows you to convert geographic coordinates (latitude, longitude) to human-readable addresses powered by Amazon Location Service. With Amazon SageMaker geospatial capabilities it is possible to perform batch reverse geocoding via a Vector Enrichtment Job (VEJ). The input for this kind of VEJ is a CSV file containing longitude and latitude coordinates, and the VEJ will enrich the CSV with the address number, country, label, municipality, neighborhood, postal code and region of that location.\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)](#Create-an-Vector-Enrichtment-Job)\n", "- Step 4: [Export VEJ output to S3](#Export-VEJ-output-to-S3)\n", "- Step 5: [Visualize enriched data set in Amazon SageMaker geospatial Map SDK](#Visualize-enriched-data-set-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": "acd2c4bb-1f5c-44f6-856e-4fa45841db82", "metadata": {}, "source": [ "## Dataset: California Housing Data\n", "The California Housing dataset contains information from the 1990 California census. We will use the dataset to demonstrate how to resolve the latitude and longitude into human readable address information. The dataset contains the following columns:\n", "\n", "- `MedInc` - average income\n", "- `HouseAge` - housing average age\n", "- `TotalRooms` - total rooms\n", "- `TotalBedrms` - total bedrooms\n", "- `Population` - population\n", "- `Households` - amount of households\n", "- `Latitude` - latitude\n", "- `Longitude` - longitude\n", "\n", "The California Housing dataset was originally published in:\n", "\n", "> Pace, R. Kelley, and Ronald Barry. \"Sparse spatial autoregressions.\" Statistics & Probability Letters 33.3 (1997): 291-297." ] }, { "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 write the dataset as a CSV and upload the CSV to a S3 bucket. The CSV file needs to contain a header line. The header names are used in the `ReverseGeocodingConfig` for the Vector Enrichment Job for mapping the CSV columns to the expected attributes." ] }, { "cell_type": "code", "execution_count": null, "id": "bbf99176", "metadata": { "tags": [] }, "outputs": [], "source": [ "s3 = boto3.client(\"s3\")\n", "s3.download_file(\n", " f\"sagemaker-example-files-prod-{boto3.Session().region_name}\",\n", " \"datasets/tabular/california_housing/cal_housing.tgz\",\n", " \"cal_housing.tgz\",\n", ")" ] }, { "cell_type": "code", "execution_count": null, "id": "f81ec8c7", "metadata": { "tags": [] }, "outputs": [], "source": [ "!tar -zxf cal_housing.tgz --no-same-owner" ] }, { "cell_type": "code", "execution_count": null, "id": "cbeabe91", "metadata": { "tags": [] }, "outputs": [], "source": [ "import pandas as pd\n", "\n", "columns = [\n", " \"Longitude\",\n", " \"Latitude\",\n", " \"HouseAge\",\n", " \"TotalRooms\",\n", " \"TotalBedrms\",\n", " \"Population\",\n", " \"Households\",\n", " \"MedInc\",\n", " \"Target\",\n", "]\n", "df_housing_data = pd.read_csv(\"CaliforniaHousing/cal_housing.data\", names=columns, header=None)\n", "df_housing_data = df_housing_data.drop(columns=[\"Target\"])[:15000]\n", "df_housing_data.to_csv(\"california_housing.csv\", index=False)\n", "df_housing_data.head(5)" ] }, { "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_reverse_geocoding\"\n", "input_object_key = f\"{bucket_prefix}/input/california_housing.csv\"\n", "\n", "s3_client = boto3.client(\"s3\")\n", "response = s3_client.upload_file(\"california_housing.csv\", s3_bucket, input_object_key)" ] }, { "cell_type": "markdown", "id": "5b6eafe2-524c-453d-a2fe-eb2cd066c70c", "metadata": {}, "source": [ "## Create an Vector Enrichtment Job\n", "\n", "The following cell will define and start a Vector Enrichment Job for reverse geocoding. The longitude and latitude headers of the CSV file are mapped to be used as input for the reverse geocoding implementation." ] }, { "cell_type": "code", "execution_count": null, "id": "fc1fa4c2-c688-4835-93cf-66207420517f", "metadata": { "tags": [] }, "outputs": [], "source": [ "job_config = {\n", " \"ReverseGeocodingConfig\": {\"XAttributeName\": \"Longitude\", \"YAttributeName\": \"Latitude\"},\n", "}\n", "\n", "input_config = {\n", " \"DataSourceConfig\": {\"S3Data\": {\"S3Uri\": f\"s3://{s3_bucket}/{input_object_key}\"}},\n", " \"DocumentType\": \"CSV\",\n", "}\n", "\n", "response = geospatial_client.start_vector_enrichment_job(\n", " Name=\"vej_example_reverse_geocoding\",\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 reverse geocoding VEJ produces a CSV which contains all columns of the input CSV and is extended with the following columns:\n", "- reverse_geo.address_number\n", "- reverse_geo.country\n", "- reverse_geo.label\n", "- reverse_geo.municipality\n", "- reverse_geo.neighborhood\n", "- reverse_geo.postal_code\n", "- reverse_geo.region\n", "- reverse_geo.status\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 enriched data set 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 will be loaded from S3 into a pandas dataframe and then visualized in the embedded map.\n", "\n", "### Load VEJ output into pandas dataframe" ] }, { "cell_type": "code", "execution_count": null, "id": "d221e413-d807-4a48-8102-7bdb9505e82f", "metadata": { "tags": [] }, "outputs": [], "source": [ "import boto3\n", "import os\n", "import pandas as pd\n", "\n", "s3_client = boto3.client(\"s3\")\n", "s3_bucket_resource = session.resource(\"s3\").Bucket(s3_bucket)\n", "\n", "for s3_object in s3_bucket_resource.objects.filter(Prefix=bucket_output_prefix).all():\n", " if s3_object.key.endswith(\".csv\"):\n", " response = s3_client.get_object(Bucket=s3_bucket, Key=s3_object.key)\n", " df_output = pd.read_csv(response.get(\"Body\"))\n", "\n", "# the output contains the original data but is extended with reverse_geo.* columns\n", "df_output.head(5)" ] }, { "cell_type": "markdown", "id": "018e01b2-0eb5-4029-be5e-4ba276d673ff", "metadata": { "tags": [] }, "source": [ "### Render 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": "e10bdc82-79ec-46c9-873d-4db1e2aa90b8", "metadata": { "tags": [] }, "source": [ "### Add output data to map visualization\n", "\n", "The following cell will add the output data as points to the map. When you hover over single items, it'll display the reverse_geo.label which resembles the address of the given point." ] }, { "cell_type": "code", "execution_count": null, "id": "657fd515-8612-441e-9027-5553b23f8399", "metadata": { "tags": [] }, "outputs": [], "source": [ "# move reverse_geo.label column to be automatically included in the hover tooltip\n", "column_to_move = df_output.pop(\"reverse_geo.label\")\n", "df_output.insert(2, \"reverse_geo.label\", column_to_move)\n", "\n", "dataset_links_drive_01 = Map.add_dataset(\n", " {\"data\": df_output, \"label\": \"vej_output\"}, auto_create_layers=True\n", ")" ] }, { "cell_type": "markdown", "id": "e93d473e", "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-reverse-geocoding|vector-enrichment-reverse-geocoding.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-reverse-geocoding|vector-enrichment-reverse-geocoding.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-reverse-geocoding|vector-enrichment-reverse-geocoding.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-reverse-geocoding|vector-enrichment-reverse-geocoding.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-reverse-geocoding|vector-enrichment-reverse-geocoding.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-reverse-geocoding|vector-enrichment-reverse-geocoding.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-reverse-geocoding|vector-enrichment-reverse-geocoding.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-reverse-geocoding|vector-enrichment-reverse-geocoding.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-reverse-geocoding|vector-enrichment-reverse-geocoding.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-reverse-geocoding|vector-enrichment-reverse-geocoding.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-reverse-geocoding|vector-enrichment-reverse-geocoding.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-reverse-geocoding|vector-enrichment-reverse-geocoding.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-reverse-geocoding|vector-enrichment-reverse-geocoding.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-reverse-geocoding|vector-enrichment-reverse-geocoding.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-reverse-geocoding|vector-enrichment-reverse-geocoding.ipynb)\n" ] } ], "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.geospatial.interactive", "kernelspec": { "display_name": "Python 3 (Geospatial 1.0)", "language": "python", "name": "python3__SAGEMAKER_INTERNAL__arn:aws:sagemaker:us-west-2:081189585635:image/sagemaker-geospatial-v1-0" }, "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.4" } }, "nbformat": 4, "nbformat_minor": 5 }