Skip to content

Commit ebe4a77

Browse files
Merge branch 'aws:master' into feat/conda-forge-release
2 parents 5a45132 + ee420cc commit ebe4a77

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1598
-197
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ env/
4040
sagemaker_train/src/**/container_drivers/sm_train.sh
4141
sagemaker_train/src/**/container_drivers/sourcecode.json
4242
sagemaker_train/src/**/container_drivers/distributed.json
43+
.kiro

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
# Changelog
2+
## v3.7.0 (2026-03-25)
3+
4+
### Fixes
5+
- **ModelBuilder**: Sync Nova hosting configs with AGISageMakerInference (#5664)
6+
- **Evaluate**: Remove GPT OSS model evaluation restriction (#5658)
7+
8+
### Features
9+
- **AWS Batch**: Add support for Quota Management job submission and job priority update (#5659)
10+
- **AWS Batch**: Extend list_jobs_by_share for quota_share_name (#5669)
11+
- **Evaluate**: Support IAM role for BaseEvaluator (#5671)
12+
- **Telemetry**: Add telemetry attribution module for SDK usage provenance (#5661)
13+
- **MLflow**: Metrics visualization, enhanced wait UI, and eval job links (#5662)
14+
15+
### Chores
16+
- Updated SDK to use latest LMIv22 image for v3.x (#5640)
17+
- Migration guide update (#5655)
18+
- AWS Batch integ test resources are now uniquely named by test run (#5666)
19+
220
## v3.6.0 (2026-03-19)
321

422
### Fixes

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.6.0
1+
3.7.0

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ classifiers = [
3333
"Programming Language :: Python :: 3.12",
3434
]
3535
dependencies = [
36-
"sagemaker-core>=2.6.0,<3.0.0",
37-
"sagemaker-train>=1.6.0,<2.0.0",
38-
"sagemaker-serve>=1.6.0,<2.0.0",
39-
"sagemaker-mlops>=1.6.0,<2.0.0",
36+
"sagemaker-core>=2.7.0,<3.0.0",
37+
"sagemaker-train>=1.7.0,<2.0.0",
38+
"sagemaker-serve>=1.7.0,<2.0.0",
39+
"sagemaker-mlops>=1.7.0,<2.0.0",
4040
]
4141

4242
[project.optional-dependencies]

sagemaker-core/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
# Changelog
2+
## v2.7.0 (2026-03-25)
3+
4+
### Bug fixes and Other Changes
5+
6+
- **Enhancement**: Add telemetry attribution module for SDK usage provenance (#5661)
7+
- **Enhancement**: Updated SDK to use latest LMIv22 image for v3.x (#5640)
8+
- **Enhancement**: Resources codegen update for eval job links (#5662)
9+
210
## v2.6.0 (2026-03-19)
311

412
### Bug fixes and Other Changes

sagemaker-core/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.6.0
1+
2.7.0

sagemaker-core/src/sagemaker/core/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@
1515
# Partner App
1616
from sagemaker.core.partner_app.auth_provider import PartnerAppAuthProvider # noqa: F401
1717

18+
# Attribution
19+
from sagemaker.core.telemetry.attribution import Attribution, set_attribution # noqa: F401
20+
1821
# Note: HyperparameterTuner and WarmStartTypes are in sagemaker.train.tuner
1922
# They are not re-exported from core to avoid circular dependencies

sagemaker-core/src/sagemaker/core/image_uri_config/djl-lmi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"mx-central-1": "637423239942"
4747
},
4848
"repository": "djl-inference",
49-
"tag_prefix": "0.36.0-lmi21.0.0-cu129"
49+
"tag_prefix": "0.36.0-lmi22.0.0-cu129"
5050
},
5151
"0.35.0": {
5252
"registries": {

sagemaker-core/src/sagemaker/core/resources.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35788,7 +35788,7 @@ def stop(self) -> None:
3578835788
ResourceNotFound: Resource being access is not found.
3578935789
"""
3579035790

35791-
client = SageMakerClient().client
35791+
client = SageMakerClient().sagemaker_client
3579235792

3579335793
operation_input_args = {
3579435794
"TrainingJobName": self.training_job_name,
@@ -35833,15 +35833,17 @@ def wait(
3583335833
progress.add_task("Waiting for TrainingJob...")
3583435834
status = Status("Current status:")
3583535835

35836-
instance_count = (
35837-
sum(
35838-
instance_group.instance_count
35839-
for instance_group in self.resource_config.instance_groups
35840-
)
35841-
if self.resource_config.instance_groups
35842-
and not isinstance(self.resource_config.instance_groups, Unassigned)
35843-
else self.resource_config.instance_count
35844-
)
35836+
instance_count = 1 # Default
35837+
if not isinstance(self.resource_config, Unassigned):
35838+
if (hasattr(self.resource_config, 'instance_groups') and
35839+
self.resource_config.instance_groups and
35840+
not isinstance(self.resource_config.instance_groups, Unassigned)):
35841+
instance_count = sum(
35842+
instance_group.instance_count
35843+
for instance_group in self.resource_config.instance_groups
35844+
)
35845+
elif hasattr(self.resource_config, 'instance_count'):
35846+
instance_count = self.resource_config.instance_count
3584535847

3584635848
if logs:
3584735849
multi_stream_logger = MultiLogStreamHandler(
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License"). You
4+
# may not use this file except in compliance with the License. A copy of
5+
# the License is located at
6+
#
7+
# http://aws.amazon.com/apache2.0/
8+
#
9+
# or in the "license" file accompanying this file. This file is
10+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11+
# ANY KIND, either express or implied. See the License for the specific
12+
# language governing permissions and limitations under the License.
13+
"""Attribution module for tracking the provenance of SDK usage."""
14+
from __future__ import absolute_import
15+
import os
16+
from enum import Enum
17+
18+
_CREATED_BY_ENV_VAR = "SAGEMAKER_PYSDK_CREATED_BY"
19+
20+
21+
class Attribution(Enum):
22+
"""Enumeration of known SDK attribution sources."""
23+
24+
SAGEMAKER_AGENT_PLUGIN = "awslabs/agent-plugins/sagemaker-ai"
25+
26+
27+
def set_attribution(attribution: Attribution):
28+
"""Sets the SDK usage attribution to the specified source.
29+
30+
Call this at the top of scripts generated by an agent or integration
31+
to enable accurate telemetry attribution.
32+
33+
Args:
34+
attribution (Attribution): The attribution source to set.
35+
36+
Raises:
37+
TypeError: If attribution is not an Attribution enum member.
38+
"""
39+
if not isinstance(attribution, Attribution):
40+
raise TypeError(f"attribution must be an Attribution enum member, got {type(attribution)}")
41+
os.environ[_CREATED_BY_ENV_VAR] = attribution.value

0 commit comments

Comments
 (0)