Skip to content

Master ci py312 new #5072

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 64 commits into
base: master-ci-py312-pr-test
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
4aa6c7c
Test py312 ci support
mollyheamazon Feb 26, 2025
280424d
Test py312 ci support
mollyheamazon Feb 27, 2025
1374184
first commit
mollyheamazon Dec 18, 2024
49de844
test to point to personal stack
mollyheamazon Jan 2, 2025
696cb47
changed tox.ini
mollyheamazon Feb 27, 2025
5d35bd0
Revert "changed tox.ini"
mollyheamazon Feb 27, 2025
2ab95fb
Revert "Revert "changed tox.ini""
mollyheamazon Feb 27, 2025
dc2fcd5
Revert "Revert "Revert "changed tox.ini"""
mollyheamazon Feb 27, 2025
f143ca7
Revert "Revert "changed tox.ini""
mollyheamazon Feb 27, 2025
31d7478
Revert "changed tox.ini"
mollyheamazon Feb 27, 2025
f78febe
Revert "test to point to personal stack"
mollyheamazon Feb 27, 2025
7669550
Revert "first commit"
mollyheamazon Feb 27, 2025
598447f
add pyproject.toml
mollyheamazon Feb 27, 2025
c915fed
add py312 to ci
mollyheamazon Feb 27, 2025
1f0f608
Merge branch 'master-ci-py312-pr-test' into master-ci-py312
mollyheamazon Feb 27, 2025
332389c
bump numpy version
mollyheamazon Feb 27, 2025
041c739
numpy version change
mollyheamazon Feb 27, 2025
88fbe0c
add py312
mollyheamazon Feb 27, 2025
5c20eee
upgrade pip version
mollyheamazon Feb 27, 2025
3feadc5
add setuptools wheel to tox.ini
mollyheamazon Feb 28, 2025
a27527d
add pyyaml version constraint, remove py312 from docstring because th…
mollyheamazon Feb 28, 2025
340ab3b
update pyyaml version constraint
mollyheamazon Feb 28, 2025
5bfbb55
update pyyaml version constraint
mollyheamazon Feb 28, 2025
8c6fc86
remove py38 from unit testing
mollyheamazon Feb 28, 2025
5084e6f
deprecate py38
mollyheamazon Feb 28, 2025
f679f2c
bump scipy
mollyheamazon Feb 28, 2025
6655760
bump tensorflow and tensorboard
mollyheamazon Mar 1, 2025
4116094
bump dill
mollyheamazon Mar 1, 2025
1a23c2a
bump apache-airflow to ensure dill and greenlet version
mollyheamazon Mar 1, 2025
9b9eb32
remove constraint for apache-airflow
mollyheamazon Mar 3, 2025
b5da915
remove constraint for apache-airflow
mollyheamazon Mar 3, 2025
e0caf76
bump torch version
mollyheamazon Mar 3, 2025
c69de67
bump torchvision version
mollyheamazon Mar 3, 2025
76efed5
new tests
mollyheamazon Mar 4, 2025
d7560cc
try changing some tests
mollyheamazon Mar 6, 2025
cbe7340
update model trainer test
mollyheamazon Mar 10, 2025
50ab9eb
fix test_pipeline
mollyheamazon Mar 12, 2025
10f4687
add constraint to apache in tox
mollyheamazon Mar 14, 2025
8af122b
Fix key error in _send_metrics() (#5068)
pintaoz-aws Feb 28, 2025
c6c6b64
fix: Added check for the presence of model package group before creat…
keshav-chandak Feb 28, 2025
09f0285
Use sagemaker session's s3_resource in download_folder (#5064)
pintaoz-aws Mar 3, 2025
604fae7
Fix error when there is no session to call _create_model_request() (#…
pintaoz-aws Mar 5, 2025
7c29b96
Ensure Model.is_repack() returns a boolean (#5060)
pintaoz-aws Mar 5, 2025
ed2c7e7
feat: Allow ModelTrainer to accept hyperparameters file (#5059)
benieric Mar 5, 2025
3f1d2de
feature: support training for JumpStart model references as part of C…
Narrohag Mar 5, 2025
cb2f1b2
feat: Make DistributedConfig Extensible (#5039)
benieric Mar 5, 2025
f186104
Skip tests with deprecated instance type (#5077)
pintaoz-aws Mar 6, 2025
1df4f38
prepare release v2.241.0
Mar 6, 2025
7b9013b
update development version to v2.241.1.dev0
Mar 6, 2025
23674fe
pipeline definition function doc update (#5074)
rohangujarathi Mar 6, 2025
e266baa
feat: add integ tests for training JumpStart models in private hub (#…
Narrohag Mar 10, 2025
3717e4d
fix: resolve infinite loop in _find_config on Windows systems (#4970)
Julfried Mar 10, 2025
11aac41
change: update image_uri_configs 03-11-2025 07:18:09 PST
sagemaker-bot Mar 11, 2025
b872f3e
Fixing Pytorch training python version in tests (#5084)
nargokul Mar 12, 2025
5e8e894
remove s3 output location requirement from hub class init (#5081)
bencrabtree Mar 12, 2025
a7458b9
fix: Prevent RunContext overlap between test_run tests (#5083)
rrrkharse Mar 12, 2025
5850515
Merge branch 'master-ci-py312-pr-test' into master-ci-py312-new
mollyheamazon Mar 17, 2025
3d0027e
fix integ test by bumping py38 to py39 for PyTorch
mollyheamazon Mar 17, 2025
bf24681
Merge branch 'aws:master-ci-py312-new' into master-ci-py312-new
mollyheamazon Mar 17, 2025
ae7d6e1
change framework_version that supports py39 in integ tests
mollyheamazon Mar 17, 2025
3792c28
add py312 to ci
mollyheamazon Feb 27, 2025
8d88e28
remove py38 from unit testing
mollyheamazon Feb 28, 2025
5bd3d6e
Merge branch 'master-ci-py312-pr-test' into master-ci-py312-new
benieric Apr 4, 2025
cf3f5a3
Update estimator.py
benieric Apr 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ start_time=`date +%s`
tox -e sphinx,doc8 --parallel all
./ci-scripts/displaytime.sh 'sphinx,doc8' $start_time
start_time=`date +%s`
tox -e py38,py39,py310 --parallel all -- tests/unit
./ci-scripts/displaytime.sh 'py38,py39,py310 unit' $start_time
tox -e py39,py310,py311,py312 --parallel all -- tests/unit
./ci-scripts/displaytime.sh 'py39,py310,py311,py312 unit' $start_time
2 changes: 1 addition & 1 deletion .github/workflows/codebuild-ci-health.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["py38", "py39", "py310", "py311"]
python-version: ["py39", "py310", "py311","py312"]
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codebuild-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["py38","py39","py310","py311"]
python-version: ["py39","py310","py311","py312"]
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down
4 changes: 2 additions & 2 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
sphinx==5.1.1
sphinx-rtd-theme==0.5.0
docutils==0.15.2
packaging==20.9
jinja2==3.1.6
packaging>=23.0,<25
jinja2==3.1.4
schema==0.7.5
accelerate>=0.24.1,<=0.27.0
graphene<4.0
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "sagemaker"
dynamic = ["version", "optional-dependencies"]
description = "Open source library for training and deploying models on Amazon SageMaker."
readme = "README.rst"
requires-python = ">=3.8"
requires-python = ">=3.9"
authors = [
{ name = "Amazon Web Services" },
]
Expand All @@ -25,10 +25,10 @@ classifiers = [
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"attrs>=23.1.0,<24",
Expand All @@ -39,15 +39,15 @@ dependencies = [
"google-pasta",
"importlib-metadata>=1.4.0,<7.0",
"jsonschema",
"numpy>=1.9.0,<2.0",
"numpy>=1.26.0,<2.0",
"omegaconf>=2.2,<=2.3",
"packaging>=20.0",
"packaging>=23.0,<25",
"pandas",
"pathos",
"platformdirs",
"protobuf>=3.12,<6.0",
"psutil",
"PyYAML~=6.0",
"PyYAML>=6.0.1",
"requests",
"sagemaker-core>=1.0.17,<2.0.0",
"schema",
Expand Down
2 changes: 1 addition & 1 deletion requirements/extras/local_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
urllib3>=1.26.8,<3.0.0
docker>=5.0.2,<8.0.0
PyYAML>=5.4.1,<7
PyYAML>=6.0.1,<7
2 changes: 1 addition & 1 deletion requirements/extras/scipy_requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
scipy==1.10.1
scipy==1.11.3
12 changes: 6 additions & 6 deletions requirements/extras/test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tox==3.24.5
numpy>=1.24.0
numpy>=1.26.0,<2.0
build[virtualenv]==1.2.1
flake8==4.0.1
pytest==6.2.5
Expand All @@ -14,7 +14,7 @@ awslogs==0.14.0
black==24.3.0
stopit==1.1.2
# Update tox.ini to have correct version of airflow constraints file
apache-airflow==2.9.3
apache-airflow==2.10.4
apache-airflow-providers-amazon==7.2.1
attrs>=23.1.0,<24
fabric==2.6.0
Expand All @@ -26,14 +26,14 @@ pandas==1.4.4
scikit-learn==1.3.0
cloudpickle==2.2.1
jsonpickle<4.0.0
PyYAML==6.0
PyYAML>=6.0.1
# TODO find workaround
xgboost>=1.6.2,<=1.7.6
pillow>=10.0.1,<=11
opentelemetry-proto==1.27.0
protobuf==4.25.5
tensorboard>=2.9.0,<=2.15.2
transformers==4.48.0
tensorboard>=2.16.2,<=2.18.0
transformers==4.46.1
sentencepiece==0.1.99
# https://github.com/triton-inference-server/server/issues/6246
tritonclient[http]<2.37.0
Expand All @@ -42,7 +42,7 @@ onnx==1.17.0
nbformat>=5.9,<6
accelerate>=0.24.1,<=0.27.0
schema==0.7.5
tensorflow>=2.9.0,<=2.15.1
tensorflow>=2.16.2,<=2.18.0
mlflow>=2.12.2,<2.13
huggingface_hub==0.26.2
uvicorn>=0.30.1
Expand Down
10 changes: 5 additions & 5 deletions src/sagemaker/serve/utils/conda_in_process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ dependencies:
- boto3>=1.34.142,<2.0
- cloudpickle==2.2.1
- google-pasta
- numpy>=1.9.0,<2.0
- numpy>=1.26.0,<2.0
- protobuf>=3.12,<5.0
- smdebug_rulesconfig==1.0.1
- importlib-metadata>=1.4.0,<7.0
- packaging>=20.0
- packaging>=23.0,<25
- pandas
- pathos
- schema
- PyYAML~=6.0
- PyYAML>=6.0.1
- jsonschema
- platformdirs
- tblib>=1.7.0,<4
Expand All @@ -43,7 +43,7 @@ dependencies:
- colorama>=0.4.4
- contextlib2>=21.6.0
- decorator>=5.1.1
- dill>=0.3.6
- dill>=0.3.9
- docutils>=0.16
- entrypoints>=0.4
- filelock>=3.11.0
Expand Down Expand Up @@ -82,7 +82,7 @@ dependencies:
- python-dateutil>=2.8.2
- pytz>=2023.3
- pytz-deprecation-shim>=0.1.0.post0
- pyyaml>=5.4.1
- pyyaml>=6.0.1
- regex>=2023.3.23
- requests>=2.28.2
- rich>=13.3.4
Expand Down
4 changes: 2 additions & 2 deletions src/sagemaker/serve/utils/in_process_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cloudpickle==2.2.1
colorama>=0.4.4
contextlib2>=21.6.0
decorator>=5.1.1
dill>=0.3.6
dill>=0.3.9
docutils>=0.16
entrypoints>=0.4
filelock>=3.11.0
Expand Down Expand Up @@ -50,7 +50,7 @@ pyrsistent>=0.19.3
python-dateutil>=2.8.2
pytz>=2023.3
pytz-deprecation-shim>=0.1.0.post0
pyyaml>=5.4.1
pyyaml>=6.0.1
regex>=2023.3.23
requests>=2.28.2
rich>=13.3.4
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
scipy>=1.8.1
scipy>=1.11.3
2 changes: 1 addition & 1 deletion tests/data/remote_function/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
scipy==1.10.1
scipy==1.11.3
2 changes: 1 addition & 1 deletion tests/data/serve_resources/mlflow/pytorch/conda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies:
- cffi==1.16.0
- cloudpickle==2.2.1
- defusedxml==0.7.1
- dill==0.3.8
- dill==0.3.9
- gmpy2==2.1.2
- numpy==1.26.4
- opt-einsum==3.3.0
Expand Down
6 changes: 3 additions & 3 deletions tests/data/serve_resources/mlflow/pytorch/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ astunparse==1.6.3
cffi==1.16.0
cloudpickle==2.2.1
defusedxml==0.7.1
dill==0.3.8
dill==0.3.9
gmpy2==2.1.2
numpy==1.24.4
numpy==1.26.4
opt-einsum==3.3.0
packaging==21.3
packaging>=23.0,<25
pandas==2.2.1
pyyaml==6.0.1
requests==2.32.2
Expand Down
4 changes: 2 additions & 2 deletions tests/data/serve_resources/mlflow/xgboost/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
mlflow==2.13.2
lz4==4.3.2
numpy==1.24.4
numpy==1.26.4
pandas==2.0.3
psutil==5.9.8
scikit-learn==1.3.2
scipy==1.10.1
scipy==1.11.3
xgboost==1.7.1
2 changes: 1 addition & 1 deletion tests/data/workflow/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
scipy==1.10.1
scipy==1.11.3
26 changes: 18 additions & 8 deletions tests/integ/sagemaker/experiments/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from sagemaker.experiments.trial_component import _TrialComponent
from sagemaker.sklearn import SKLearn
from sagemaker.utils import retry_with_backoff, unique_name_from_base
from tests.integ.sagemaker.experiments.helpers import name, cleanup_exp_resources
from tests.integ.sagemaker.experiments.helpers import name, cleanup_exp_resources, clear_run_context
from sagemaker.experiments.run import (
RUN_NAME_BASE,
DELIMITER,
Expand All @@ -55,7 +55,7 @@ def artifact_file_path(tempdir):
metric_name = "Test-Local-Init-Log-Metric"


def test_local_run_with_load(sagemaker_session, artifact_file_path):
def test_local_run_with_load(sagemaker_session, artifact_file_path, clear_run_context):
exp_name = f"My-Local-Exp-{name()}"
with cleanup_exp_resources(exp_names=[exp_name], sagemaker_session=sagemaker_session):
# Run name is not provided, will create a new TC
Expand Down Expand Up @@ -86,7 +86,9 @@ def verify_load_run():
retry_with_backoff(verify_load_run, 4)


def test_two_local_run_init_with_same_run_name_and_different_exp_names(sagemaker_session):
def test_two_local_run_init_with_same_run_name_and_different_exp_names(
sagemaker_session, clear_run_context
):
exp_name1 = f"my-two-local-exp1-{name()}"
exp_name2 = f"my-two-local-exp2-{name()}"
run_name = "test-run"
Expand Down Expand Up @@ -124,7 +126,9 @@ def test_two_local_run_init_with_same_run_name_and_different_exp_names(sagemaker
("my-test4", "test-run", "run-display-name-test"), # with supplied display name
],
)
def test_run_name_vs_trial_component_name_edge_cases(sagemaker_session, input_names):
def test_run_name_vs_trial_component_name_edge_cases(
sagemaker_session, input_names, clear_run_context
):
exp_name, run_name, run_display_name = input_names
with cleanup_exp_resources(exp_names=[exp_name], sagemaker_session=sagemaker_session):
with Run(
Expand Down Expand Up @@ -177,6 +181,7 @@ def test_run_from_local_and_train_job_and_all_exp_cfg_match(
execution_role,
sagemaker_client_config,
sagemaker_metrics_config,
clear_run_context,
):
# Notes:
# 1. The 1st Run created locally and its exp config was auto passed to the job
Expand Down Expand Up @@ -277,6 +282,7 @@ def test_run_from_local_and_train_job_and_exp_cfg_not_match(
execution_role,
sagemaker_client_config,
sagemaker_metrics_config,
clear_run_context,
):
# Notes:
# 1. The 1st Run created locally and its exp config was auto passed to the job
Expand Down Expand Up @@ -363,6 +369,7 @@ def test_run_from_train_job_only(
execution_role,
sagemaker_client_config,
sagemaker_metrics_config,
clear_run_context,
):
# Notes:
# 1. No Run created locally or specified in experiment config
Expand Down Expand Up @@ -413,6 +420,7 @@ def test_run_from_processing_job_and_override_default_exp_config(
execution_role,
sagemaker_client_config,
sagemaker_metrics_config,
clear_run_context,
):
# Notes:
# 1. The 1st Run (run) created locally
Expand Down Expand Up @@ -492,6 +500,7 @@ def test_run_from_transform_job(
execution_role,
sagemaker_client_config,
sagemaker_metrics_config,
clear_run_context,
):
# Notes:
# 1. The 1st Run (run) created locally
Expand Down Expand Up @@ -573,6 +582,7 @@ def test_load_run_auto_pass_in_exp_config_to_job(
execution_role,
sagemaker_client_config,
sagemaker_metrics_config,
clear_run_context,
):
# Notes:
# 1. In local side, load the Run created previously and invoke a job under the load context
Expand Down Expand Up @@ -621,7 +631,7 @@ def test_load_run_auto_pass_in_exp_config_to_job(
)


def test_list(run_obj, sagemaker_session):
def test_list(run_obj, sagemaker_session, clear_run_context):
tc1 = _TrialComponent.create(
trial_component_name=f"non-run-tc1-{name()}",
sagemaker_session=sagemaker_session,
Expand All @@ -643,7 +653,7 @@ def test_list(run_obj, sagemaker_session):
assert run_tcs[0].experiment_config == run_obj.experiment_config


def test_list_twice(run_obj, sagemaker_session):
def test_list_twice(run_obj, sagemaker_session, clear_run_context):
tc1 = _TrialComponent.create(
trial_component_name=f"non-run-tc1-{name()}",
sagemaker_session=sagemaker_session,
Expand Down Expand Up @@ -720,8 +730,8 @@ def _generate_processor(
)
return FrameworkProcessor(
estimator_cls=PyTorch,
framework_version="1.10",
py_version="py38",
framework_version="1.13.1",
py_version="py39",
instance_count=1,
instance_type="ml.m5.xlarge",
role=execution_role,
Expand Down
8 changes: 4 additions & 4 deletions tests/integ/sagemaker/workflow/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1122,8 +1122,8 @@ def test_model_registration_with_tuning_model(
entry_point=entry_point,
source_dir=base_dir,
role=role,
framework_version="1.10",
py_version="py38",
framework_version="1.13.1",
py_version="py39",
instance_count=instance_count,
instance_type=instance_type,
sagemaker_session=pipeline_session,
Expand Down Expand Up @@ -1159,8 +1159,8 @@ def test_model_registration_with_tuning_model(
),
entry_point=entry_point,
source_dir=base_dir,
framework_version="1.10",
py_version="py38",
framework_version="1.13.1",
py_version="py39",
sagemaker_session=pipeline_session,
)
step_model_regis_args = model.register(
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/sagemaker/huggingface/test_llm_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def test_huggingface_model_metadata_unauthorized_exception(self, mock_urllib):
"Trying to access a gated/private HuggingFace model without valid credentials. "
"Please provide a HUGGING_FACE_HUB_TOKEN in env_vars"
)
self.assertEquals(expected_error_msg, str(context.exception))
self.assertEqual(expected_error_msg, str(context.exception))

@patch("sagemaker.huggingface.llm_utils.urllib")
def test_huggingface_model_metadata_general_exception(self, mock_urllib):
Expand All @@ -76,7 +76,7 @@ def test_huggingface_model_metadata_general_exception(self, mock_urllib):
expected_error_msg = (
f"Did not find model metadata for the following HuggingFace Model ID {MOCK_HF_ID}"
)
self.assertEquals(expected_error_msg, str(context.exception))
self.assertEqual(expected_error_msg, str(context.exception))

@patch("huggingface_hub.snapshot_download")
def test_download_huggingface_model_metadata(self, mock_snapshot_download):
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/sagemaker/jumpstart/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -14360,7 +14360,7 @@
"jmespath==1.0.1",
"jsonschema==4.17.3",
"multiprocess==0.70.14",
"numpy==1.24.3",
"numpy==1.26.4",
"oscrypto==1.3.0",
"packaging==23.1",
"pandas==2.0.2",
Expand Down
Loading
Loading