Skip to content

Commit 8908fd4

Browse files
authored
Merge branch 'master' into fix-duplicate-transformer-docstring
2 parents e41aae6 + 1e679b4 commit 8908fd4

File tree

30 files changed

+462
-10
lines changed

30 files changed

+462
-10
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## v2.233.0 (2024-11-04)
4+
5+
### Features
6+
7+
* triton v24.09
8+
* Marketplace model support in HubService
9+
10+
### Bug Fixes and Other Changes
11+
12+
* Fixing JumpStart Tests
13+
* bumping smp version from 2.6.0 to 2.6.1
14+
* Updates for DJL 0.30.0 release
15+
316
## v2.232.3 (2024-10-30)
417

518
### Bug Fixes and Other Changes

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.232.4.dev0
1+
2.233.1.dev0

hatch_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def read_feature_deps(feature):
2020

2121
optional_dependencies = {"all": []}
2222

23-
for feature in ("feature-processor", "huggingface", "local", "scipy"):
23+
for feature in ("feature-processor", "huggingface", "local", "scipy", "sagemaker-mlflow"):
2424
dependencies = read_feature_deps(feature)
2525
optional_dependencies[feature] = dependencies
2626
optional_dependencies["all"].extend(dependencies)

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ dependencies = [
4848
"PyYAML~=6.0",
4949
"requests",
5050
"sagemaker-core>=1.0.0,<2.0.0",
51-
"sagemaker-mlflow",
5251
"schema",
5352
"smdebug_rulesconfig==1.0.1",
5453
"tblib>=1.7.0,<4",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sagemaker-mlflow>=0.1.0

requirements/extras/test_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ huggingface_hub>=0.23.4
4444
uvicorn>=0.30.1
4545
fastapi>=0.111.0
4646
nest-asyncio
47+
sagemaker-mlflow>=0.1.0

src/sagemaker/chainer/model.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
from sagemaker.utils import to_string
3838
from sagemaker.workflow import is_pipeline_variable
3939
from sagemaker.workflow.entities import PipelineVariable
40+
from sagemaker.model_life_cycle import ModelLifeCycle
4041

4142
logger = logging.getLogger("sagemaker")
4243

@@ -180,6 +181,7 @@ def register(
180181
skip_model_validation: Optional[Union[str, PipelineVariable]] = None,
181182
source_uri: Optional[Union[str, PipelineVariable]] = None,
182183
model_card: Optional[Union[ModelPackageModelCard, ModelCard]] = None,
184+
model_life_cycle: Optional[ModelLifeCycle] = None,
183185
):
184186
"""Creates a model package for creating SageMaker models or listing on Marketplace.
185187
@@ -233,6 +235,7 @@ def register(
233235
(default: None).
234236
model_card (ModeCard or ModelPackageModelCard): document contains qualitative and
235237
quantitative information about a model (default: None).
238+
model_life_cycle (ModelLifeCycle): ModelLifeCycle object (default: None).
236239
237240
Returns:
238241
str: A string of SageMaker Model Package ARN.
@@ -274,6 +277,7 @@ def register(
274277
skip_model_validation=skip_model_validation,
275278
source_uri=source_uri,
276279
model_card=model_card,
280+
model_life_cycle=model_life_cycle,
277281
)
278282

279283
def prepare_container_def(

src/sagemaker/estimator.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@
107107
from sagemaker.workflow.parameters import ParameterString
108108
from sagemaker.workflow.pipeline_context import PipelineSession, runnable_by_pipeline
109109

110-
from sagemaker.mlflow.forward_sagemaker_metrics import log_sagemaker_job_to_mlflow
111110

112111
logger = logging.getLogger(__name__)
113112

@@ -1374,8 +1373,14 @@ def fit(
13741373
forward_to_mlflow_tracking_server = True
13751374
if wait:
13761375
self.latest_training_job.wait(logs=logs)
1377-
if forward_to_mlflow_tracking_server:
1378-
log_sagemaker_job_to_mlflow(self.latest_training_job.name)
1376+
try:
1377+
if forward_to_mlflow_tracking_server:
1378+
from sagemaker.mlflow.forward_sagemaker_metrics import log_sagemaker_job_to_mlflow
1379+
1380+
log_sagemaker_job_to_mlflow(self.latest_training_job.name)
1381+
except ImportError:
1382+
if forward_to_mlflow_tracking_server:
1383+
raise ValueError("Unable to import mlflow, check if sagemaker-mlflow is installed")
13791384

13801385
def _compilation_job_name(self):
13811386
"""Placeholder docstring"""
@@ -1756,6 +1761,7 @@ def register(
17561761
data_input_configuration=None,
17571762
skip_model_validation=None,
17581763
source_uri=None,
1764+
model_life_cycle=None,
17591765
model_card=None,
17601766
**kwargs,
17611767
):
@@ -1807,6 +1813,7 @@ def register(
18071813
source_uri (str): The URI of the source for the model package (default: None).
18081814
model_card (ModeCard or ModelPackageModelCard): document contains qualitative and
18091815
quantitative information about a model (default: None).
1816+
model_life_cycle (ModelLifeCycle): ModelLifeCycle object (default: None).
18101817
**kwargs: Passed to invocation of ``create_model()``. Implementations may customize
18111818
``create_model()`` to accept ``**kwargs`` to customize model creation during
18121819
deploy. For more, see the implementation docs.
@@ -1862,6 +1869,7 @@ def register(
18621869
skip_model_validation=skip_model_validation,
18631870
source_uri=source_uri,
18641871
model_card=model_card,
1872+
model_life_cycle=model_life_cycle,
18651873
)
18661874

18671875
@property

src/sagemaker/huggingface/model.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
from sagemaker.utils import to_string, format_tags
3737
from sagemaker.workflow import is_pipeline_variable
3838
from sagemaker.workflow.entities import PipelineVariable
39+
from sagemaker.model_life_cycle import ModelLifeCycle
3940

4041
logger = logging.getLogger("sagemaker")
4142

@@ -362,6 +363,7 @@ def register(
362363
data_input_configuration: Optional[Union[str, PipelineVariable]] = None,
363364
skip_model_validation: Optional[Union[str, PipelineVariable]] = None,
364365
source_uri: Optional[Union[str, PipelineVariable]] = None,
366+
model_life_cycle: Optional[ModelLifeCycle] = None,
365367
model_card: Optional[Union[ModelPackageModelCard, ModelCard]] = None,
366368
):
367369
"""Creates a model package for creating SageMaker models or listing on Marketplace.
@@ -417,6 +419,7 @@ def register(
417419
(default: None).
418420
model_card (ModeCard or ModelPackageModelCard): document contains qualitative and
419421
quantitative information about a model (default: None).
422+
model_life_cycle (ModelLifeCycle): ModelLifeCycle object (default: None).
420423
421424
Returns:
422425
A `sagemaker.model.ModelPackage` instance.
@@ -465,6 +468,7 @@ def register(
465468
data_input_configuration=data_input_configuration,
466469
skip_model_validation=skip_model_validation,
467470
source_uri=source_uri,
471+
model_life_cycle=model_life_cycle,
468472
model_card=model_card,
469473
)
470474

src/sagemaker/image_uri_config/djl-neuronx.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"ap-south-1": "763104351884",
1313
"ap-southeast-1": "763104351884",
1414
"ap-southeast-2": "763104351884",
15+
"ap-southeast-5": "550225433462",
1516
"cn-north-1": "727897471807",
1617
"cn-northwest-1": "727897471807",
1718
"eu-central-1": "763104351884",
@@ -35,6 +36,7 @@
3536
"ap-south-1": "763104351884",
3637
"ap-southeast-1": "763104351884",
3738
"ap-southeast-2": "763104351884",
39+
"ap-southeast-5": "550225433462",
3840
"cn-north-1": "727897471807",
3941
"cn-northwest-1": "727897471807",
4042
"eu-central-1": "763104351884",
@@ -58,6 +60,7 @@
5860
"ap-south-1": "763104351884",
5961
"ap-southeast-1": "763104351884",
6062
"ap-southeast-2": "763104351884",
63+
"ap-southeast-5": "550225433462",
6164
"cn-north-1": "727897471807",
6265
"cn-northwest-1": "727897471807",
6366
"eu-central-1": "763104351884",
@@ -81,6 +84,7 @@
8184
"ap-south-1": "763104351884",
8285
"ap-southeast-1": "763104351884",
8386
"ap-southeast-2": "763104351884",
87+
"ap-southeast-5": "550225433462",
8488
"cn-north-1": "727897471807",
8589
"cn-northwest-1": "727897471807",
8690
"eu-central-1": "763104351884",
@@ -104,6 +108,7 @@
104108
"ap-south-1": "763104351884",
105109
"ap-southeast-1": "763104351884",
106110
"ap-southeast-2": "763104351884",
111+
"ap-southeast-5": "550225433462",
107112
"cn-north-1": "727897471807",
108113
"cn-northwest-1": "727897471807",
109114
"eu-central-1": "763104351884",
@@ -127,6 +132,7 @@
127132
"ap-south-1": "763104351884",
128133
"ap-southeast-1": "763104351884",
129134
"ap-southeast-2": "763104351884",
135+
"ap-southeast-5": "550225433462",
130136
"cn-north-1": "727897471807",
131137
"cn-northwest-1": "727897471807",
132138
"eu-central-1": "763104351884",
@@ -150,6 +156,7 @@
150156
"ap-south-1": "763104351884",
151157
"ap-southeast-1": "763104351884",
152158
"ap-southeast-2": "763104351884",
159+
"ap-southeast-5": "550225433462",
153160
"cn-north-1": "727897471807",
154161
"cn-northwest-1": "727897471807",
155162
"eu-central-1": "763104351884",
@@ -173,6 +180,7 @@
173180
"ap-south-1": "763104351884",
174181
"ap-southeast-1": "763104351884",
175182
"ap-southeast-2": "763104351884",
183+
"ap-southeast-5": "550225433462",
176184
"cn-north-1": "727897471807",
177185
"cn-northwest-1": "727897471807",
178186
"eu-central-1": "763104351884",

0 commit comments

Comments
 (0)