Commit b839617
authored
fix: correct Tag class usage in pipeline creation (#5526)
Pipeline creation was failing with Pydantic validation errors when
BenchmarkEvaluator attempted to create a new SageMaker Pipeline. This
occurred because the code imported Tag from sagemaker.core.resources
instead of sagemaker.core.shapes, which is what Pipeline.create()
expects for its tags parameter.
Root Cause:
The SDK has two different Tag classes:
- sagemaker.core.resources.Tag: Used for Tag.get_all() operations
- sagemaker.core.shapes.Tag: Used for Pipeline.create() parameter
Changes:
- Import Tag from sagemaker.core.shapes for Pipeline.create()
- Import Tag as ResourceTag from sagemaker.core.resources for Tag.get_all()
- Create proper Tag objects instead of dicts
- Add error handling for tag conversion
- Update Tag.get_all() calls to use ResourceTag
Impact:
This fixes benchmark evaluation failures (MMLU_PRO, BBH, GPQA, etc.)
when creating new pipelines.
Testing:
Verified both creating new pipeline and reusing existing pipeline.1 parent e993405 commit b839617
1 file changed
+35
-9
lines changedLines changed: 35 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
71 | | - | |
72 | | - | |
73 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
74 | 100 | | |
75 | 101 | | |
76 | 102 | | |
| |||
79 | 105 | | |
80 | 106 | | |
81 | 107 | | |
82 | | - | |
| 108 | + | |
83 | 109 | | |
84 | 110 | | |
85 | 111 | | |
| |||
205 | 231 | | |
206 | 232 | | |
207 | 233 | | |
208 | | - | |
209 | | - | |
| 234 | + | |
| 235 | + | |
210 | 236 | | |
211 | 237 | | |
212 | 238 | | |
| |||
647 | 673 | | |
648 | 674 | | |
649 | 675 | | |
650 | | - | |
651 | | - | |
| 676 | + | |
| 677 | + | |
652 | 678 | | |
653 | 679 | | |
654 | 680 | | |
| |||
0 commit comments