Skip to content

Commit cfe8139

Browse files
authored
Merge branch 'master' into processing-job-codeartifact-support
2 parents 94f609e + bda5f18 commit cfe8139

File tree

32 files changed

+1134
-157
lines changed

32 files changed

+1134
-157
lines changed

.github/workflows/codebuild-ci-health.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
python-version: ["py38", "py39", "py310"]
29+
python-version: ["py38", "py39", "py310", "py311"]
3030
steps:
3131
- name: Configure AWS Credentials
3232
uses: aws-actions/configure-aws-credentials@v4

.github/workflows/codebuild-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
python-version: ["py38", "py39", "py310"]
32+
python-version: ["py38","py39","py310","py311"]
3333
steps:
3434
- name: Configure AWS Credentials
3535
uses: aws-actions/configure-aws-credentials@v4

CHANGELOG.md

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

3+
## v2.214.3 (2024-04-04)
4+
5+
### Bug Fixes and Other Changes
6+
7+
* [Fix] Switch to subprocess in ModelBuilder when capturing dependencies
8+
* chore: skip flaky test
9+
10+
## v2.214.2 (2024-04-01)
11+
12+
### Bug Fixes and Other Changes
13+
14+
* Skip JS Tune integration test
15+
* bump apache-airflow version to 2.8.3
16+
* bump onnx version to >=1.15.0
17+
* Updates for DJL 0.27.0 release
18+
* Tune (local mode) support for Jumpstart Models
19+
* attach jumpstart estimator for gated model
20+
21+
## v2.214.1 (2024-03-27)
22+
23+
### Bug Fixes and Other Changes
24+
25+
* Update schema dependency version
26+
* remove failing deprecated tests from suite
27+
* update readme, trigger p311 tests
28+
* JumpStart list models flaky tests
29+
* fix badge in README
30+
31+
## v2.214.0 (2024-03-22)
32+
33+
### Features
34+
35+
* add support to ``clarify.py`` for time series explainability jobs
36+
37+
### Bug Fixes and Other Changes
38+
39+
* remove pytorch test for deprecated function
40+
* skip test_experiment_analytics to unblock release
41+
* Create workflow module scoped sagemaker_session to resolve test race condition
42+
* Simplify how we process test dependencies, which are supposed to include all extras.
43+
* skip failing feature store search integ test
44+
* skip failing pt test
45+
* list jumpstart models with invalid version strings
46+
* urge customers to install latest version
47+
348
## v2.213.0 (2024-03-15)
449

550
### Features

README.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ SageMaker Python SDK
2222
:target: https://sagemaker.readthedocs.io/en/stable/
2323
:alt: Documentation Status
2424

25-
.. image:: https://github.com/benieric/sagemaker-python-sdk/actions/workflows/codebuild-ci-health.yml/badge.svg
26-
:target: https://github.com/benieric/sagemaker-python-sdk/actions/workflows/codebuild-ci-health.yml
25+
.. image:: https://github.com/aws/sagemaker-python-sdk/actions/workflows/codebuild-ci-health.yml/badge.svg
26+
:target: https://github.com/aws/sagemaker-python-sdk/actions/workflows/codebuild-ci-health.yml
2727
:alt: CI Health
2828

2929
SageMaker Python SDK is an open source library for training and deploying machine learning models on Amazon SageMaker.
@@ -93,6 +93,7 @@ SageMaker Python SDK is tested on:
9393
- Python 3.8
9494
- Python 3.9
9595
- Python 3.10
96+
- Python 3.11
9697

9798
AWS Permissions
9899
~~~~~~~~~~~~~~~

VERSION

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

requirements/extras/test_requirements.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ awslogs==0.14.0
1212
black==22.3.0
1313
stopit==1.1.2
1414
# Update tox.ini to have correct version of airflow constraints file
15-
apache-airflow==2.8.2
15+
apache-airflow==2.8.3
1616
apache-airflow-providers-amazon==7.2.1
1717
attrs>=23.1.0,<24
1818
fabric==2.6.0
@@ -31,6 +31,8 @@ transformers>=4.36.0
3131
sentencepiece==0.1.99
3232
# https://github.com/triton-inference-server/server/issues/6246
3333
tritonclient[http]<2.37.0
34-
onnx==1.14.1
34+
onnx>=1.15.0
3535
# tf2onnx==1.15.1
3636
nbformat>=5.9,<6
37+
accelerate>=0.24.1,<=0.27.0
38+
schema==0.7.5

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ def read_requirements(filename):
8787
test_dependencies = read_requirements("requirements/extras/test_requirements.txt")
8888
# test dependencies are a superset of testing and extra dependencies
8989
test_dependencies.extend(extras["all"])
90-
# remove torch and torchvision if python version is not 3.10
91-
if sys.version_info.minor != 10:
90+
# remove torch and torchvision if python version is not 3.10/3.11
91+
if sys.version_info.minor != 10 or sys.version_info.minor != 11:
9292
test_dependencies = [
9393
module
9494
for module in test_dependencies
@@ -126,6 +126,7 @@ def read_requirements(filename):
126126
"Programming Language :: Python :: 3.8",
127127
"Programming Language :: Python :: 3.9",
128128
"Programming Language :: Python :: 3.10",
129+
"Programming Language :: Python :: 3.11",
129130
],
130131
install_requires=required_packages,
131132
extras_require=extras,

