Repository navigation
Commit 71972f0
Rishabh Devnani
feat(pipeline): Add inference and lineage step types
Adds four pipeline step classes -- EndpointConfigStep, EndpointStep,
InferenceComponentStep and LineageStep -- along with their StepTypeEnum
values and package exports.
Each step takes step_args captured under a PipelineSession, following the
convention used by TrainingStep and ModelStep. Capture goes through one
seam: PipelineSession._intercept_create_request returns the captured
context, so a producer returns its result directly, and the base Session
holds no pipeline-specific branch.
Producers:
- Session.create_endpoint_config, added here, creates only the endpoint
configuration, matching this step's one-resource-per-step shape.
endpoint_from_production_variants also creates the endpoint and so is
not a producer; the request building is shared between the two.
- Session.create_endpoint and Session.create_inference_component.
- Action.create(), Artifact.create(), Context.create() for lineage, whose
requests Record._invoke_api routes through the same seam.
LineageStep records a batch of entities in one step, which is what the
pipeline service models: it creates every entity in the step, then adds
the associations between them. An association references a sibling by name
and type, resolved against the entities that same step creates, or an
existing entity by ARN. Because Association.create() takes ARNs only and a
sibling has no ARN until the step runs, associations are declared with
LineageAssociation and LineageEntityReference. A name and type reference
that the step does not create is rejected at construction.
Chaining note: the resource created by an EndpointConfig step carries an
execution-unique name suffix, so a downstream step must reference it as
config_step.properties.EndpointConfigName rather than the requested name.
The Endpoint step does not suffix.
Testing: 38 unit tests, plus two integration tests run end to end against
the service -- a chained EndpointConfig -> Endpoint -> InferenceComponent
pipeline, and a LineageStep recording an Action, an Artifact and a Context
with associations between them.
---
X-AI-Prompt: Add the inference and lineage pipeline step types to the
public SDK, reworked per review feedback to use one capture seam and to
batch lineage entities per step
X-AI-Tool: kiro-cli1 parent 62dca3b commit 71972f0
11 files changed
Lines changed: 1834 additions & 28 deletions
File tree
- sagemaker-core/src/sagemaker/core
- apiutils
- helper
- workflow
- sagemaker-mlops
- src/sagemaker/mlops/workflow
- tests
- integ/workflow
- unit/workflow
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
222 | 231 | | |
223 | 232 | | |
224 | 233 | | |
225 | 234 | | |
226 | | - | |
227 | | - | |
228 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1006 | 1006 | | |
1007 | 1007 | | |
1008 | 1008 | | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
1009 | 1055 | | |
1010 | 1056 | | |
1011 | 1057 | | |
| |||
1060 | 1106 | | |
1061 | 1107 | | |
1062 | 1108 | | |
1063 | | - | |
1064 | 1109 | | |
1065 | 1110 | | |
1066 | 1111 | | |
| |||
1090 | 1135 | | |
1091 | 1136 | | |
1092 | 1137 | | |
1093 | | - | |
1094 | | - | |
| 1138 | + | |
1095 | 1139 | | |
1096 | | - | |
1097 | | - | |
1098 | | - | |
1099 | | - | |
1100 | | - | |
1101 | | - | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
1102 | 1203 | | |
1103 | 1204 | | |
1104 | 1205 | | |
| |||
1122 | 1223 | | |
1123 | 1224 | | |
1124 | 1225 | | |
1125 | | - | |
1126 | | - | |
1127 | 1226 | | |
1128 | 1227 | | |
1129 | 1228 | | |
1130 | 1229 | | |
1131 | 1230 | | |
1132 | | - | |
1133 | | - | |
1134 | | - | |
1135 | | - | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
1136 | 1240 | | |
1137 | 1241 | | |
1138 | 1242 | | |
1139 | 1243 | | |
1140 | 1244 | | |
1141 | 1245 | | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
1142 | 1251 | | |
1143 | 1252 | | |
1144 | 1253 | | |
| |||
1232 | 1341 | | |
1233 | 1342 | | |
1234 | 1343 | | |
1235 | | - | |
1236 | | - | |
1237 | | - | |
1238 | | - | |
1239 | | - | |
1240 | | - | |
1241 | 1344 | | |
1242 | 1345 | | |
1243 | 1346 | | |
| |||
1257 | 1360 | | |
1258 | 1361 | | |
1259 | 1362 | | |
1260 | | - | |
1261 | | - | |
1262 | | - | |
1263 | | - | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
1264 | 1377 | | |
1265 | 1378 | | |
1266 | 1379 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
223 | 230 | | |
224 | 231 | | |
225 | 232 | | |
| |||
229 | 236 | | |
230 | 237 | | |
231 | 238 | | |
| 239 | + | |
232 | 240 | | |
233 | 241 | | |
234 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| 50 | + | |
49 | 51 | | |
| 52 | + | |
50 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
51 | 59 | | |
52 | 60 | | |
53 | 61 | | |
| |||
98 | 106 | | |
99 | 107 | | |
100 | 108 | | |
| 109 | + | |
| 110 | + | |
101 | 111 | | |
| 112 | + | |
102 | 113 | | |
103 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
104 | 118 | | |
105 | 119 | | |
106 | 120 | | |
| |||
0 commit comments