Repository navigation
Commit 23cab69
Rohan Gujarathi
fix: propagate deploy tags on the model-customization endpoint paths
Tags passed to ModelBuilder.deploy() were accepted but never reached the
endpoints created on the model-customization paths, so they could not be used
for tag-based resource association.
deploy() branches into _deploy_model_customization() for fine-tuned and Nova
models and returns before reaching _deploy_core_endpoint(), which is the only
place that merges the deploy-time tags kwarg into self._tags. Those paths build
their endpoint tags from self._tags, so they saw only the tags ModelBuilder had
added itself. Merge the kwarg into the accumulator on entry so all three
endpoint-creation paths below pick it up.
The restricted-model-package path created its endpoint with no tags at all;
it now receives them like the other two.
Adds _tags_as_key_value_list() to normalize tags into the lowercase key/value
list the sagemaker.core.resources create() calls are typed for. self._tags can
hold either casing or a bare {key: value} mapping, and the previous inline
reads indexed tag["Key"] directly after format_tags(), which returns a list
unchanged whatever its casing -- so a lowercase list raised KeyError. That was
already reachable through build(tags=...) and add_tags().1 parent a7bf7ea commit 23cab69
2 files changed
Lines changed: 166 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
| |||
180 | 181 | | |
181 | 182 | | |
182 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
183 | 222 | | |
184 | 223 | | |
185 | 224 | | |
| |||
6185 | 6224 | | |
6186 | 6225 | | |
6187 | 6226 | | |
| 6227 | + | |
| 6228 | + | |
| 6229 | + | |
| 6230 | + | |
| 6231 | + | |
| 6232 | + | |
6188 | 6233 | | |
6189 | 6234 | | |
6190 | 6235 | | |
| |||
6226 | 6271 | | |
6227 | 6272 | | |
6228 | 6273 | | |
6229 | | - | |
| 6274 | + | |
| 6275 | + | |
| 6276 | + | |
6230 | 6277 | | |
6231 | 6278 | | |
6232 | 6279 | | |
| |||
6266 | 6313 | | |
6267 | 6314 | | |
6268 | 6315 | | |
6269 | | - | |
6270 | | - | |
6271 | | - | |
6272 | | - | |
| 6316 | + | |
6273 | 6317 | | |
6274 | 6318 | | |
6275 | 6319 | | |
| |||
6541 | 6585 | | |
6542 | 6586 | | |
6543 | 6587 | | |
6544 | | - | |
6545 | | - | |
6546 | | - | |
6547 | | - | |
6548 | | - | |
| 6588 | + | |
| 6589 | + | |
| 6590 | + | |
| 6591 | + | |
6549 | 6592 | | |
6550 | 6593 | | |
6551 | 6594 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
0 commit comments