Skip to content

Commit 5ba2e9c

Browse files
committed
Merge remote-tracking branch 'origin/feature-store-v3' into feature-store-v3
2 parents 723f2f3 + bd24608 commit 5ba2e9c

2 files changed

Lines changed: 209 additions & 11 deletions

File tree

sagemaker-core/src/sagemaker/core/image_uri_config/autogluon.json

Lines changed: 174 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
"1.0": "1.0.0",
1515
"1.1": "1.1.1",
1616
"1.2": "1.2.0",
17-
"1.3": "1.3.0"
17+
"1.3": "1.3.0",
18+
"1.4": "1.4.0",
19+
"1.5": "1.5.0"
1820
},
1921
"versions": {
2022
"0.3.1": {
@@ -647,6 +649,88 @@
647649
"py_versions": [
648650
"py311"
649651
]
652+
},
653+
"1.4.0": {
654+
"registries": {
655+
"af-south-1": "626614931356",
656+
"il-central-1": "780543022126",
657+
"ap-east-1": "871362719292",
658+
"ap-northeast-1": "763104351884",
659+
"ap-northeast-2": "763104351884",
660+
"ap-northeast-3": "364406365360",
661+
"ap-south-1": "763104351884",
662+
"ap-southeast-1": "763104351884",
663+
"ap-southeast-2": "763104351884",
664+
"ap-southeast-3": "907027046896",
665+
"ap-southeast-4": "457447274322",
666+
"ca-central-1": "763104351884",
667+
"eu-central-1": "763104351884",
668+
"eu-north-1": "763104351884",
669+
"eu-west-1": "763104351884",
670+
"eu-west-2": "763104351884",
671+
"eu-west-3": "763104351884",
672+
"eu-south-1": "692866216735",
673+
"me-south-1": "217643126080",
674+
"sa-east-1": "763104351884",
675+
"us-east-1": "763104351884",
676+
"us-east-2": "763104351884",
677+
"us-gov-east-1": "446045086412",
678+
"us-gov-west-1": "442386744353",
679+
"us-iso-east-1": "886529160074",
680+
"us-isob-east-1": "094389454867",
681+
"us-west-1": "763104351884",
682+
"us-west-2": "763104351884",
683+
"ca-west-1": "204538143572"
684+
},
685+
"repository": "autogluon-training",
686+
"processors": [
687+
"cpu",
688+
"gpu"
689+
],
690+
"py_versions": [
691+
"py311"
692+
]
693+
},
694+
"1.5.0": {
695+
"registries": {
696+
"af-south-1": "626614931356",
697+
"il-central-1": "780543022126",
698+
"ap-east-1": "871362719292",
699+
"ap-northeast-1": "763104351884",
700+
"ap-northeast-2": "763104351884",
701+
"ap-northeast-3": "364406365360",
702+
"ap-south-1": "763104351884",
703+
"ap-southeast-1": "763104351884",
704+
"ap-southeast-2": "763104351884",
705+
"ap-southeast-3": "907027046896",
706+
"ap-southeast-4": "457447274322",
707+
"ca-central-1": "763104351884",
708+
"eu-central-1": "763104351884",
709+
"eu-north-1": "763104351884",
710+
"eu-west-1": "763104351884",
711+
"eu-west-2": "763104351884",
712+
"eu-west-3": "763104351884",
713+
"eu-south-1": "692866216735",
714+
"me-south-1": "217643126080",
715+
"sa-east-1": "763104351884",
716+
"us-east-1": "763104351884",
717+
"us-east-2": "763104351884",
718+
"us-gov-east-1": "446045086412",
719+
"us-gov-west-1": "442386744353",
720+
"us-iso-east-1": "886529160074",
721+
"us-isob-east-1": "094389454867",
722+
"us-west-1": "763104351884",
723+
"us-west-2": "763104351884",
724+
"ca-west-1": "204538143572"
725+
},
726+
"repository": "autogluon-training",
727+
"processors": [
728+
"cpu",
729+
"gpu"
730+
],
731+
"py_versions": [
732+
"py311"
733+
]
650734
}
651735
}
652736
},
@@ -661,7 +745,9 @@
661745
"1.0": "1.0.0",
662746
"1.1": "1.1.1",
663747
"1.2": "1.2.0",
664-
"1.3": "1.3.0"
748+
"1.3": "1.3.0",
749+
"1.4": "1.4.0",
750+
"1.5": "1.5.0"
665751
},
666752
"versions": {
667753
"0.3.1": {
@@ -1329,6 +1415,92 @@
13291415
"py_versions": [
13301416
"py311"
13311417
]
1418+
},
1419+
"1.4.0": {
1420+
"registries": {
1421+
"af-south-1": "626614931356",
1422+
"il-central-1": "780543022126",
1423+
"ap-east-1": "871362719292",
1424+
"ap-northeast-1": "763104351884",
1425+
"ap-northeast-2": "763104351884",
1426+
"ap-northeast-3": "364406365360",
1427+
"ap-south-1": "763104351884",
1428+
"ap-southeast-1": "763104351884",
1429+
"ap-southeast-2": "763104351884",
1430+
"ap-southeast-3": "907027046896",
1431+
"ap-southeast-4": "457447274322",
1432+
"ca-central-1": "763104351884",
1433+
"cn-north-1": "727897471807",
1434+
"cn-northwest-1": "727897471807",
1435+
"eu-central-1": "763104351884",
1436+
"eu-north-1": "763104351884",
1437+
"eu-west-1": "763104351884",
1438+
"eu-west-2": "763104351884",
1439+
"eu-west-3": "763104351884",
1440+
"eu-south-1": "692866216735",
1441+
"me-south-1": "217643126080",
1442+
"sa-east-1": "763104351884",
1443+
"us-east-1": "763104351884",
1444+
"us-east-2": "763104351884",
1445+
"us-gov-east-1": "446045086412",
1446+
"us-gov-west-1": "442386744353",
1447+
"us-iso-east-1": "886529160074",
1448+
"us-isob-east-1": "094389454867",
1449+
"us-west-1": "763104351884",
1450+
"us-west-2": "763104351884",
1451+
"ca-west-1": "204538143572"
1452+
},
1453+
"repository": "autogluon-inference",
1454+
"processors": [
1455+
"cpu",
1456+
"gpu"
1457+
],
1458+
"py_versions": [
1459+
"py311"
1460+
]
1461+
},
1462+
"1.5.0": {
1463+
"registries": {
1464+
"af-south-1": "626614931356",
1465+
"il-central-1": "780543022126",
1466+
"ap-east-1": "871362719292",
1467+
"ap-northeast-1": "763104351884",
1468+
"ap-northeast-2": "763104351884",
1469+
"ap-northeast-3": "364406365360",
1470+
"ap-south-1": "763104351884",
1471+
"ap-southeast-1": "763104351884",
1472+
"ap-southeast-2": "763104351884",
1473+
"ap-southeast-3": "907027046896",
1474+
"ap-southeast-4": "457447274322",
1475+
"ca-central-1": "763104351884",
1476+
"cn-north-1": "727897471807",
1477+
"cn-northwest-1": "727897471807",
1478+
"eu-central-1": "763104351884",
1479+
"eu-north-1": "763104351884",
1480+
"eu-west-1": "763104351884",
1481+
"eu-west-2": "763104351884",
1482+
"eu-west-3": "763104351884",
1483+
"eu-south-1": "692866216735",
1484+
"me-south-1": "217643126080",
1485+
"sa-east-1": "763104351884",
1486+
"us-east-1": "763104351884",
1487+
"us-east-2": "763104351884",
1488+
"us-gov-east-1": "446045086412",
1489+
"us-gov-west-1": "442386744353",
1490+
"us-iso-east-1": "886529160074",
1491+
"us-isob-east-1": "094389454867",
1492+
"us-west-1": "763104351884",
1493+
"us-west-2": "763104351884",
1494+
"ca-west-1": "204538143572"
1495+
},
1496+
"repository": "autogluon-inference",
1497+
"processors": [
1498+
"cpu",
1499+
"gpu"
1500+
],
1501+
"py_versions": [
1502+
"py311"
1503+
]
13321504
}
13331505
}
13341506
}

