Skip to content

Commit 5ce4b4c

Browse files
committed
Update pipeline definition
1 parent 8466694 commit 5ce4b4c

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

04-sagemaker-project.ipynb

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"source": [
88
"# Step 4: Add a model building CI/CD pipeline\n",
99
"\n",
10-
"<div class=\"alert alert-warning\"> This notebook has been last tested on a SageMaker Studio JupyterLab instance using the <code>SageMaker Distribution Image 3.6.1</code> and with the SageMaker Python SDK version <code>2.255.0</code></div>\n",
10+
"<div class=\"alert alert-warning\"> This notebook has been last tested on a SageMaker Studio JupyterLab instance using the <code>SageMaker Distribution Image 3.7.0</code> and with the SageMaker Python SDK version <code>2.255.0</code></div>\n",
1111
"\n",
1212
"In this step you create an automated CI/CD pipeline for model building using [Amazon SageMaker Projects](https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-projects.html). \n",
1313
"\n",
@@ -1010,15 +1010,16 @@
10101010
"\n",
10111011
" # If no tracking server ARN, try to find an active MLflow server\n",
10121012
" if tracking_server_arn is None:\n",
1013-
" r = sm.list_mlflow_tracking_servers(\n",
1014-
" TrackingServerStatus='Created',\n",
1015-
" )['TrackingServerSummaries']\n",
1016-
" \n",
1017-
" if len(r) < 1:\n",
1013+
" summaries = []\n",
1014+
" for status in ['Created', 'Updated']:\n",
1015+
" r = sm.list_mlflow_apps(Status=status)\n",
1016+
" summaries.extend(r['Summaries'])\n",
1017+
" \n",
1018+
" if len(summaries) < 1:\n",
10181019
" print(\"You don't have any running MLflow servers. Exiting...\")\n",
10191020
" return None\n",
10201021
" else:\n",
1021-
" tracking_server_arn = r[0]['TrackingServerArn']\n",
1022+
" tracking_server_arn = summaries[0]['Arn']\n",
10221023
" print(f\"Use the tracking server ARN:{tracking_server_arn}\")\n",
10231024
" \n",
10241025
" # Parameters for pipeline execution\n",

05-deploy.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"source": [
1010
"# Step 5: Add a deployment pipeline\n",
1111
"\n",
12-
"<div class=\"alert alert-warning\"> This notebook has been last tested on a SageMaker Studio JupyterLab instance using the <code>SageMaker Distribution Image 3.6.1</code> and with the SageMaker Python SDK version <code>2.255.0</code></div>\n",
12+
"<div class=\"alert alert-warning\"> This notebook has been last tested on a SageMaker Studio JupyterLab instance using the <code>SageMaker Distribution Image 3.7.0</code> and with the SageMaker Python SDK version <code>2.255.0</code></div>\n",
1313
"\n",
1414
"In previous step you implemented an automated data processing and model building pipeline. Each run of the pipeline produces a new version of the model. This notebook implements the automated model deployment step in our ML workflow.\n",
1515
"\n",

0 commit comments

Comments
 (0)