Skip to content

Commit 324d0c7

Browse files
authored
Merge branch 'master' into feat/instance-specific-jumpstart-host-requirements
2 parents a3deb08 + e7595a5 commit 324d0c7

File tree

85 files changed

+4961
-191
lines changed

Some content is hidden

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

85 files changed

+4961
-191
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ env/
3434
**/_repack_script_launcher.sh
3535
tests/data/**/_repack_model.py
3636
tests/data/experiment/sagemaker-dev-1.0.tar.gz
37-
src/sagemaker/serve/tmp_workspace
37+
src/sagemaker/serve/tmp_workspace

CHANGELOG.md

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

3+
## v2.209.0 (2024-02-24)
4+
5+
### Features
6+
7+
* ModelBuilder to fetch local schema when no SchemaBuilder present.
8+
* AutoGluon 1.0.0 image_uris update
9+
10+
### Bug Fixes and Other Changes
11+
12+
* skip pytorch training compiler integ test
13+
* add fixes for tarfile extractall functionality PEP-721
14+
* Fix telemetry image uri option logic for ModelBuilder
15+
* Add telemetry metrics on usage of default images for ModelBuilder
16+
* Fix error message typo
17+
* Add "distribution" parameter into record_set
18+
19+
## v2.208.0 (2024-02-15)
20+
21+
### Features
22+
23+
* Telemetry metrics
24+
* TGI 1.4.0
25+
* Support collection type and target store for feature store ingestion.
26+
27+
### Bug Fixes and Other Changes
28+
29+
* bump jinja2 to 3.1.3 in doc/requirments.txt
30+
* chore(deps): bump jinja2 from 3.0.3 to 3.1.3 in /requirements/extras
31+
* Fix dependabot alert in transformers package
32+
* Bump Apache Airflow version to 2.8.0
33+
* skip failing mxnet tests
34+
35+
### Documentation Changes
36+
37+
* change order of pipelines topics
38+
* Explain the ClarifyCheckStep and QualityCheckStep parameters
39+
* fix the ClarifyCheckStep documentation to mention PDP
40+
41+
## v2.207.1 (2024-02-06)
42+
43+
### Bug Fixes and Other Changes
44+
45+
* Add PT 2.1 as a supported framework for the smdistributed distribution
46+
* Enable private docker registry support for ModelBuilder
47+
* HF PT 2.1 Image Configs
48+
49+
### Documentation Changes
50+
51+
* add setup commands for documentation generation
52+
53+
## v2.207.0 (2024-02-05)
54+
55+
### Features
56+
57+
* Introduce HF Transformers to ModelBuilder
58+
* retrieve jumpstart estimator and predictor without specifying model id (infer from tags)
59+
60+
### Bug Fixes and Other Changes
61+
62+
* SMP PT upgrade to 2.1
63+
* Fetch HF metadata only when explicit type is not selected
64+
* relax upper bound for urllib dependency
65+
66+
## v2.206.0 (2024-01-31)
67+
68+
### Features
69+
70+
* Logic to detect hardware GPU count and aggregate GPU memory size in MiB
71+
72+
### Bug Fixes and Other Changes
73+
74+
* fixed create monitoring schedule failing after validation error
75+
* Support PipelineVariable for ModelQualityCheckConfig attributes
76+
* TGI NeuronX 0.0.17
77+
378
## v2.205.0 (2024-01-25)
479

