Skip to content

Commit

Permalink
replaced client with inference_client
Browse files Browse the repository at this point in the history
  • Loading branch information
ngluna committed Mar 15, 2022
1 parent 986f36d commit 1624be2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sagemaker-inference-recommender/inference-recommender.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -420,11 +420,11 @@
"import uuid\n",
"from sagemaker import get_execution_role\n",
"\n",
"client = boto3.client(\"sagemaker\", region)\n",
"inference_client = boto3.client(\"sagemaker\", region)\n",
"\n",
"role = get_execution_role()\n",
"default_job = uuid.uuid1()\n",
"default_response = client.create_inference_recommendations_job(\n",
"default_response = inference_client.create_inference_recommendations_job(\n",
" JobName=str(default_job),\n",
" JobDescription=\"Job Description\",\n",
" JobType=\"Default\",\n",
Expand Down Expand Up @@ -460,11 +460,11 @@
"import pprint\n",
"import pandas as pd\n",
"\n",
"client = boto3.client(\"sagemaker\", region)\n",
"inference_client = boto3.client(\"sagemaker\", region)\n",
"\n",
"stopped = False\n",
"while not stopped:\n",
" inference_recommender_job = client.describe_inference_recommendations_job(\n",
" inference_recommender_job = inference_client.describe_inference_recommendations_job(\n",
" JobName=str(default_job)\n",
" )\n",
" if inference_recommender_job[\"Status\"] in [\"COMPLETED\", \"STOPPED\", \"FAILED\"]:\n",
Expand Down Expand Up @@ -525,11 +525,11 @@
"import boto3\n",
"import uuid\n",
"\n",
"client = boto3.client(\"sagemaker\", region)\n",
"inference_client = boto3.client(\"sagemaker\", region)\n",
"\n",
"role = get_execution_role()\n",
"advanced_job = uuid.uuid1()\n",
"advanced_response = client.create_inference_recommendations_job(\n",
"advanced_response = inference_client.create_inference_recommendations_job(\n",
" JobName=str(advanced_job),\n",
" JobDescription=\"JobDescription\",\n",
" JobType=\"Advanced\",\n",
Expand Down Expand Up @@ -586,11 +586,11 @@
"import pprint\n",
"import pandas as pd\n",
"\n",
"client = boto3.client(\"sagemaker\", region)\n",
"inference_client = boto3.client(\"sagemaker\", region)\n",
"\n",
"stopped = False\n",
"while not stopped:\n",
" inference_recommender_job = client.describe_inference_recommendations_job(\n",
" inference_recommender_job = inference_client.describe_inference_recommendations_job(\n",
" JobName=str(advanced_job)\n",
" )\n",
" if inference_recommender_job[\"Status\"] in [\"COMPLETED\", \"STOPPED\", \"FAILED\"]:\n",
Expand Down

0 comments on commit 1624be2

Please sign in to comment.