Skip to content

Commit 79123bc

Browse files
Hannah14295hrehard
andauthored
fix(examples): Instantiate Session before reading account/region (#6038)
optimize-example.ipynb called Session.account_id() and Session.boto_region_name on the Session class, raising 'TypeError: account_id() missing 1 required positional argument: self'. Create a Session instance first and read the values from it. Co-authored-by: hrehard <hrehard@amazon.com>
1 parent 041f6b5 commit 79123bc

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎v3-examples/inference-examples/optimize-example.ipynb‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@
5454
"MODEL_ID = \"meta-textgeneration-llama-3-8b-instruct\"\n",
5555
"MODEL_NAME_PREFIX = \"jumpstart-optimize-example\"\n",
5656
"ENDPOINT_NAME_PREFIX = \"jumpstart-optimize-example-endpoint\"\n",
57-
"AWS_ACCOUNT_ID = Session.account_id()\n",
58-
"AWS_REGION = Session.boto_region_name\n",
57+
"session = Session()\n",
58+
"AWS_ACCOUNT_ID = session.account_id()\n",
59+
"AWS_REGION = session.boto_region_name\n",
5960
"\n",
6061
"# Generate unique identifiers\n",
6162
"unique_id = str(uuid.uuid4())[:8]\n",

0 commit comments

Comments
 (0)