Skip to content
This repository was archived by the owner on Jun 10, 2025. It is now read-only.

Commit 4d97391

Browse files
authored
Merge pull request #19 from aws-solutions/develop
Update to version v2.0.0
2 parents 1c76b13 + e43e9b9 commit 4d97391

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2440
-153
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.0.0] - 2022-05-31
9+
10+
### Added
11+
12+
- A new pipeline to train Machine Learning (ML) models using [Amazon SageMaker built-in algorithms](https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html) and [Amazon SageMaker Training Job](https://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works-training.html).
13+
- A new pipeline to train ML models using Amazon SageMaker built-in algorithms and [Amazon Hyperparameter Tuning Job](https://docs.aws.amazon.com/sagemaker/latest/dg/automatic-model-tuning-how-it-works.html).
14+
- A new pipeline to train ML models using Amazon SageMaker built-in algorithms and
15+
[Amazon SageMaker Autopilot Job](https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development.html).
16+
- [Amazon EventBridge Rules](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rules.html)
17+
to notify the solution's administrator(s) about the status of the training jobs.
18+
19+
### Updated
20+
21+
- The [Amazon Simple Notification Service (SNS)](https://aws.amazon.com/sns/?whats-new-cards.sort-by=item.additionalFields.postDateTime&whats-new-cards.sort-order=desc)
22+
Topic, used for pipelines notifications, was moved to the solution's main template.
23+
824
## [1.5.0] - 2022-01-24
925

1026
### Added

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ across projects and organizations, the processes contain commonalities across us
99

1010
The solution helps you streamline and enforce architecture best practices by providing an extendable
1111
framework for managing ML pipelines for Amazon Machine Learning (Amazon ML) services and third-party
12-
services. The solution’s template allows you to upload trained models, configure the orchestration of
12+
services. The solution’s template allows you to train models, upload trained models, configure the orchestration of
1313
the pipeline, initiate the start of the deployment process, move models through different stages of
1414
deployment, and monitor the successes and failures of the operations. The solution also provides a
1515
pipeline for building and registering Docker images for custom algorithms that can be used for model
@@ -23,7 +23,7 @@ increases your team’s agility and efficiency by allowing them to repeat succes
2323
#### Benefits
2424

2525
- **Leverage a pre-configured machine learning pipeline:** Use the solution's reference architecture to initiate a pre-configured pipeline through an API call or a Git repository.
26-
- **Automatically deploy a trained model and inference endpoint:** Use the solution's framework to automate the model monitor pipeline or the Amazon SageMaker BYOM pipeline. Deliver an inference endpoint with model drift detection packaged as a serverless microservice.
26+
- **Automatically train, deploy, and monitor models:** Use the solution's pipelines to automate the model training. Deliver an inference endpoint with model drift detection packaged as a serverless microservice.
2727

2828
---
2929

deployment/build-s3-dist.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ echo "cdk synth BYOMCustomAlgorithmImageBuilderStack > lib/blueprints/byom/byom_
129129
cdk synth BYOMCustomAlgorithmImageBuilderStack > lib/blueprints/byom/byom_custom_algorithm_image_builder.yaml --path-metadata false --version-reporting false
130130
echo "cdk synth BYOMBatchStack > lib/blueprints/byom/byom_batch_pipeline.yaml --path-metadata false --version-reporting false"
131131
cdk synth BYOMBatchStack > lib/blueprints/byom/byom_batch_pipeline.yaml --path-metadata false --version-reporting false
132+
echo "cdk synth AutopilotJobStack > lib/blueprints/byom/autopilot_training_pipeline.yaml --path-metadata false --version-reporting false"
133+
cdk synth AutopilotJobStack > lib/blueprints/byom/autopilot_training_pipeline.yaml --path-metadata false --version-reporting false
134+
echo "cdk synth TrainingJobStack > lib/blueprints/byom/model_training_pipeline.yaml --path-metadata false --version-reporting false"
135+
cdk synth TrainingJobStack > lib/blueprints/byom/model_training_pipeline.yaml --path-metadata false --version-reporting false
136+
echo "cdk synth HyperparamaterTunningJobStack > lib/blueprints/byom/model_hyperparameter_tunning_pipeline.yaml --path-metadata false --version-reporting false"
137+
cdk synth HyperparamaterTunningJobStack > lib/blueprints/byom/model_hyperparameter_tunning_pipeline.yaml --path-metadata false --version-reporting false
132138

133139
# Replace %%VERSION%% in other templates
134140
replace="s/%%VERSION%%/$3/g"
@@ -150,6 +156,12 @@ echo "sed -i -e $replace lib/blueprints/byom/byom_custom_algorithm_image_builder
150156
sed -i -e $replace lib/blueprints/byom/byom_custom_algorithm_image_builder.yaml
151157
echo "sed -i -e $replace lib/blueprints/byom/byom_batch_pipeline.yaml"
152158
sed -i -e $replace lib/blueprints/byom/byom_batch_pipeline.yaml
159+
echo "sed -i -e $replace lib/blueprints/byom/autopilot_training_pipeline.yaml"
160+
sed -i -e $replace lib/blueprints/byom/autopilot_training_pipeline.yaml
161+
echo "sed -i -e $replace lib/blueprints/byom/model_training_pipeline.yaml"
162+
sed -i -e $replace lib/blueprints/byom/model_training_pipeline.yaml
163+
echo "sed -i -e $replace lib/blueprints/byom/model_hyperparameter_tunning_pipeline.yaml"
164+
sed -i -e $replace lib/blueprints/byom/model_hyperparameter_tunning_pipeline.yaml
153165

154166
# Run 'cdk synth' for main templates to generate raw solution outputs
155167
echo "cdk synth mlops-workload-orchestrator-single-account --path-metadata false --version-reporting false --output=$staging_dist_dir"

source/app.py

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
from lib.blueprints.byom.single_account_codepipeline import SingleAccountCodePipelineStack
2020
from lib.blueprints.byom.multi_account_codepipeline import MultiAccountCodePipelineStack
2121
from lib.blueprints.byom.byom_custom_algorithm_image_builder import BYOMCustomAlgorithmImageBuilderStack
22+
from lib.blueprints.byom.autopilot_training_pipeline import AutopilotJobStack
23+
from lib.blueprints.byom.model_training_pipeline import TrainingJobStack
2224
from lib.aws_sdk_config_aspect import AwsSDKConfigAspect
2325
from lib.blueprints.byom.pipeline_definitions.cdk_context_value import get_cdk_context_value
2426

@@ -56,7 +58,9 @@
5658
batch_stack = BYOMBatchStack(
5759
app,
5860
"BYOMBatchStack",
59-
description=(f"({solution_id}byom-bt) - BYOM Batch Transform pipeline in AWS MLOps Framework. Version {version}"),
61+
description=(
62+
f"({solution_id}byom-bt) - BYOM Batch Transform pipeline in MLOps Workload Orchestrator. Version {version}"
63+
),
6064
)
6165

6266
core.Aspects.of(batch_stack).add(AwsSDKConfigAspect(app, "SDKUserAgentBatch", solution_id, version))
@@ -113,6 +117,38 @@
113117

114118
core.Aspects.of(realtime_stack).add(AwsSDKConfigAspect(app, "SDKUserAgentRealtime", solution_id, version))
115119

120+
121+
autopilot_stack = AutopilotJobStack(
122+
app,
123+
"AutopilotJobStack",
124+
description=(f"({solution_id}-autopilot) - Autopilot training pipeline. Version {version}"),
125+
)
126+
127+
core.Aspects.of(autopilot_stack).add(AwsSDKConfigAspect(app, "SDKUserAgentAutopilot", solution_id, version))
128+
129+
130+
training_stack = TrainingJobStack(
131+
app,
132+
"TrainingJobStack",
133+
training_type="TrainingJob",
134+
description=(f"({solution_id}-training) - Model Training pipeline. Version {version}"),
135+
)
136+
137+
core.Aspects.of(training_stack).add(AwsSDKConfigAspect(app, "SDKUserAgentTraining", solution_id, version))
138+
139+
140+
hyperparameter_tunning_stack = TrainingJobStack(
141+
app,
142+
"HyperparamaterTunningJobStack",
143+
training_type="HyperparameterTuningJob",
144+
description=(f"({solution_id}-tuner) - Model Hyperparameter Tunning pipeline. Version {version}"),
145+
)
146+
147+
core.Aspects.of(hyperparameter_tunning_stack).add(
148+
AwsSDKConfigAspect(app, "SDKUserAgentHyperparamater", solution_id, version)
149+
)
150+
151+
116152
SingleAccountCodePipelineStack(
117153
app,
118154
"SingleAccountCodePipelineStack",

source/lambdas/pipeline_orchestration/index.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,16 @@ def provision_pipeline(
106106
pipeline_template_url = (
107107
template_url("multi_account_codepipeline")
108108
if is_multi_account == "True"
109+
# training pipelines are deployed in the account where the main template is deployed
110+
and pipeline_type not in ["model_training_builtin", "model_tuner_builtin", "model_autopilot_training"]
109111
else template_url("single_account_codepipeline")
110112
)
111113

112114
template_zip_name = f"mlops_provisioned_pipelines/{provisioned_pipeline_stack_name}/template.zip"
113115
template_file_name = provisioned_pipeline_template_url.split("/")[-1]
114116
# get the codepipeline parameters
115117
codepipeline_params = get_codepipeline_params(
116-
is_multi_account, provisioned_pipeline_stack_name, template_zip_name, template_file_name
118+
is_multi_account, pipeline_type, provisioned_pipeline_stack_name, template_zip_name, template_file_name
117119
)
118120
# format the params (the format is the same for multi-account parameters)
119121
formatted_codepipeline_params = format_template_parameters(codepipeline_params, "True")

0 commit comments

Comments
 (0)