|
22 | 22 | from lib.blueprints.byom.autopilot_training_pipeline import AutopilotJobStack |
23 | 23 | from lib.blueprints.byom.model_training_pipeline import TrainingJobStack |
24 | 24 | from lib.aws_sdk_config_aspect import AwsSDKConfigAspect |
| 25 | +from lib.protobuf_config_aspect import ProtobufConfigAspect |
25 | 26 | from lib.blueprints.byom.pipeline_definitions.cdk_context_value import get_cdk_context_value |
26 | 27 |
|
27 | 28 | app = core.App() |
|
37 | 38 | # add AWS_SDK_USER_AGENT env variable to Lambda functions |
38 | 39 | core.Aspects.of(mlops_stack_single).add(AwsSDKConfigAspect(app, "SDKUserAgentSingle", solution_id, version)) |
39 | 40 |
|
| 41 | +# add PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python to handle protobuf breaking changes |
| 42 | +core.Aspects.of(mlops_stack_single).add(ProtobufConfigAspect(app, "ProtobufConfigSingle")) |
| 43 | + |
| 44 | + |
40 | 45 | mlops_stack_multi = MLOpsStack( |
41 | 46 | app, |
42 | 47 | "mlops-workload-orchestrator-multi-account", |
|
46 | 51 |
|
47 | 52 | core.Aspects.of(mlops_stack_multi).add(AwsSDKConfigAspect(app, "SDKUserAgentMulti", solution_id, version)) |
48 | 53 |
|
| 54 | +# add PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python to handle protobuf breaking changes |
| 55 | +core.Aspects.of(mlops_stack_multi).add(ProtobufConfigAspect(app, "ProtobufConfigMulti")) |
| 56 | + |
49 | 57 | BYOMCustomAlgorithmImageBuilderStack( |
50 | 58 | app, |
51 | 59 | "BYOMCustomAlgorithmImageBuilderStack", |
|
65 | 73 |
|
66 | 74 | core.Aspects.of(batch_stack).add(AwsSDKConfigAspect(app, "SDKUserAgentBatch", solution_id, version)) |
67 | 75 |
|
| 76 | +# add PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python to handle protobuf breaking changes |
| 77 | +core.Aspects.of(batch_stack).add(ProtobufConfigAspect(app, "ProtobufConfigBatch")) |
| 78 | + |
68 | 79 | data_quality_monitor_stack = ModelMonitorStack( |
69 | 80 | app, |
70 | 81 | "DataQualityModelMonitorStack", |
|
76 | 87 | AwsSDKConfigAspect(app, "SDKUserAgentDataMonitor", solution_id, version) |
77 | 88 | ) |
78 | 89 |
|
| 90 | + |
| 91 | +# add PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python to handle protobuf breaking changes |
| 92 | +core.Aspects.of(data_quality_monitor_stack).add(ProtobufConfigAspect(app, "ProtobufConfigDataMonitor")) |
| 93 | + |
79 | 94 | model_quality_monitor_stack = ModelMonitorStack( |
80 | 95 | app, |
81 | 96 | "ModelQualityModelMonitorStack", |
|
87 | 102 | AwsSDKConfigAspect(app, "SDKUserAgentModelQuality", solution_id, version) |
88 | 103 | ) |
89 | 104 |
|
| 105 | +# add PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python to handle protobuf breaking changes |
| 106 | +core.Aspects.of(model_quality_monitor_stack).add(ProtobufConfigAspect(app, "ProtobufConfigModelQuality")) |
| 107 | + |
90 | 108 | model_bias_monitor_stack = ModelMonitorStack( |
91 | 109 | app, |
92 | 110 | "ModelBiasModelMonitorStack", |
|
96 | 114 |
|
97 | 115 | core.Aspects.of(model_bias_monitor_stack).add(AwsSDKConfigAspect(app, "SDKUserAgentModelBias", solution_id, version)) |
98 | 116 |
|
| 117 | +# add PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python to handle protobuf breaking changes |
| 118 | +core.Aspects.of(model_bias_monitor_stack).add(ProtobufConfigAspect(app, "ProtobufConfigModelBias")) |
99 | 119 |
|
100 | 120 | model_explainability_monitor_stack = ModelMonitorStack( |
101 | 121 | app, |
|
108 | 128 | AwsSDKConfigAspect(app, "SDKUserAgentModelExplainability", solution_id, version) |
109 | 129 | ) |
110 | 130 |
|
| 131 | +# add PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python to handle protobuf breaking changes |
| 132 | +core.Aspects.of(model_explainability_monitor_stack).add(ProtobufConfigAspect(app, "ProtobufConfigModelExplainability")) |
111 | 133 |
|
112 | 134 | realtime_stack = BYOMRealtimePipelineStack( |
113 | 135 | app, |
|
117 | 139 |
|
118 | 140 | core.Aspects.of(realtime_stack).add(AwsSDKConfigAspect(app, "SDKUserAgentRealtime", solution_id, version)) |
119 | 141 |
|
| 142 | +# add PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python to handle protobuf breaking changes |
| 143 | +core.Aspects.of(realtime_stack).add(ProtobufConfigAspect(app, "ProtobufConfigRealtime")) |
120 | 144 |
|
121 | 145 | autopilot_stack = AutopilotJobStack( |
122 | 146 | app, |
|
126 | 150 |
|
127 | 151 | core.Aspects.of(autopilot_stack).add(AwsSDKConfigAspect(app, "SDKUserAgentAutopilot", solution_id, version)) |
128 | 152 |
|
| 153 | +# add PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python to handle protobuf breaking changes |
| 154 | +core.Aspects.of(autopilot_stack).add(ProtobufConfigAspect(app, "ProtobufConfigAutopilot")) |
129 | 155 |
|
130 | 156 | training_stack = TrainingJobStack( |
131 | 157 | app, |
|
136 | 162 |
|
137 | 163 | core.Aspects.of(training_stack).add(AwsSDKConfigAspect(app, "SDKUserAgentTraining", solution_id, version)) |
138 | 164 |
|
| 165 | +# add PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python to handle protobuf breaking changes |
| 166 | +core.Aspects.of(training_stack).add(ProtobufConfigAspect(app, "ProtobufConfigTraining")) |
139 | 167 |
|
140 | 168 | hyperparameter_tunning_stack = TrainingJobStack( |
141 | 169 | app, |
|
148 | 176 | AwsSDKConfigAspect(app, "SDKUserAgentHyperparamater", solution_id, version) |
149 | 177 | ) |
150 | 178 |
|
| 179 | +# add PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python to handle protobuf breaking changes |
| 180 | +core.Aspects.of(hyperparameter_tunning_stack).add(ProtobufConfigAspect(app, "ProtobufConfigHyperparamater")) |
151 | 181 |
|
152 | 182 | SingleAccountCodePipelineStack( |
153 | 183 | app, |
|
0 commit comments