Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
svpino committed Jul 12, 2023
1 parent 1c3b9d3 commit c14407a
Show file tree
Hide file tree
Showing 11 changed files with 4,992 additions and 7,977 deletions.
80 changes: 37 additions & 43 deletions penguins-cohort.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5947,26 +5947,12 @@
},
{
"cell_type": "code",
"execution_count": 129,
"execution_count": 65,
"id": "c9543c22-bfcc-427b-8c88-146a193e0009",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Generating 334 predictions...\n",
"Uploading ground truth data to s3://mlschool/penguins/monitoring/groundtruth/2023/06/28/12/3750.jsonl...\n",
"Uploading ground truth data to s3://mlschool/penguins/monitoring/groundtruth/2023/06/28/12/3820.jsonl...\n",
"Generating 334 predictions...\n",
"Uploading ground truth data to s3://mlschool/penguins/monitoring/groundtruth/2023/06/28/12/3850.jsonl...\n",
"Uploading ground truth data to s3://mlschool/penguins/monitoring/groundtruth/2023/06/28/12/3920.jsonl...\n",
"Uploading ground truth data to s3://mlschool/penguins/monitoring/groundtruth/2023/06/28/12/3951.jsonl...\n"
]
}
],
"outputs": [],
"source": [
"waiter = sagemaker_client.get_waiter(\"endpoint_in_service\")\n",
"waiter.wait(\n",
Expand All @@ -5981,8 +5967,16 @@
" endpoint_name=endpoint_name,\n",
" serializer=JSONSerializer(),\n",
" deserializer=JSONDeserializer()\n",
")\n",
"\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "03da1e89-2a79-4376-93a1-7f7e47bf9319",
"metadata": {},
"outputs": [],
"source": [
"stop_traffic_thread, traffic_thread = generate_traffic(predictor)\n",
"stop_ground_truth_thread, groundtruth_thread = generate_ground_truth_data(predictor, ground_truth_path)"
]
Expand Down Expand Up @@ -6183,33 +6177,21 @@
},
{
"cell_type": "code",
"execution_count": 143,
"execution_count": 62,
"id": "7b1ada75-1606-4980-8fd5-620dfe9c6608",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"Deleting Monitoring Schedule with name: penguins-model-monitoring-schedule\n",
"Uploading ground truth data to s3://mlschool/penguins/monitoring/groundtruth/2023/06/28/13/4150.jsonl...\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"INFO:sagemaker.model_monitor.model_monitoring:Deleting Model Quality Job Definition with name: model-quality-job-definition-2023-06-28-12-40-06-773\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Monitoring schedule deleted.\n"
"ename": "NameError",
"evalue": "name 'model_monitor' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-62-6fd64e14894d>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mdelete_monitoring_schedule\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel_monitor\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mNameError\u001b[0m: name 'model_monitor' is not defined"
]
}
],
Expand All @@ -6227,12 +6209,24 @@
},
{
"cell_type": "code",
"execution_count": 144,
"execution_count": 63,
"id": "f265d3ab-384e-4e49-ab94-e7f87dea8f9e",
"metadata": {
"tags": []
},
"outputs": [],
"outputs": [
{
"ename": "NameError",
"evalue": "name 'stop_traffic_thread' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-63-f91c5554bde6>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mstop_traffic_thread\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mstop_ground_truth_thread\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mtraffic_thread\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mgroundtruth_thread\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mNameError\u001b[0m: name 'stop_traffic_thread' is not defined"
]
}
],
"source": [
"stop_traffic_thread.set()\n",
"stop_ground_truth_thread.set()\n",
Expand All @@ -6251,7 +6245,7 @@
},
{
"cell_type": "code",
"execution_count": 145,
"execution_count": 66,
"id": "12ec02ec-6de1-4973-b9a0-525c81a5a56e",
"metadata": {
"tags": []
Expand All @@ -6261,7 +6255,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"INFO:sagemaker:Deleting endpoint configuration with name: penguins-endpoint-config-0628100822\n",
"INFO:sagemaker:Deleting endpoint configuration with name: penguins-endpoint-config-0630082428\n",
"INFO:sagemaker:Deleting endpoint with name: penguins-endpoint\n"
]
}
Expand Down
Loading

0 comments on commit c14407a

Please sign in to comment.