Skip to content

Commit

Permalink
Ensuring we display traffic to the Shadow variant always.
Browse files Browse the repository at this point in the history
  • Loading branch information
svpino committed Mar 31, 2024
1 parent df8710b commit 942f3f2
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions program/cohort.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7826,26 +7826,14 @@
},
{
"cell_type": "code",
"execution_count": 371,
"execution_count": null,
"id": "cea757af",
"metadata": {
"tags": [
"hide-output"
]
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"An error occurred (ModelError) when calling the InvokeEndpoint operation: Received server error (500) from container-1 with message \"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n",
"<title>500 Internal Server Error</title>\n",
"<h1>Internal Server Error</h1>\n",
"<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>\n",
"\". See https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#logEventViewer:group=/aws/sagemaker/Endpoints/penguins-endpoint in account 325223348818 for more information.\n"
]
}
],
"outputs": [],
"source": [
"from sagemaker.serializers import JSONSerializer\n",
"\n",
Expand Down Expand Up @@ -8878,7 +8866,7 @@
},
{
"cell_type": "code",
"execution_count": 398,
"execution_count": 137,
"id": "6c8aea09",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -9001,7 +8989,7 @@
},
{
"cell_type": "code",
"execution_count": 437,
"execution_count": 136,
"id": "85769b3e",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -9192,12 +9180,14 @@
"source": [
"### Step 6 - Checking Captured Data\n",
"\n",
"Let's check the location where the endpoint stores the captured data, download a file, and display its content. It may take a few minutes for the first few files to show up in S3.\n"
"Let's check the location where the endpoint stores the captured data, download a file, and display its content. It may take a few minutes for the first few files to show up in S3.\n",
"\n",
"The endpoint will capture the data for both the Production and the Shadow variants."
]
},
{
"cell_type": "code",
"execution_count": 450,
"execution_count": 143,
"id": "9ffadf06",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -9232,7 +9222,9 @@
}
],
"source": [
"files = S3Downloader.list(SHADOW_DATA_DESTINATION)\n",
"files = S3Downloader.list(\n",
" f\"{SHADOW_DATA_DESTINATION}{SHADOW_DEPLOYMENT_ENDPOINT}/ShadowTraffic/\",\n",
")\n",
"if len(files):\n",
" lines = S3Downloader.read_file(files[-1])\n",
" print(f\"File: {files[-1]}\")\n",
Expand Down

0 comments on commit 942f3f2

Please sign in to comment.