sagemaker-train/src/sagemaker/train/evaluate/execution.py

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
from pydantic import BaseModel, Field
1919
from sagemaker.core.common_utils import TagsDict
2020
from sagemaker.core.helper.session_helper import Session
21-
from sagemaker.core.resources import Pipeline, PipelineExecution, Tag
21+
from sagemaker.core.resources import Pipeline, PipelineExecution
22+
from sagemaker.core.resources import Tag as ResourceTag # For Tag.get_all()
23+
from sagemaker.core.shapes import Tag # For Pipeline.create() tags parameter
2224
from sagemaker.core.telemetry.telemetry_logging import _telemetry_emitter
2325
from sagemaker.core.telemetry.constants import Feature
2426

@@ -68,9 +70,33 @@ def _create_evaluation_pipeline(
6870
resolved_pipeline_definition = template.render(pipeline_name=pipeline_name)
6971

7072
# Create tags for the pipeline
71-
tags.extend([
72-
{"key": _TAG_SAGEMAKER_MODEL_EVALUATION, "value": "true"}
73-
])
73+
# Note: Tags must be Tag objects, not dicts, for Pydantic validation to pass
74+
tag_objects = []
75+
76+
# Add evaluation tag
77+
tag_objects.append(Tag(key=_TAG_SAGEMAKER_MODEL_EVALUATION, value="true"))
78+
79+
# Process any additional tags passed in
80+
if tags:
81+
for i, tag_item in enumerate(tags):
82+
try:
83+
if hasattr(tag_item, '__class__') and 'Tag' in tag_item.__class__.__name__:
84+
# Already a Tag object
85+
tag_objects.append(tag_item)
86+
elif isinstance(tag_item, dict):
87+
# Convert dict to Tag object - handle both lowercase and capitalized keys
88+
key = tag_item.get("key") or tag_item.get("Key")
89+
value = tag_item.get("value") or tag_item.get("Value")
90+
if key and value:
91+
tag_objects.append(Tag(key=str(key), value=str(value)))
92+
else:
93+
logger.warning(f"Skipping invalid tag at index {i}: {tag_item}")
94+
else:
95+
logger.warning(f"Skipping unsupported tag type at index {i}: {type(tag_item)}")
96+
except Exception as e:
97+
logger.warning(f"Error processing tag at index {i}: {e}")
98+
99+
logger.info(f"Creating pipeline with {len(tag_objects)} tags")
74100

75101
pipeline = Pipeline.create(
76102
pipeline_name=pipeline_name,
@@ -79,7 +105,7 @@ def _create_evaluation_pipeline(
79105
pipeline_definition=resolved_pipeline_definition,
80106
pipeline_display_name=f"EvaluationPipeline-{eval_type.value}",
81107
pipeline_description=f"Pipeline for {eval_type.value} evaluation jobs",
82-
tags=tags,
108+
tags=tag_objects,
83109
session=session,
84110
region=region
85111
)
@@ -205,8 +231,8 @@ def _get_or_create_pipeline(
205231
for pipeline in pipelines:
206232
pipeline_arn = pipeline.pipeline_arn
207233

208-
# Get tags using Tag.get_all
209-
tags_list = Tag.get_all(resource_arn=pipeline_arn, session=session, region=region)
234+
# Get tags using ResourceTag.get_all
235+
tags_list = ResourceTag.get_all(resource_arn=pipeline_arn, session=session, region=region)
210236
tags = {tag.key: tag.value for tag in tags_list}
211237

212238
# Validate tag
@@ -647,8 +673,8 @@ def get_all(
647673
try:
648674
pipeline_arn = pipeline.pipeline_arn
649675

650-
# Get tags using Tag.get_all
651-
tags_list = Tag.get_all(resource_arn=pipeline_arn, session=session, region=region)
676+
# Get tags using ResourceTag.get_all
677+
tags_list = ResourceTag.get_all(resource_arn=pipeline_arn, session=session, region=region)
652678
tags = {tag.key: tag.value for tag in tags_list}
653679

654680
# Validate tag - only process evaluation pipelines

0 commit comments

Comments
 (0)