580
### Features

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,12 @@ For example, see the [Processing API reference](https://github.com/aws/sagemaker
227227

228228
To build the Sphinx docs, run the following command in the `doc/` directory:
229229

230+
```shell
231+
# Initial setup, only required for the first run
232+
pip install -r requirements.txt
233+
pip install -e ../
234+
```
235+
230236
```shell
231237
make html
232238
```

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
recursive-include src/sagemaker *.py
22

33
include src/sagemaker/image_uri_config/*.json
4+
include src/sagemaker/serve/schema/*.json
45
include src/sagemaker/serve/requirements.txt
56
recursive-include requirements *
67

VERSION

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

doc/api/prep_data/feature_store.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ Inputs
9191
:members:
9292
:show-inheritance:
9393

94+
.. autoclass:: sagemaker.feature_store.inputs.TtlDuration
95+
:members:
96+
:show-inheritance:
97+
9498
.. autoclass:: sagemaker.feature_store.inputs.S3StorageConfig
9599
:members:
96100
:show-inheritance:

doc/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ sphinx==5.1.1
22
sphinx-rtd-theme==0.5.0
33
docutils==0.15.2
44
packaging==20.9
5-
jinja2<3.1
5+
jinja2==3.1.3
66
schema==0.7.5

doc/workflows/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The SageMaker Python SDK supports managed training and inference for a variety o
77
.. toctree::
88
:maxdepth: 2
99

10+
pipelines/index
1011
airflow/index
1112
step_functions/index
12-
pipelines/index
1313
lineage/index

requirements/extras/test_requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ 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.7.3
15+
apache-airflow==2.8.1
1616
apache-airflow-providers-amazon==7.2.1
1717
attrs>=23.1.0,<24
1818
fabric==2.6.0
1919
requests==2.31.0
2020
sagemaker-experiments==0.1.35
21-
Jinja2==3.0.3
21+
Jinja2==3.1.3
2222
pyvis==0.2.1
2323
pandas>=1.3.5,<1.5
2424
scikit-learn==1.3.0
@@ -32,7 +32,7 @@ sagemaker-feature-store-pyspark-3.3
3232
# TODO find workaround
3333
xgboost>=1.6.2,<=1.7.6
3434
pillow>=10.0.1,<=11
35-
transformers==4.32.0
35+
transformers>=4.36.0
3636
sentencepiece==0.1.99
3737
# https://github.com/triton-inference-server/server/issues/6246
3838
tritonclient[http]<2.37.0

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def read_requirements(filename):
6464
"jsonschema",
6565
"platformdirs",
6666
"tblib>=1.7.0,<3",
67-
"urllib3<1.27",
67+
"urllib3>=1.26.8,<3.0.0",
6868
"requests",
6969
"docker",
7070
"tqdm",

src/sagemaker/amazon/amazon_estimator.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,14 @@ def fit(
269269
if wait:
270270
self.latest_training_job.wait(logs=logs)
271271

272-
def record_set(self, train, labels=None, channel="train", encrypt=False):
272+
def record_set(
273+
self,
274+
train,
275+
labels=None,
276+
channel="train",
277+
encrypt=False,
278+
distribution="ShardedByS3Key",
279+
):
273280
"""Build a :class:`~RecordSet` from a numpy :class:`~ndarray` matrix and label vector.
274281
275282
For the 2D ``ndarray`` ``train``, each row is converted to a
@@ -294,6 +301,8 @@ def record_set(self, train, labels=None, channel="train", encrypt=False):
294301
should be assigned to.
295302
encrypt (bool): Specifies whether the objects uploaded to S3 are
296303
encrypted on the server side using AES-256 (default: ``False``).
304+
distribution (str): The SageMaker TrainingJob channel s3 data
305+
distribution type (default: ``ShardedByS3Key``).
297306
298307
Returns:
299308
RecordSet: A RecordSet referencing the encoded, uploading training
@@ -316,6 +325,7 @@ def record_set(self, train, labels=None, channel="train", encrypt=False):
316325
num_records=train.shape[0],
317326
feature_dim=train.shape[1],
318327
channel=channel,
328+
distribution=distribution,
319329
)
320330

321331
def _get_default_mini_batch_size(self, num_records: int):
@@ -343,6 +353,7 @@ def __init__(
343353
feature_dim: int,
344354
s3_data_type: Union[str, PipelineVariable] = "ManifestFile",
345355
channel: Union[str, PipelineVariable] = "train",
356+
distribution: str = "ShardedByS3Key",
346357
):
347358
"""A collection of Amazon :class:~`Record` objects serialized and stored in S3.
348359
@@ -358,12 +369,15 @@ def __init__(
358369
single s3 manifest file, listing each s3 object to train on.
359370
channel (str or PipelineVariable): The SageMaker Training Job channel this RecordSet
360371
should be bound to
372+
distribution (str): The SageMaker TrainingJob S3 data distribution type.
373+
Valid values: 'ShardedByS3Key', 'FullyReplicated'.
361374
"""
362375
self.s3_data = s3_data
363376
self.feature_dim = feature_dim
364377
self.num_records = num_records
365378
self.s3_data_type = s3_data_type
366379
self.channel = channel
380+
self.distribution = distribution
367381

368382
def __repr__(self):
369383
"""Return an unambiguous representation of this RecordSet"""
@@ -377,7 +391,7 @@ def data_channel(self):
377391
def records_s3_input(self):
378392
"""Return a TrainingInput to represent the training data"""
379393
return TrainingInput(
380-
self.s3_data, distribution="ShardedByS3Key", s3_data_type=self.s3_data_type
394+
self.s3_data, distribution=self.distribution, s3_data_type=self.s3_data_type
381395
)
382396

383397

src/sagemaker/estimator.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3285,7 +3285,6 @@ class Framework(EstimatorBase):
32853285
UNSUPPORTED_DLC_IMAGE_FOR_SM_PARALLELISM = (
32863286
"2.0.1-gpu-py310-cu121",
32873287
"2.0-gpu-py310-cu121",
3288-
"2.1.0-gpu-py310",
32893288
)
32903289

32913290
def __init__(
@@ -3959,7 +3958,7 @@ def _distribution_configuration(self, distribution):
39593958
for unsupported_image in Framework.UNSUPPORTED_DLC_IMAGE_FOR_SM_PARALLELISM:
39603959
if (
39613960
unsupported_image in img_uri and not torch_distributed_enabled
3962-
): # disabling DLC images with CUDA12
3961+
): # disabling DLC images without SMDataParallel or SMModelParallel
39633962
raise ValueError(
39643963
f"SMDistributed is currently incompatible with DLC image: {img_uri}. "
39653964
"(Could be due to CUDA version being greater than 11.)"

0 commit comments

Comments
 (0)