Skip to content

Commit cb70bf8

Browse files
Hannah14295hrehard
andauthored
fix(examples): resolve endpoint config name in e2e cleanup (#6063)
The train-inference-e2e-example cleanup cell looked up the endpoint configuration by the endpoint's name, but deploy() creates the config under an auto-generated name. DescribeEndpointConfig then failed with "Could not find endpoint configuration <endpoint-name>", aborting teardown and leaving the model, endpoint, and config behind. Resolve the real config name from the endpoint before deleting. Co-authored-by: hrehard <hrehard@amazon.com>
1 parent 4b3c156 commit cb70bf8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎v3-examples/inference-examples/train-inference-e2e-example.ipynb‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,9 @@
352352
"outputs": [],
353353
"source": [
354354
"# Clean up resources\n",
355-
"core_endpoint_config = EndpointConfig.get(endpoint_config_name=core_endpoint.endpoint_name)\n",
355+
"from sagemaker.core.resources import Endpoint\n",
356+
"_endpoint = Endpoint.get(endpoint_name=core_endpoint.endpoint_name)\n",
357+
"core_endpoint_config = EndpointConfig.get(endpoint_config_name=_endpoint.endpoint_config_name)\n",
356358
"\n",
357359
"# Delete in the correct order\n",
358360
"core_model.delete()\n",

0 commit comments

Comments
 (0)