Skip to content

Commit

Permalink
Wait 30s after creating deployment before scoring to avoid connection…
Browse files Browse the repository at this point in the history
… error (#3497)

* try increasing online request settings timeout and queue wait

* reformat
  • Loading branch information
hakotesova authored Jan 24, 2025
1 parent 33decce commit 334cc0f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -730,9 +730,12 @@
},
"outputs": [],
"source": [
"import time\n",
"\n",
"# bankmarketing deployment to take 100% traffic\n",
"endpoint.traffic = {\"bankmarketing-deploy\": 100}\n",
"ml_client.begin_create_or_update(endpoint)"
"ml_client.begin_create_or_update(endpoint)\n",
"time.sleep(30) # sleep 30 seconds before scoring to avoid connection error"
]
},
{
Expand Down Expand Up @@ -782,8 +785,6 @@
"outputs": [],
"source": [
"# wait and delete endpoint\n",
"import time\n",
"\n",
"time.sleep(60)"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,10 @@
"metadata": {},
"outputs": [],
"source": [
"ml_client.online_deployments.begin_create_or_update(deployment).wait()"
"import time\n",
"\n",
"ml_client.online_deployments.begin_create_or_update(deployment).wait()\n",
"time.sleep(30) # wait 30 seconds before scoring to avoid connection error"
]
},
{
Expand Down

0 comments on commit 334cc0f

Please sign in to comment.