Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
98719d7
Add numpy 2.0 support
Jun 10, 2025
da684b8
Merge branch 'aws:master' into numpy-upgrade
rsareddy0329 Jun 11, 2025
4cd6946
Add numpy 2.0 support
Jun 11, 2025
2a33762
Add numpy 2.0 support
Jun 12, 2025
c80ad4b
Merge branch 'aws:master' into numpy-upgrade
rsareddy0329 Jun 12, 2025
572c1aa
Add numpy 2.0 support
Jun 12, 2025
23258ba
Merge branch 'aws:master' into numpy-upgrade
rsareddy0329 Jun 12, 2025
fac5a6a
Add numpy 2.0 support
Jun 12, 2025
5120db0
Merge branch 'master' into numpy-upgrade
sage-maker Jun 18, 2025
8de6099
Merge branch 'master' into numpy-upgrade
nargokul Aug 1, 2025
88406c4
Merge branch 'aws:master' into numpy-upgrade
rsareddy0329 Sep 10, 2025
410e6a2
Fix incompatible_dependecies test
Sep 11, 2025
ebf56b9
Fix incompatible_dependecies test
Sep 11, 2025
a19f57e
Fix incompatible_dependecies test
Sep 12, 2025
82c687f
Fix incompatible_dependecies test
Sep 12, 2025
5d26314
Fix incompatible_dependecies test
Sep 12, 2025
2271ba4
Merge branch 'aws:master' into numpy-upgrade
rsareddy0329 Sep 23, 2025
9f79273
Merge branch 'aws:master' into numpy-upgrade
rsareddy0329 Sep 28, 2025
afbf206
update tensorflow artifacts
Sep 28, 2025
cf1db86
update tensorflow artifacts
Sep 28, 2025
f85147c
update tensorflow artifacts
Sep 28, 2025
5b3766b
Merge branch 'aws:master' into numpy-upgrade
rsareddy0329 Oct 5, 2025
e4b80c1
testfile codestyle fixes
Oct 7, 2025
9884e7b
testfile codestyle fixes
Oct 7, 2025
ae1a67c
update SKLearn image URI config
Oct 7, 2025
a41acbe
Merge branch 'aws:master' into numpy-upgrade
rsareddy0329 Oct 7, 2025
7acb57e
update SKLearn image URI config
Oct 7, 2025
42387eb
docstyle fixes
Oct 7, 2025
3f837f0
docstyle fixes
Oct 7, 2025
fc64ae6
numpy fixes
Oct 8, 2025
2e88cd0
numpy fixes
Oct 8, 2025
7900cb1
numpy fixes
Oct 8, 2025
0102bca
numpy fixes
Oct 8, 2025
330fdb1
numpy fixes
Oct 8, 2025
a04689f
numpy fixes
Oct 8, 2025
5dedf88
numpy fixes
Oct 8, 2025
293448a
numpy fixes
Oct 8, 2025
07b62ce
numpy fix for slow test
Oct 9, 2025
d8546bc
numpy fix for slow test
Oct 9, 2025
8d71074
Merge branch 'aws:master' into numpy-upgrade
rsareddy0329 Oct 9, 2025
2b2c190
numpy fix for slow test
Oct 10, 2025
7daa34f
numpy fix for slow test
Oct 10, 2025
aaaa040
Merge branch 'aws:master' into numpy-upgrade
rsareddy0329 Oct 11, 2025
a4d0e29
Revert 'Add numpy 2.0 support'
Oct 11, 2025
837bdcf
Revert 'Add numpy 2.0 support'
Oct 11, 2025
ded2024
Revert 'Add numpy 2.0 support'
Oct 11, 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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencies = [
"google-pasta",
"importlib-metadata>=1.4.0,<7.0",
"jsonschema",
"numpy>=1.26.4,<2.3.3",
"numpy==1.26.4",
"omegaconf>=2.2,<3",
"packaging>=23.0,<25",
"pandas",
Expand Down
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.13.0
scipy==1.11.3
8 changes: 4 additions & 4 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>=2.0.0, <2.3.3
numpy==1.26.4
build[virtualenv]==1.2.1
flake8==7.1.2
pytest==6.2.5
Expand All @@ -23,8 +23,8 @@ requests==2.32.2
sagemaker-experiments==0.1.35
Jinja2==3.1.6
pyvis==0.2.1
pandas>=2.3.0
scikit-learn==1.6.1
pandas==1.4.4
scikit-learn==1.3.0
cloudpickle==2.2.1
jsonpickle<4.0.0
PyYAML>=6.0.1
Expand All @@ -44,7 +44,7 @@ onnx==1.17.0
nbformat>=5.9,<6
accelerate>=0.24.1,<=0.27.0
schema==0.7.5
tensorflow>=2.16.2,<=2.19.0
tensorflow>=2.16.2,<=2.18.0
mlflow>=2.14.2,<3
huggingface_hub==0.26.2
uvicorn>=0.30.1
Expand Down
48 changes: 0 additions & 48 deletions src/sagemaker/image_uri_config/sklearn.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,54 +388,6 @@
"us-west-2": "246618743249"
},
"repository": "sagemaker-scikit-learn"
},
"1.4-2": {
"processors": [
"cpu"
],
"py_versions": [
"py3"
],
"registries": {
"af-south-1": "510948584623",
"ap-east-1": "651117190479",
"ap-northeast-1": "354813040037",
"ap-northeast-2": "366743142698",
"ap-northeast-3": "867004704886",
"ap-south-1": "720646828776",
"ap-south-2": "628508329040",
"ap-southeast-1": "121021644041",
"ap-southeast-2": "783357654285",
"ap-southeast-3": "951798379941",
"ap-southeast-4": "106583098589",
"ca-central-1": "341280168497",
"ca-west-1": "190319476487",
"cn-north-1": "450853457545",
"cn-northwest-1": "451049120500",
"eu-central-1": "492215442770",
"eu-central-2": "680994064768",
"eu-north-1": "662702820516",
"eu-south-1": "978288397137",
"eu-south-2": "104374241257",
"eu-west-1": "141502667606",
"eu-west-2": "764974769150",
"eu-west-3": "659782779980",
"il-central-1": "898809789911",
"me-central-1": "272398656194",
"me-south-1": "801668240914",
"sa-east-1": "737474898029",
"us-east-1": "683313688378",
"us-east-2": "257758044811",
"us-gov-east-1": "237065988967",
"us-gov-west-1": "414596584902",
"us-iso-east-1": "833128469047",
"us-isob-east-1": "281123927165",
"us-isof-east-1": "108575199400",
"us-isof-south-1": "124985052026",
"us-west-1": "746614075791",
"us-west-2": "246618743249"
},
"repository": "sagemaker-scikit-learn"
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions src/sagemaker/serve/utils/conda_in_process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
- boto3>=1.34.142,<2.0
- cloudpickle==2.2.1
- google-pasta
- numpy>=2.0.0,<2.3.3
- numpy==1.26.4
- protobuf>=3.12,<5.0
- smdebug_rulesconfig==1.0.1
- importlib-metadata>=1.4.0,<7.0
Expand Down Expand Up @@ -64,7 +64,7 @@ dependencies:
- multiprocess>=0.70.14
- networkx>=3.1
- packaging>=23.1
- pandas>=2.3.0
- pandas>=1.5.3
- pathos>=0.3.0
- pillow>=9.5.0
- platformdirs>=3.2.0
Expand Down
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.13.0
scipy==1.11.3
2 changes: 1 addition & 1 deletion tests/data/serve_resources/mlflow/pytorch/MLmodel
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ flavors:
code: null
model_data: data
pytorch_version: 2.0.1+cu117
mlflow_version: 2.10.2
mlflow_version: 2.11.1
model_size_bytes: 4971001
model_uuid: 2d85043bbf504b1e9950e124c46a1719
run_id: 98b8d2e2c0e74ab59f4c26f7cb3de233
Expand Down
10 changes: 5 additions & 5 deletions tests/data/serve_resources/mlflow/pytorch/conda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ channels:
- conda-forge
dependencies:
- python=3.10.13
- pip<=24.3
- pip<=23.3.1
- pip:
- mlflow>=2.16.1
- mlflow==2.10.2
- astunparse==1.6.3
- cffi==1.16.0
- cloudpickle==2.2.1
- defusedxml==0.7.1
- dill==0.3.9
- gmpy2==2.1.2
- numpy>=2.0.0,<2.3.3
- numpy==1.26.4
- opt-einsum==3.3.0
- packaging==24.0
- pandas>=2.3.0
- pandas==2.2.1
- pyyaml==6.0.1
- requests==2.31.0
- torch>=2.6.0
- torchvision>=0.17.0
- tqdm==4.66.2
- scikit-learn==1.6.1
- scikit-learn==1.3.2
name: mlflow-env
4 changes: 2 additions & 2 deletions tests/data/serve_resources/mlflow/pytorch/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ cloudpickle==2.2.1
defusedxml==0.7.1
dill==0.3.9
gmpy2==2.1.2
numpy>=2.0.0,<2.3.3
numpy==1.26.4
opt-einsum==3.3.0
packaging>=23.0,<25
pandas>=2.3.0
pandas==2.2.1
pyyaml==6.0.1
requests==2.32.4
torch>=2.6.0
Expand Down
10 changes: 5 additions & 5 deletions tests/data/serve_resources/mlflow/tensorflow/conda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ channels:
- conda-forge
dependencies:
- python=3.10.13
- pip<=24.3
- pip<=23.3.1
- pip:
- mlflow>=2.16.1
- cloudpickle>=2.2.1
- numpy>=1.26.4,<2.3.3
- tensorflow==2.18.0
- mlflow==2.11.1
- cloudpickle==2.2.1
- numpy==1.26.4
- tensorflow==2.16.1
name: mlflow-env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mlflow==2.20.3
cloudpickle>=2.2.1
numpy>=1.26.4,<2.3.3
tensorflow==2.18.0
cloudpickle==2.2.1
numpy==1.26.4
tensorflow==2.16.1
13 changes: 0 additions & 13 deletions tests/data/serve_resources/mlflow/tensorflow_numpy2/MLmodel

This file was deleted.

11 changes: 0 additions & 11 deletions tests/data/serve_resources/mlflow/tensorflow_numpy2/conda.yaml

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 6 additions & 6 deletions tests/data/serve_resources/mlflow/xgboost/conda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ channels:
- conda-forge
dependencies:
- python=3.10.13
- pip<=24.3
- pip<=23.3.1
- pip:
- mlflow>=2.16.1
- mlflow==2.11.1
- lz4==4.3.2
- numpy>=1.26.4,<2.3.3
- pandas>=2.3.0
- numpy==1.26.4
- pandas==2.2.1
- psutil==5.9.8
- scikit-learn==1.6.1
- scipy==1.13.0
- scikit-learn==1.3.2
- scipy==1.11.3
- xgboost==1.7.1
name: mlflow-env
8 changes: 4 additions & 4 deletions tests/data/serve_resources/mlflow/xgboost/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
mlflow==3.1.0
lz4==4.3.2
numpy>=1.26.4,<2.3.3
pandas>=2.3.0
numpy==1.26.4
pandas==2.0.3
psutil==5.9.8
scikit-learn==1.6.1
scipy==1.13.0
scikit-learn==1.5.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.13.0
scipy==1.11.3
17 changes: 1 addition & 16 deletions tests/integ/sagemaker/experiments/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,18 +171,13 @@ def verify_is_run():
_RUN_LOAD = "load"


@pytest.mark.skip(
reason="[Numpy 2.0] Skipping this test temporarily as the SKLearn image\
deployment is in progress to all the regions",
)
def test_run_from_local_and_train_job_and_all_exp_cfg_match(
sagemaker_session,
dev_sdk_tar,
execution_role,
sagemaker_client_config,
sagemaker_metrics_config,
):
# TODO: Enable this test after the image deployment is completed.
# Notes:
# 1. The 1st Run created locally and its exp config was auto passed to the job
# 2. In training job, the same exp and run names are given in the Run constructor
Expand Down Expand Up @@ -276,18 +271,13 @@ def test_run_from_local_and_train_job_and_all_exp_cfg_match(
)


@pytest.mark.skip(
reason="[Numpy 2.0] Skipping this test temporarily as the SKLearn image\
deployment is in progress to all the regions",
)
def test_run_from_local_and_train_job_and_exp_cfg_not_match(
sagemaker_session,
dev_sdk_tar,
execution_role,
sagemaker_client_config,
sagemaker_metrics_config,
):
# TODO: Enable this test after the image deployment is completed.
# Notes:
# 1. The 1st Run created locally and its exp config was auto passed to the job
# 2. In training job, different exp and run names (i.e. 2nd Run) are given
Expand Down Expand Up @@ -367,18 +357,13 @@ def test_run_from_local_and_train_job_and_exp_cfg_not_match(
)


@pytest.mark.skip(
reason="[Numpy 2.0] Skipping this test temporarily as the SKLearn image\
deployment is in progress to all the regions",
)
def test_run_from_train_job_only(
sagemaker_session,
dev_sdk_tar,
execution_role,
sagemaker_client_config,
sagemaker_metrics_config,
):
# TODO: Enable this test after the image deployment is completed.
# Notes:
# 1. No Run created locally or specified in experiment config
# 2. In training job, Run is initialized
Expand Down Expand Up @@ -708,7 +693,7 @@ def _generate_estimator(
sagemaker_client_config=sagemaker_client_config,
)
return SKLearn(
framework_version="1.4-2",
framework_version="1.2-1",
entry_point=_ENTRY_POINT_PATH,
dependencies=[sdk_tar],
role=execution_role,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1108,15 +1108,15 @@ def get_expected_dataframe():
expected_dataframe = pd.read_csv(os.path.join(_FEATURE_PROCESSOR_DIR, "car-data.csv"))
expected_dataframe["Model"].replace("^\d\d\d\d\s", "", regex=True, inplace=True) # noqa: W605
expected_dataframe["Mileage"].replace("(,)|(mi\.)", "", regex=True, inplace=True) # noqa: W605
expected_dataframe["Mileage"].replace("Not available", np.nan, inplace=True)
expected_dataframe["Mileage"].replace("Not available", np.NaN, inplace=True)
expected_dataframe["Price"].replace("\$", "", regex=True, inplace=True) # noqa: W605
expected_dataframe["Price"].replace(",", "", regex=True, inplace=True)
expected_dataframe["MSRP"].replace(
"(^MSRP\s\\$)|(,)", "", regex=True, inplace=True # noqa: W605
)
expected_dataframe["MSRP"].replace("Not specified", np.nan, inplace=True)
expected_dataframe["MSRP"].replace("Not specified", np.NaN, inplace=True)
expected_dataframe["MSRP"].replace(
"\\$\d+[a-zA-Z\s]+", np.nan, regex=True, inplace=True # noqa: W605
"\\$\d+[a-zA-Z\s]+", np.NaN, regex=True, inplace=True # noqa: W605
)
expected_dataframe["Mileage"] = expected_dataframe["Mileage"].astype(float)
expected_dataframe["Price"] = expected_dataframe["Price"].astype(float)
Expand Down
6 changes: 0 additions & 6 deletions tests/integ/sagemaker/remote_function/test_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import logging
import random
import string
import numpy as np
import pandas as pd
import subprocess
import shlex
Expand Down Expand Up @@ -316,10 +315,6 @@ def divide(x, y):
divide(10, 2)


@pytest.mark.skipif(
np.__version__ >= "2.0",
reason="Test only valid for numpy < 2.0 due to serialization compatibility changes",
)
def test_with_incompatible_dependencies(
sagemaker_session, dummy_container_without_error, cpu_instance_type
):
Expand All @@ -329,7 +324,6 @@ def test_with_incompatible_dependencies(
or versions in the future may require changes to 'old_deps_requirements.txt'
to fulfill testing scenario.

NOTE: Skipped for numpy >= 2.0 as serialization compatibility improved.
"""

dependencies_path = os.path.join(DATA_DIR, "remote_function", "old_deps_requirements.txt")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ def tensorflow_schema_builder(custom_request_translator, custom_response_transla

@pytest.mark.skipif(
PYTHON_VERSION_IS_NOT_310,
np.__version__ >= "2.0.0",
reason="The goal of these test are to test the serving components of our feature and \
the input model artifacts used in this specific test are generated with py310 and numpy<2.",
reason="The goal of these test are to test the serving components of our feature",
)
def test_happy_tensorflow_sagemaker_endpoint_with_tensorflow_serving(
sagemaker_session,
Expand Down
Loading