src/sagemaker/image_uri_config/djl-deepspeed.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,38 @@
33
"inference"
44
],
55
"versions": {
6+
"0.27.0": {
7+
"registries": {
8+
"af-south-1": "626614931356",
9+
"il-central-1": "780543022126",
10+
"ap-east-1": "871362719292",
11+
"ap-northeast-1": "763104351884",
12+
"ap-northeast-2": "763104351884",
13+
"ap-northeast-3": "364406365360",
14+
"ap-south-1": "763104351884",
15+
"ap-southeast-1": "763104351884",
16+
"ap-southeast-2": "763104351884",
17+
"ap-southeast-3": "907027046896",
18+
"ca-central-1": "763104351884",
19+
"cn-north-1": "727897471807",
20+
"cn-northwest-1": "727897471807",
21+
"eu-central-1": "763104351884",
22+
"eu-north-1": "763104351884",
23+
"eu-west-1": "763104351884",
24+
"eu-west-2": "763104351884",
25+
"eu-west-3": "763104351884",
26+
"eu-south-1": "692866216735",
27+
"me-south-1": "217643126080",
28+
"sa-east-1": "763104351884",
29+
"us-east-1": "763104351884",
30+
"us-east-2": "763104351884",
31+
"us-west-1": "763104351884",
32+
"us-west-2": "763104351884",
33+
"ca-west-1": "204538143572"
34+
},
35+
"repository": "djl-inference",
36+
"tag_prefix": "0.27.0-deepspeed0.12.6-cu121"
37+
},
638
"0.26.0": {
739
"registries": {
840
"af-south-1": "626614931356",

src/sagemaker/image_uri_config/djl-neuronx.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@
33
"inference"
44
],
55
"versions": {
6+
"0.27.0": {
7+
"registries": {
8+
"ap-northeast-1": "763104351884",
9+
"ap-south-1": "763104351884",
10+
"ap-southeast-1": "763104351884",
11+
"ap-southeast-2": "763104351884",
12+
"eu-central-1": "763104351884",
13+
"eu-west-1": "763104351884",
14+
"eu-west-3": "763104351884",
15+
"sa-east-1": "763104351884",
16+
"us-east-1": "763104351884",
17+
"us-east-2": "763104351884",
18+
"us-west-2": "763104351884",
19+
"ca-west-1": "204538143572"
20+
},
21+
"repository": "djl-inference",
22+
"tag_prefix": "0.27.0-neuronx-sdk2.18.0"
23+
},
624
"0.26.0": {
725
"registries": {
826
"ap-northeast-1": "763104351884",

src/sagemaker/image_uri_config/djl-tensorrtllm.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,38 @@
33
"inference"
44
],
55
"versions": {
6+
"0.27.0": {
7+
"registries": {
8+
"af-south-1": "626614931356",
9+
"il-central-1": "780543022126",
10+
"ap-east-1": "871362719292",
11+
"ap-northeast-1": "763104351884",
12+
"ap-northeast-2": "763104351884",
13+
"ap-northeast-3": "364406365360",
14+
"ap-south-1": "763104351884",
15+
"ap-southeast-1": "763104351884",
16+
"ap-southeast-2": "763104351884",
17+
"ap-southeast-3": "907027046896",
18+
"ca-central-1": "763104351884",
19+
"cn-north-1": "727897471807",
20+
"cn-northwest-1": "727897471807",
21+
"eu-central-1": "763104351884",
22+
"eu-north-1": "763104351884",
23+
"eu-west-1": "763104351884",
24+
"eu-west-2": "763104351884",
25+
"eu-west-3": "763104351884",
26+
"eu-south-1": "692866216735",
27+
"me-south-1": "217643126080",
28+
"sa-east-1": "763104351884",
29+
"us-east-1": "763104351884",
30+
"us-east-2": "763104351884",
31+
"us-west-1": "763104351884",
32+
"us-west-2": "763104351884",
33+
"ca-west-1": "204538143572"
34+
},
35+
"repository": "djl-inference",
36+
"tag_prefix": "0.27.0-tensorrtllm0.8.0-cu122"
37+
},
638
"0.26.0": {
739
"registries": {
840
"af-south-1": "626614931356",

src/sagemaker/jumpstart/estimator.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
from sagemaker.jumpstart.utils import (
3838
validate_model_id_and_get_type,
3939
resolve_model_sagemaker_config_field,
40+
verify_model_region_and_return_specs,
4041
)
4142
from sagemaker.utils import stringify_object, format_tags, Tags
4243
from sagemaker.model_monitor.data_capture_config import DataCaptureConfig
@@ -729,11 +730,27 @@ def attach(
729730

730731
model_version = model_version or "*"
731732

733+
additional_kwargs = {"model_id": model_id, "model_version": model_version}
734+
735+
model_specs = verify_model_region_and_return_specs(
736+
model_id=model_id,
737+
version=model_version,
738+
region=sagemaker_session.boto_region_name,
739+
scope=JumpStartScriptScope.TRAINING,
740+
tolerate_deprecated_model=True, # model is already trained, so tolerate if deprecated
741+
tolerate_vulnerable_model=True, # model is already trained, so tolerate if vulnerable
742+
sagemaker_session=sagemaker_session,
743+
)
744+
745+
# eula was already accepted if the model was successfully trained
746+
if model_specs.is_gated_model():
747+
additional_kwargs.update({"environment": {"accept_eula": "true"}})
748+
732749
return cls._attach(
733750
training_job_name=training_job_name,
734751
sagemaker_session=sagemaker_session,
735752
model_channel_name=model_channel_name,
736-
additional_kwargs={"model_id": model_id, "model_version": model_version},
753+
additional_kwargs=additional_kwargs,
737754
)
738755

739756
def deploy(

src/sagemaker/jumpstart/notebook_utils.py

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,10 @@ def list_jumpstart_tasks( # pylint: disable=redefined-builtin
178178
)
179179
tasks: Set[str] = set()
180180
for model_id, _ in _generate_jumpstart_model_versions(
181-
filter=filter, region=region, sagemaker_session=sagemaker_session
181+
filter=filter,
182+
region=region,
183+
sagemaker_session=sagemaker_session,
184+
model_type=JumpStartModelType.OPEN_WEIGHTS,
182185
):
183186
_, task, _ = extract_framework_task_model(model_id)
184187
tasks.add(task)
@@ -209,7 +212,10 @@ def list_jumpstart_frameworks( # pylint: disable=redefined-builtin
209212
)
210213
frameworks: Set[str] = set()
211214
for model_id, _ in _generate_jumpstart_model_versions(
212-
filter=filter, region=region, sagemaker_session=sagemaker_session
215+
filter=filter,
216+
region=region,
217+
sagemaker_session=sagemaker_session,
218+
model_type=JumpStartModelType.OPEN_WEIGHTS,
213219
):
214220
framework, _, _ = extract_framework_task_model(model_id)
215221
frameworks.add(framework)
@@ -244,7 +250,10 @@ def list_jumpstart_scripts( # pylint: disable=redefined-builtin
244250

245251
scripts: Set[str] = set()
246252
for model_id, version in _generate_jumpstart_model_versions(
247-
filter=filter, region=region, sagemaker_session=sagemaker_session
253+
filter=filter,
254+
region=region,
255+
sagemaker_session=sagemaker_session,
256+
model_type=JumpStartModelType.OPEN_WEIGHTS,
248257
):
249258
scripts.add(JumpStartScriptScope.INFERENCE)
250259
model_specs = verify_model_region_and_return_specs(
@@ -337,6 +346,7 @@ def _generate_jumpstart_model_versions( # pylint: disable=redefined-builtin
337346
region: Optional[str] = None,
338347
list_incomplete_models: bool = False,
339348
sagemaker_session: Session = DEFAULT_JUMPSTART_SAGEMAKER_SESSION,
349+
model_type: Optional[JumpStartModelType] = None,
340350
) -> Generator:
341351
"""Generate models for JumpStart, and optionally apply filters to result.
342352
@@ -370,12 +380,22 @@ def _generate_jumpstart_model_versions( # pylint: disable=redefined-builtin
370380
s3_client=sagemaker_session.s3_client,
371381
model_type=JumpStartModelType.OPEN_WEIGHTS,
372382
)
373-
models_manifest_list = open_weight_manifest_list + prop_models_manifest_list
383+
models_manifest_list = (
384+
open_weight_manifest_list
385+
if model_type == JumpStartModelType.OPEN_WEIGHTS
386+
else (
387+
prop_models_manifest_list
388+
if model_type == JumpStartModelType.PROPRIETARY
389+
else open_weight_manifest_list + prop_models_manifest_list
390+
)
391+
)
374392

375393
if isinstance(filter, str):
376394
filter = Identity(filter)
377395

378-
manifest_keys = set(models_manifest_list[0].__slots__ + prop_models_manifest_list[0].__slots__)
396+
manifest_keys = set(
397+
open_weight_manifest_list[0].__slots__ + prop_models_manifest_list[0].__slots__
398+
)
379399

380400
all_keys: Set[str] = set()
381401

0 commit comments

Comments
 (0)