Skip to content

Commit 53b7f72

Browse files
committed
Py312 upgrade step 2 new: Update dependencies, integ tests and unit tests
1 parent 6b96afa commit 53b7f72

File tree

58 files changed

+1547
-1559
lines changed

Some content is hidden

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

58 files changed

+1547
-1559
lines changed

.githooks/pre-push

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ start_time=`date +%s`
1212
tox -e sphinx,doc8 --parallel all
1313
./ci-scripts/displaytime.sh 'sphinx,doc8' $start_time
1414
start_time=`date +%s`
15-
tox -e py38,py39,py310 --parallel all -- tests/unit
16-
./ci-scripts/displaytime.sh 'py38,py39,py310 unit' $start_time
15+
tox -e py39,py310,py311,py312 --parallel all -- tests/unit
16+
./ci-scripts/displaytime.sh 'py39,py310,py311,py312 unit' $start_time

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

+1-1
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", "py311"]
29+
python-version: ["py39", "py310", "py311","py312"]
3030
steps:
3131
- name: Configure AWS Credentials
3232
uses: aws-actions/configure-aws-credentials@v4

.github/workflows/codebuild-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
strategy:
6464
fail-fast: false
6565
matrix:
66-
python-version: ["py38","py39","py310","py311"]
66+
python-version: ["py39","py310","py311","py312"]
6767
steps:
6868
- name: Configure AWS Credentials
6969
uses: aws-actions/configure-aws-credentials@v4

.pylintrc

+19-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,24 @@ disable=
9494
useless-object-inheritance, # TODO: Enable this check and fix code once Python 2 is no longer supported.
9595
super-with-arguments,
9696
raise-missing-from,
97-
E1136,
97+
C0116, # Missing function or method docstring
98+
C0209, # Use f-string instead of format
99+
E0015, # Unrecognized option found in config
100+
E0702, # Raising a string instead of an exception
101+
E1101, # Module has no member (likely dynamic attr)
102+
E1136, # Value assigned to something inferred as None
103+
R0022, # Useless option value in config
104+
R1710, # Inconsistent return statements
105+
R1714, # Consider using `in` with comparisons
106+
R1729, # Use a generator
107+
R1732,
108+
R1735, # Consider using a dict or list literal
109+
W0237, # Argument renamed in override
110+
W0613, # Unused argument
111+
W0621, # Redefining name from outer scope
112+
W0719
113+
W1404, # Implicit string concatenation
114+
W1514, # `open()` used without encoding
98115

99116
[REPORTS]
100117
# Set the output format. Available formats are text, parseable, colorized, msvs
@@ -436,4 +453,4 @@ analyse-fallback-blocks=no
436453

437454
# Exceptions that will emit a warning when being caught. Defaults to
438455
# "Exception"
439-
overgeneral-exceptions=Exception
456+
overgeneral-exceptions=builtins.Exception

CHANGELOG.md

-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
# Changelog
22

3-
## v2.243.2 (2025-04-16)
4-
5-
### Bug Fixes and Other Changes
6-
7-
* tgi image uri unit tests
8-
* Fix deepdiff dependencies
9-
103
## v2.243.1 (2025-04-11)
114

125
### Bug Fixes and Other Changes

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.243.3.dev0
1+
2.243.2.dev0

doc/requirements.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
sphinx==5.1.1
2-
sphinx-rtd-theme==0.5.0
3-
docutils==0.15.2
4-
packaging==20.9
1+
sphinx==7.2.1
2+
sphinx-rtd-theme==3.0.0
3+
docutils>=0.18.1,<0.21
4+
packaging>=23.0,<25
55
jinja2==3.1.6
66
schema==0.7.5
77
accelerate>=0.24.1,<=0.27.0

