Skip to content

Commit ce1ec14

Browse files
committed
final updates
1 parent 6121e82 commit ce1ec14

File tree

6 files changed

+14
-41
lines changed

6 files changed

+14
-41
lines changed

0_model_training_pipeline.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@
7575
},
7676
"outputs": [],
7777
"source": [
78-
"# import sys\n",
79-
"# !{sys.executable} -m pip install -r requirements.txt"
78+
"import sys\n",
79+
"!{sys.executable} -m pip install -r requirements.txt --upgrade-strategy only-if-needed"
8080
]
8181
},
8282
{
@@ -747,7 +747,7 @@
747747
"source": [
748748
"# Start pipeline with credit data and preprocessing script\n",
749749
"execution = pipeline.start(\n",
750-
" execution_display_name=pipeline.name\n",
750+
" execution_display_name=pipeline.name,\n",
751751
" parameters=dict(\n",
752752
" AccuracyConditionThreshold=config['evaluation_step']['accuracy_condition_threshold'],\n",
753753
" MaximumParallelTrainingJobs=config['tuning_step']['maximum_parallel_training_jobs'],\n",

1_batch_transform_pipeline.ipynb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
},
3131
"outputs": [],
3232
"source": [
33-
"#import sys\n",
34-
"#!{sys.executable} -m pip install -r requirements.txt"
33+
"import sys\n",
34+
"!{sys.executable} -m pip install -r requirements.txt --upgrade-strategy only-if-needed"
3535
]
3636
},
3737
{
@@ -65,9 +65,8 @@
6565
"from sagemaker.workflow.execution_variables import ExecutionVariables\n",
6666
"\n",
6767
"from sagemaker.model import Model\n",
68-
"from sagemaker.inputs import CreateModelInput\n",
69-
"from sagemaker.workflow.model_step import ModelStep\n",
70-
"from sagemaker.transformer import Transformer"
68+
"from sagemaker.transformer import Transformer\n",
69+
"from sagemaker.workflow.model_step import ModelStep"
7170
]
7271
},
7372
{

2_realtime_inference.ipynb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
},
2929
"outputs": [],
3030
"source": [
31-
"#import sys\n",
32-
"#!{sys.executable} -m pip install -r requirements.txt"
31+
"import sys\n",
32+
"!{sys.executable} -m pip install -r requirements.txt --upgrade-strategy only-if-needed"
3333
]
3434
},
3535
{
@@ -52,7 +52,6 @@
5252
"import sagemaker.session\n",
5353
"from datetime import datetime\n",
5454
"from typing import Dict, List\n",
55-
"from utils import load_config, print_pipeline_execution_summary\n",
5655
"from sagemaker.workflow.pipeline_context import PipelineSession"
5756
]
5857
},

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,10 @@ Setup a secret in Secrets Manager for the PrestoDB username and password. Call t
138138
139139
1. Edit the [`config`](./config.yml) as per PrestoDB connection, IAM role and other pipeline details such as instance types for various pipeline steps etc.
140140
141-
- [**Mandatory**] Edit the parameter values in the `presto` section.
142-
- [**Mandatory**] Edit the parameter values in the `aws` section.
143-
- [**Mandatory**] Edit the `query` parameter value in the `training_step` section. This is the query for retrieving the training data from the PrestoDB.
144-
- [**Mandatory**] Edit the `query` parameter value in the `transform_step` section. This is the query for retrieving the data for the batch transform from the PrestoDB.
145-
- [Optional] Edit the parameter values in the rest of the sections as appropriate.
141+
- Edit the parameter values in the `presto` section. These parameters define the connectivity to PrestoDB.
142+
- Edit the parameter values in the `aws` section. These parameters define the IAM role, bucket name, region and other AWS cloud related parameters.
143+
- Edit the parameter values in the sections corresponding to the pipeline steps i.e. `training_step`, `tuning_step`, `transform_step` etc. Review all the parameters in these sections carefully and edit them as appropriate for your use-case.
144+
- Review the parameters in the rest of the sections of the [`config`](./config.yml)and edit them if needed.
146145
147146
1. Run the [`0_model_training_pipeline`](./0_model_training_pipeline.ipynb) notebook to train and tune the ML model and register it with the SageMaker model registry. All the steps in this notebook are executed as part of a training pipeline.
148147
- This notebook also contains an automatic model approval step that changes the state of the model registered with the model registry from `PendingForApproval` to `Approved` state. This step can be removed for prod accounts where manual or some criteria based approval would be required.

code/query.py

Lines changed: 0 additions & 24 deletions
This file was deleted.

config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
aws:
33
region: us-east-1
44
# execution role, replace the role name below with the one you are using
5-
sagemaker_execution_role_name: your-role-name
5+
sagemaker_execution_role_name: your-sagemaker-execution-role
66
# the execution role ARN is determined automatically by the code
77
sagemaker_execution_role_arn: arn:aws:iam::{account_id}:role/{role}
88
s3_bucket: sagemaker-{region}-{account_id} # region and account id are automatically replaced

0 commit comments

Comments
 (0)