Commit 5b9e82b
Amit Modi
fix: Add PipelineVariable support to ModelTrainer fields (fixes #5524)
Extend StrPipeVar type to ModelTrainer's direct fields:
- training_image: Optional[str] -> Optional[StrPipeVar]
- algorithm_name: Optional[str] -> Optional[StrPipeVar]
- training_input_mode: Optional[str] -> Optional[StrPipeVar]
- environment: Dict[str, str] -> Dict[str, StrPipeVar]
This follows the existing V3 pattern already used by SourceCode,
OutputDataConfig, and Compute (for instance_type). The StrPipeVar
type alias and PipelineVariable.__get_pydantic_core_schema__()
already exist in the codebase.
This unblocks V2->V3 migration for SageMaker Pipelines users who
need to pass ParameterString to ModelTrainer fields.
Fixes #55241 parent 55a4ee5 commit 5b9e82b
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| |||
235 | 236 | | |
236 | 237 | | |
237 | 238 | | |
238 | | - | |
| 239 | + | |
239 | 240 | | |
240 | | - | |
| 241 | + | |
241 | 242 | | |
242 | 243 | | |
243 | 244 | | |
244 | | - | |
245 | | - | |
| 245 | + | |
| 246 | + | |
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
| |||
0 commit comments