Skip to content

Commit

Permalink
Fixed issue with model metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
svpino committed Mar 29, 2024
1 parent bb98f6d commit 7ea3dfb
Showing 1 changed file with 39 additions and 27 deletions.
66 changes: 39 additions & 27 deletions program/cohort.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3763,7 +3763,7 @@
" approval_status=\"Approved\",\n",
" content_types=[\"text/csv\"],\n",
" response_types=[\"application/json\"],\n",
" model_metrics=model_metrics,\n",
" model_metrics=None,\n",
" drift_check_baselines=None,\n",
"):\n",
" return ModelStep(\n",
Expand All @@ -3786,7 +3786,9 @@
"\n",
"\n",
"register_model_step = create_registration_step(\n",
" tensorflow_model, BASIC_MODEL_PACKAGE_GROUP\n",
" tensorflow_model,\n",
" BASIC_MODEL_PACKAGE_GROUP,\n",
" model_metrics=model_metrics,\n",
")"
]
},
Expand Down Expand Up @@ -5230,6 +5232,7 @@
" tensorflow_model,\n",
" PENDING_MODEL_PACKAGE_GROUP,\n",
" approval_status=\"PendingManualApproval\",\n",
" model_metrics=model_metrics,\n",
")"
]
},
Expand Down Expand Up @@ -5393,7 +5396,7 @@
},
{
"cell_type": "code",
"execution_count": 90,
"execution_count": 241,
"id": "a1f25973",
"metadata": {},
"outputs": [],
Expand All @@ -5412,7 +5415,7 @@
},
{
"cell_type": "code",
"execution_count": 91,
"execution_count": 242,
"id": "c480ae02",
"metadata": {
"tags": [
Expand All @@ -5424,7 +5427,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Writing code/pipeline/preprocessing_component.py\n"
"Overwriting code/pipeline/preprocessing_component.py\n"
]
}
],
Expand Down Expand Up @@ -5543,7 +5546,7 @@
},
{
"cell_type": "code",
"execution_count": 92,
"execution_count": 243,
"id": "34721e63",
"metadata": {
"tags": [
Expand All @@ -5555,7 +5558,14 @@
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [100%]\u001b[0m\n",
"\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[32m.\u001b[0m\u001b[32m [100%]\u001b[0m\n",
"\u001b[32m\u001b[32m\u001b[1m8 passed\u001b[0m\u001b[32m in 0.06s\u001b[0m\u001b[0m\n"
]
}
Expand Down Expand Up @@ -5691,7 +5701,7 @@
},
{
"cell_type": "code",
"execution_count": 93,
"execution_count": 244,
"id": "d23798aa",
"metadata": {
"tags": [
Expand All @@ -5703,7 +5713,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Writing code/pipeline/postprocessing_component.py\n"
"Overwriting code/pipeline/postprocessing_component.py\n"
]
}
],
Expand Down Expand Up @@ -5792,7 +5802,7 @@
},
{
"cell_type": "code",
"execution_count": 94,
"execution_count": 245,
"id": "965a6be5",
"metadata": {
"tags": [
Expand Down Expand Up @@ -5874,7 +5884,7 @@
},
{
"cell_type": "code",
"execution_count": 95,
"execution_count": 246,
"id": "82dafcd0",
"metadata": {},
"outputs": [],
Expand All @@ -5900,7 +5910,7 @@
},
{
"cell_type": "code",
"execution_count": 96,
"execution_count": 247,
"id": "8c7dda7a",
"metadata": {},
"outputs": [],
Expand All @@ -5927,7 +5937,7 @@
},
{
"cell_type": "code",
"execution_count": 97,
"execution_count": 248,
"id": "6c31090e",
"metadata": {},
"outputs": [],
Expand All @@ -5952,7 +5962,7 @@
},
{
"cell_type": "code",
"execution_count": 99,
"execution_count": 249,
"id": "9fa95ab8",
"metadata": {},
"outputs": [],
Expand All @@ -5979,7 +5989,7 @@
},
{
"cell_type": "code",
"execution_count": 100,
"execution_count": 250,
"id": "7c052332",
"metadata": {},
"outputs": [],
Expand All @@ -5999,7 +6009,7 @@
},
{
"cell_type": "code",
"execution_count": 101,
"execution_count": 251,
"id": "3cb0ce9e",
"metadata": {
"tags": [
Expand All @@ -6022,6 +6032,7 @@
" PIPELINE_MODEL_PACKAGE_GROUP,\n",
" content_types=[\"text/csv\", \"application/json\"],\n",
" response_types=[\"text/csv\", \"application/json\"],\n",
" model_metrics=model_metrics,\n",
")"
]
},
Expand All @@ -6037,7 +6048,7 @@
},
{
"cell_type": "code",
"execution_count": 102,
"execution_count": 252,
"id": "8ec7b7d8",
"metadata": {},
"outputs": [],
Expand All @@ -6057,7 +6068,7 @@
},
{
"cell_type": "code",
"execution_count": 103,
"execution_count": 253,
"id": "b9712905-9fe3-4148-ae6d-05b0a48e742e",
"metadata": {
"tags": []
Expand All @@ -6084,7 +6095,7 @@
},
{
"cell_type": "code",
"execution_count": 104,
"execution_count": 254,
"id": "bad9f51d",
"metadata": {
"tags": [
Expand All @@ -6109,16 +6120,16 @@
"data": {
"text/plain": [
"{'PipelineArn': 'arn:aws:sagemaker:us-east-1:325223348818:pipeline/session14-pipeline',\n",
" 'ResponseMetadata': {'RequestId': '14204982-5c91-4a7d-9a9f-d5ba792bad6c',\n",
" 'ResponseMetadata': {'RequestId': '0f8391bd-02ab-4928-a5f7-7f5e38bc6fbf',\n",
" 'HTTPStatusCode': 200,\n",
" 'HTTPHeaders': {'x-amzn-requestid': '14204982-5c91-4a7d-9a9f-d5ba792bad6c',\n",
" 'HTTPHeaders': {'x-amzn-requestid': '0f8391bd-02ab-4928-a5f7-7f5e38bc6fbf',\n",
" 'content-type': 'application/x-amz-json-1.1',\n",
" 'content-length': '86',\n",
" 'date': 'Thu, 28 Mar 2024 15:53:09 GMT'},\n",
" 'date': 'Fri, 29 Mar 2024 18:23:16 GMT'},\n",
" 'RetryAttempts': 0}}"
]
},
"execution_count": 104,
"execution_count": 254,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -6912,6 +6923,7 @@
" model_package_group_name=CUSTOM_MODEL_PACKAGE_GROUP,\n",
" content_types=[\"application/json\"],\n",
" response_types=[\"application/json\"],\n",
" model_metrics=model_metrics,\n",
")"
]
},
Expand Down Expand Up @@ -8774,7 +8786,7 @@
},
{
"cell_type": "code",
"execution_count": 206,
"execution_count": 257,
"id": "59d1e634",
"metadata": {
"tags": [
Expand All @@ -8785,10 +8797,10 @@
{
"data": {
"text/plain": [
"_PipelineExecution(arn='arn:aws:sagemaker:us-east-1:325223348818:pipeline/session13-pipeline/execution/8csg5fmzdfho', sagemaker_session=<sagemaker.workflow.pipeline_context.PipelineSession object at 0x1084e3010>)"
"_PipelineExecution(arn='arn:aws:sagemaker:us-east-1:325223348818:pipeline/session14-pipeline/execution/h2hoqjmirvv1', sagemaker_session=<sagemaker.workflow.pipeline_context.PipelineSession object at 0x1084e3010>)"
]
},
"execution_count": 206,
"execution_count": 257,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -8797,7 +8809,7 @@
"# %%script false --no-raise-error\n",
"# | eval: false\n",
"\n",
"session13_pipeline.start()"
"session14_pipeline.start()"
]
},
{
Expand Down

0 comments on commit 7ea3dfb

Please sign in to comment.