pyproject.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "sagemaker"
77
dynamic = ["version", "optional-dependencies"]
88
description = "Open source library for training and deploying models on Amazon SageMaker."
99
readme = "README.rst"
10-
requires-python = ">=3.8"
10+
requires-python = ">=3.9"
1111
authors = [
1212
{ name = "Amazon Web Services" },
1313
]
@@ -25,10 +25,10 @@ classifiers = [
2525
"License :: OSI Approved :: Apache Software License",
2626
"Natural Language :: English",
2727
"Programming Language :: Python",
28-
"Programming Language :: Python :: 3.8",
2928
"Programming Language :: Python :: 3.9",
3029
"Programming Language :: Python :: 3.10",
3130
"Programming Language :: Python :: 3.11",
31+
"Programming Language :: Python :: 3.12",
3232
]
3333
dependencies = [
3434
"attrs>=23.1.0,<24",
@@ -39,15 +39,15 @@ dependencies = [
3939
"google-pasta",
4040
"importlib-metadata>=1.4.0,<7.0",
4141
"jsonschema",
42-
"numpy>=1.9.0,<2.0",
42+
"numpy==1.26.4",
4343
"omegaconf>=2.2,<=2.3",
44-
"packaging>=20.0",
44+
"packaging>=23.0,<25",
4545
"pandas",
4646
"pathos",
4747
"platformdirs",
4848
"protobuf>=3.12,<6.0",
4949
"psutil",
50-
"PyYAML~=6.0",
50+
"PyYAML>=6.0.1",
5151
"requests",
5252
"sagemaker-core>=1.0.17,<2.0.0",
5353
"schema",
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
urllib3>=1.26.8,<3.0.0
22
docker>=5.0.2,<8.0.0
3-
PyYAML>=5.4.1,<7
3+
PyYAML>=6.0.1,<7
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
scipy==1.10.1
1+
scipy==1.11.3

requirements/extras/test_requirements.txt

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
tox==3.24.5
2-
numpy>=1.24.0
2+
numpy==1.26.4
33
build[virtualenv]==1.2.1
4-
flake8==4.0.1
4+
flake8==7.1.2
55
pytest==6.2.5
66
pytest-cov==3.0.0
77
pytest-rerunfailures==10.2
@@ -14,10 +14,10 @@ awslogs==0.14.0
1414
black==24.3.0
1515
stopit==1.1.2
1616
# Update tox.ini to have correct version of airflow constraints file
17-
apache-airflow==2.9.3
17+
apache-airflow==2.10.4
1818
apache-airflow-providers-amazon==7.2.1
1919
attrs>=23.1.0,<24
20-
fabric==2.6.0
20+
fabric==3.2.2
2121
requests==2.32.2
2222
sagemaker-experiments==0.1.35
2323
Jinja2==3.1.6
@@ -26,13 +26,13 @@ pandas==1.4.4
2626
scikit-learn==1.3.0
2727
cloudpickle==2.2.1
2828
jsonpickle<4.0.0
29-
PyYAML==6.0
29+
PyYAML>=6.0.1
3030
# TODO find workaround
3131
xgboost>=1.6.2,<=1.7.6
3232
pillow>=10.0.1,<=11
3333
opentelemetry-proto==1.27.0
3434
protobuf==4.25.5
35-
tensorboard>=2.9.0,<=2.15.2
35+
tensorboard>=2.16.2,<=2.18.0
3636
transformers==4.48.0
3737
sentencepiece==0.1.99
3838
# https://github.com/triton-inference-server/server/issues/6246
@@ -42,7 +42,7 @@ onnx==1.17.0
4242
nbformat>=5.9,<6
4343
accelerate>=0.24.1,<=0.27.0
4444
schema==0.7.5
45-
tensorflow>=2.9.0,<=2.15.1
45+
tensorflow>=2.16.2,<=2.18.0
4646
mlflow>=2.12.2,<2.13
4747
huggingface_hub==0.26.2
4848
uvicorn>=0.30.1
@@ -51,3 +51,4 @@ nest-asyncio
5151
sagemaker-mlflow>=0.1.0
5252
deepdiff>=8.0.0
5353
orderly-set<5.4.0
54+
lexicon
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
doc8==0.10.1
2-
Pygments==2.15.0
1+
doc8==1.1.2
2+
Pygments==2.18.0
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
flake8==4.0.1
2-
flake8-future-import==0.4.6
1+
flake8==7.1.2
2+
flake8-future-import==0.4.7
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pylint==2.6.2
2-
astroid==2.4.2
1+
pylint==3.0.3
2+
astroid==3.0.2
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
pyenchant==3.2.2
2-
pylint==2.6.2
2+
pylint==3.0.3

src/sagemaker/config/config_schema.py

+16-8
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,8 @@ def _simple_path(*args: str):
540540
"minItems": 0,
541541
"maxItems": 50,
542542
},
543-
# Regex is taken from https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html#sagemaker-CreateTrainingJob-request-Environment
543+
# Regex is taken from https://docs.aws.amazon.com/sagemaker/latest/APIReference/
544+
# API_CreateTrainingJob.html#sagemaker-CreateTrainingJob-request-Environment
544545
"environmentVariables": {
545546
TYPE: OBJECT,
546547
ADDITIONAL_PROPERTIES: False,
@@ -553,13 +554,15 @@ def _simple_path(*args: str):
553554
},
554555
"maxProperties": 48,
555556
},
556-
# Regex is taken from https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_S3DataSource.html#sagemaker-Type-S3DataSource-S3Uri
557+
# Regex is taken from https://docs.aws.amazon.com/sagemaker/latest/APIReference/
558+
# API_S3DataSource.html#sagemaker-Type-S3DataSource-S3Uri
557559
"s3Uri": {
558560
TYPE: "string",
559561
"pattern": "^(https|s3)://([^/]+)/?(.*)$",
560562
"maxLength": 1024,
561563
},
562-
# Regex is taken from https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_AlgorithmSpecification.html#sagemaker-Type-AlgorithmSpecification-ContainerEntrypoint
564+
# Regex is taken from https://docs.aws.amazon.com/sagemaker/latest/APIReference/
565+
# API_AlgorithmSpecification.html#sagemaker-Type-AlgorithmSpecification-ContainerEntrypoint
563566
"preExecutionCommand": {TYPE: "string", "pattern": r".*"},
564567
# Regex based on https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_PipelineDefinitionS3Location.html
565568
# except with an additional ^ and $ for the beginning and the end to closer align to
@@ -570,7 +573,8 @@ def _simple_path(*args: str):
570573
"minLength": 3,
571574
"maxLength": 63,
572575
},
573-
# Regex is taken from https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_MonitoringJobDefinition.html#sagemaker-Type-MonitoringJobDefinition-Environment
576+
# Regex is taken from https://docs.aws.amazon.com/sagemaker/latest/APIReference/
577+
# API_MonitoringJobDefinition.html#sagemaker-Type-MonitoringJobDefinition-Environment
574578
"environment-Length256-Properties50": {
575579
TYPE: OBJECT,
576580
ADDITIONAL_PROPERTIES: False,
@@ -583,7 +587,8 @@ def _simple_path(*args: str):
583587
},
584588
"maxProperties": 50,
585589
},
586-
# Regex is taken from https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTransformJob.html#sagemaker-CreateTransformJob-request-Environment
590+
# Regex is taken from https://docs.aws.amazon.com/sagemaker/latest/APIReference/
591+
# API_CreateTransformJob.html#sagemaker-CreateTransformJob-request-Environment
587592
"environment-Length10240-Properties16": {
588593
TYPE: OBJECT,
589594
ADDITIONAL_PROPERTIES: False,
@@ -596,7 +601,8 @@ def _simple_path(*args: str):
596601
},
597602
"maxProperties": 16,
598603
},
599-
# Regex is taken from https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ContainerDefinition.html#sagemaker-Type-ContainerDefinition-Environment
604+
# Regex is taken from https://docs.aws.amazon.com/sagemaker/latest/APIReference/
605+
# API_ContainerDefinition.html#sagemaker-Type-ContainerDefinition-Environment
600606
"environment-Length1024-Properties16": {
601607
TYPE: OBJECT,
602608
ADDITIONAL_PROPERTIES: False,
@@ -609,7 +615,8 @@ def _simple_path(*args: str):
609615
},
610616
"maxProperties": 16,
611617
},
612-
# Regex is taken from https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateProcessingJob.html#sagemaker-CreateProcessingJob-request-Environment
618+
# Regex is taken from https://docs.aws.amazon.com/sagemaker/latest/APIReference/
619+
# API_CreateProcessingJob.html#sagemaker-CreateProcessingJob-request-Environment
613620
"environment-Length256-Properties100": {
614621
TYPE: OBJECT,
615622
ADDITIONAL_PROPERTIES: False,
@@ -622,7 +629,8 @@ def _simple_path(*args: str):
622629
},
623630
"maxProperties": 100,
624631
},
625-
# Regex is taken from https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html#sagemaker-CreateTrainingJob-request-Environment
632+
# Regex is taken from https://docs.aws.amazon.com/sagemaker/latest/APIReference/
633+
# API_CreateTrainingJob.html#sagemaker-CreateTrainingJob-request-Environment
626634
"environment-Length512-Properties48": {
627635
TYPE: OBJECT,
628636
ADDITIONAL_PROPERTIES: False,

src/sagemaker/feature_store/dataset_builder.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ def _construct_query_string(self, base: FeatureGroupToBeMerged) -> str:
929929
selected_features += ", "
930930
selected_features += ", ".join(
931931
[
932-
f'fg_{i}."{feature_name}" as "{feature_name}.{(i+1)}"'
932+
f'fg_{i}."{feature_name}" as "{feature_name}.{(i + 1)}"'
933933
for feature_name in feature_group.projected_feature_names
934934
]
935935
)

src/sagemaker/image_uri_config/huggingface-llm-neuronx.json

-11
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"registries": {
1515
"af-south-1": "626614931356",
1616
"ap-east-1": "871362719292",
17-
"ap-east-2": "975050140332",
1817
"ap-northeast-1": "763104351884",
1918
"ap-northeast-2": "763104351884",
2019
"ap-northeast-3": "364406365360",
@@ -67,7 +66,6 @@
6766
"registries": {
6867
"af-south-1": "626614931356",
6968
"ap-east-1": "871362719292",
70-
"ap-east-2": "975050140332",
7169
"ap-northeast-1": "763104351884",
7270
"ap-northeast-2": "763104351884",
7371
"ap-northeast-3": "364406365360",
@@ -120,7 +118,6 @@
120118
"registries": {
121119
"af-south-1": "626614931356",
122120
"ap-east-1": "871362719292",
123-
"ap-east-2": "975050140332",
124121
"ap-northeast-1": "763104351884",
125122
"ap-northeast-2": "763104351884",
126123
"ap-northeast-3": "364406365360",
@@ -173,7 +170,6 @@
173170
"registries": {
174171
"af-south-1": "626614931356",
175172
"ap-east-1": "871362719292",
176-
"ap-east-2": "975050140332",
177173
"ap-northeast-1": "763104351884",
178174
"ap-northeast-2": "763104351884",
179175
"ap-northeast-3": "364406365360",
@@ -226,7 +222,6 @@
226222
"registries": {
227223
"af-south-1": "626614931356",
228224
"ap-east-1": "871362719292",
229-
"ap-east-2": "975050140332",
230225
"ap-northeast-1": "763104351884",
231226
"ap-northeast-2": "763104351884",
232227
"ap-northeast-3": "364406365360",
@@ -279,7 +274,6 @@
279274
"registries": {
280275
"af-south-1": "626614931356",
281276
"ap-east-1": "871362719292",
282-
"ap-east-2": "975050140332",
283277
"ap-northeast-1": "763104351884",
284278
"ap-northeast-2": "763104351884",
285279
"ap-northeast-3": "364406365360",
@@ -332,7 +326,6 @@
332326
"registries": {
333327
"af-south-1": "626614931356",
334328
"ap-east-1": "871362719292",
335-
"ap-east-2": "975050140332",
336329
"ap-northeast-1": "763104351884",
337330
"ap-northeast-2": "763104351884",
338331
"ap-northeast-3": "364406365360",
@@ -385,7 +378,6 @@
385378
"registries": {
386379
"af-south-1": "626614931356",
387380
"ap-east-1": "871362719292",
388-
"ap-east-2": "975050140332",
389381
"ap-northeast-1": "763104351884",
390382
"ap-northeast-2": "763104351884",
391383
"ap-northeast-3": "364406365360",
@@ -438,7 +430,6 @@
438430
"registries": {
439431
"af-south-1": "626614931356",
440432
"ap-east-1": "871362719292",
441-
"ap-east-2": "975050140332",
442433
"ap-northeast-1": "763104351884",
443434
"ap-northeast-2": "763104351884",
444435
"ap-northeast-3": "364406365360",
@@ -491,7 +482,6 @@
491482
"registries": {
492483
"af-south-1": "626614931356",
493484
"ap-east-1": "871362719292",
494-
"ap-east-2": "975050140332",
495485
"ap-northeast-1": "763104351884",
496486
"ap-northeast-2": "763104351884",
497487
"ap-northeast-3": "364406365360",
@@ -544,7 +534,6 @@
544534
"registries": {
545535
"af-south-1": "626614931356",
546536
"ap-east-1": "871362719292",
547-
"ap-east-2": "975050140332",
548537
"ap-northeast-1": "763104351884",
549538
"ap-northeast-2": "763104351884",
550539
"ap-northeast-3": "364406365360",

0 commit comments

Comments
 (0)