Skip to content

Commit 2d095ed

Browse files
Py312 upgrade step 2: Update dependencies, integ tests and unit tests (#5123)
* clean up * bump maxdepth for doc/api/training to fix readthedocs * change maxdepth for readthedocs rendering doc/api/training page * change maxdepth for readthedocs rendering doc/api/training page * change maxdepth for readthedocs rendering doc/api/training page
1 parent 79c4ddd commit 2d095ed

File tree

54 files changed

+1555
-1236
lines changed

Some content is hidden

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

54 files changed

+1555
-1236
lines changed

.githooks/pre-push

Lines changed: 2 additions & 2 deletions
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

.pylintrc

Lines changed: 19 additions & 2 deletions
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

.readthedocs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
version: 2
66

77
build:
8-
os: ubuntu-20.04
8+
os: ubuntu-22.04
99
tools:
10-
python: "3.9"
10+
python: "3.12"
1111

1212

1313
python:

doc/api/inference/model_builder.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ Model Builder
33

44
This module contains classes related to Amazon Sagemaker Model Builder
55

6-
.. autoclass:: sagemaker.serve.builder.model_builder.ModelBuilder
6+
.. autoclass:: sagemaker.serve.ModelBuilder
77

8-
.. automethod:: sagemaker.serve.builder.model_builder.ModelBuilder.build
8+
.. automethod:: sagemaker.serve.ModelBuilder.build
99

10-
.. automethod:: sagemaker.serve.builder.model_builder.ModelBuilder.save
10+
.. automethod:: sagemaker.serve.ModelBuilder.save
1111

12-
.. autoclass:: sagemaker.serve.spec.inference_spec.InferenceSpec
12+
.. autoclass:: sagemaker.serve.InferenceSpec
1313

14-
.. autoclass:: sagemaker.serve.builder.schema_builder.SchemaBuilder
14+
.. autoclass:: sagemaker.serve.SchemaBuilder
1515

16-
.. autoclass:: sagemaker.serve.marshalling.custom_payload_translator.CustomPayloadTranslator
16+
.. autoclass:: sagemaker.serve.CustomPayloadTranslator

doc/api/training/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Training APIs
33
#############
44

55
.. toctree::
6-
:maxdepth: 4
6+
:maxdepth: 1
77

88
model_trainer
99
algorithm

doc/conf.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,11 @@
8383

8484
html_css_files = [
8585
"https://cdn.datatables.net/1.10.23/css/jquery.dataTables.min.css",
86+
"theme_overrides.css",
87+
"pagination.css",
88+
"search_accessories.css",
8689
]
8790

88-
html_context = {
89-
"css_files": [
90-
"_static/theme_overrides.css",
91-
"_static/pagination.css",
92-
"_static/search_accessories.css",
93-
]
94-
}
95-
9691
# Example configuration for intersphinx: refer to the Python standard library.
9792
intersphinx_mapping = {"python": ("http://docs.python.org/", None)}
9893

doc/requirements.txt

Lines changed: 4 additions & 4 deletions
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.6
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

Lines changed: 5 additions & 5 deletions
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",
Lines changed: 1 addition & 1 deletion
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
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
scipy==1.10.1
1+
scipy==1.11.3

0 commit comments

Comments
 (0)