From 98719d7eebce75d1b2c271fe3eca004cd518b518 Mon Sep 17 00:00:00 2001 From: Roja Reddy Sareddy Date: Mon, 9 Jun 2025 22:21:22 -0700 Subject: [PATCH 1/5] Add numpy 2.0 support --- pyproject.toml | 2 +- requirements/extras/scipy_requirements.txt | 2 +- requirements/extras/test_requirements.txt | 6 +++--- src/sagemaker/serve/utils/conda_in_process.yml | 4 ++-- tests/data/remote_function/requirements.txt | 2 +- .../serve_resources/mlflow/pytorch/conda.yaml | 10 +++++----- .../mlflow/pytorch/requirements.txt | 4 ++-- .../mlflow/tensorflow/conda.yaml | 8 ++++---- .../mlflow/tensorflow/requirements.txt | 4 ++-- .../serve_resources/mlflow/xgboost/conda.yaml | 12 ++++++------ .../mlflow/xgboost/requirements.txt | 10 +++++----- tests/data/workflow/requirements.txt | 2 +- tests/unit/sagemaker/jumpstart/constants.py | 18 +++++++++--------- .../serve/detector/test_dependency_manager.py | 4 ++-- 14 files changed, 44 insertions(+), 44 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 918e874b57..002202bad8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "google-pasta", "importlib-metadata>=1.4.0,<7.0", "jsonschema", - "numpy==1.26.4", + "numpy>=2.0.0,<2.3.0", "omegaconf>=2.2,<3", "packaging>=23.0,<25", "pandas", diff --git a/requirements/extras/scipy_requirements.txt b/requirements/extras/scipy_requirements.txt index 44ce1d9331..f89caf8c2b 100644 --- a/requirements/extras/scipy_requirements.txt +++ b/requirements/extras/scipy_requirements.txt @@ -1 +1 @@ -scipy==1.11.3 +scipy==1.13.0 diff --git a/requirements/extras/test_requirements.txt b/requirements/extras/test_requirements.txt index 04d6c0522a..57d67d1751 100644 --- a/requirements/extras/test_requirements.txt +++ b/requirements/extras/test_requirements.txt @@ -1,5 +1,5 @@ tox==3.24.5 -numpy==1.26.4 +numpy>=2.0.0, <2.3.0 build[virtualenv]==1.2.1 flake8==7.1.2 pytest==6.2.5 @@ -23,8 +23,8 @@ requests==2.32.2 sagemaker-experiments==0.1.35 Jinja2==3.1.6 pyvis==0.2.1 -pandas==1.4.4 -scikit-learn==1.3.0 +pandas==2.2.3 +scikit-learn==1.6.1 cloudpickle==2.2.1 jsonpickle<4.0.0 PyYAML>=6.0.1 diff --git a/src/sagemaker/serve/utils/conda_in_process.yml b/src/sagemaker/serve/utils/conda_in_process.yml index d51754ec5a..a7cb79ac13 100644 --- a/src/sagemaker/serve/utils/conda_in_process.yml +++ b/src/sagemaker/serve/utils/conda_in_process.yml @@ -12,7 +12,7 @@ dependencies: - boto3>=1.34.142,<2.0 - cloudpickle==2.2.1 - google-pasta - - numpy==1.26.4 + - numpy>=2.0.0,<2.3.0 - protobuf>=3.12,<5.0 - smdebug_rulesconfig==1.0.1 - importlib-metadata>=1.4.0,<7.0 @@ -64,7 +64,7 @@ dependencies: - multiprocess>=0.70.14 - networkx>=3.1 - packaging>=23.1 - - pandas>=1.5.3 + - pandas==2.2.3 - pathos>=0.3.0 - pillow>=9.5.0 - platformdirs>=3.2.0 diff --git a/tests/data/remote_function/requirements.txt b/tests/data/remote_function/requirements.txt index 44ce1d9331..f89caf8c2b 100644 --- a/tests/data/remote_function/requirements.txt +++ b/tests/data/remote_function/requirements.txt @@ -1 +1 @@ -scipy==1.11.3 +scipy==1.13.0 diff --git a/tests/data/serve_resources/mlflow/pytorch/conda.yaml b/tests/data/serve_resources/mlflow/pytorch/conda.yaml index b740d25b70..99c215b58a 100644 --- a/tests/data/serve_resources/mlflow/pytorch/conda.yaml +++ b/tests/data/serve_resources/mlflow/pytorch/conda.yaml @@ -2,23 +2,23 @@ channels: - conda-forge dependencies: - python=3.10.13 -- pip<=23.3.1 +- pip<=24.3 - pip: - - mlflow==2.10.2 + - mlflow>=2.16.1 - 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==1.26.4 + - numpy>=2.0.0,<2.3.0 - opt-einsum==3.3.0 - packaging==24.0 - - pandas==2.2.1 + - pandas==2.2.3 - pyyaml==6.0.1 - requests==2.31.0 - torch>=2.6.0 - torchvision>=0.17.0 - tqdm==4.66.2 - - scikit-learn==1.3.2 + - scikit-learn==1.6.1 name: mlflow-env diff --git a/tests/data/serve_resources/mlflow/pytorch/requirements.txt b/tests/data/serve_resources/mlflow/pytorch/requirements.txt index a3eb04ed4f..d41500d826 100644 --- a/tests/data/serve_resources/mlflow/pytorch/requirements.txt +++ b/tests/data/serve_resources/mlflow/pytorch/requirements.txt @@ -5,10 +5,10 @@ cloudpickle==2.2.1 defusedxml==0.7.1 dill==0.3.9 gmpy2==2.1.2 -numpy==1.26.4 +numpy>=2.0.0,<2.3.0 opt-einsum==3.3.0 packaging>=23.0,<25 -pandas==2.2.1 +pandas==2.2.3 pyyaml==6.0.1 requests==2.32.2 torch>=2.6.0 diff --git a/tests/data/serve_resources/mlflow/tensorflow/conda.yaml b/tests/data/serve_resources/mlflow/tensorflow/conda.yaml index 90d8c300a0..bed6a78250 100644 --- a/tests/data/serve_resources/mlflow/tensorflow/conda.yaml +++ b/tests/data/serve_resources/mlflow/tensorflow/conda.yaml @@ -2,10 +2,10 @@ channels: - conda-forge dependencies: - python=3.10.13 -- pip<=23.3.1 +- pip<=24.3 - pip: - - mlflow==2.11.1 + - mlflow>=2.16.1 - cloudpickle==2.2.1 - - numpy==1.26.4 - - tensorflow==2.16.1 + - numpy>=1.26.4 + - tensorflow==2.18.0 name: mlflow-env diff --git a/tests/data/serve_resources/mlflow/tensorflow/requirements.txt b/tests/data/serve_resources/mlflow/tensorflow/requirements.txt index 9b64992ac8..bc2b89978a 100644 --- a/tests/data/serve_resources/mlflow/tensorflow/requirements.txt +++ b/tests/data/serve_resources/mlflow/tensorflow/requirements.txt @@ -1,4 +1,4 @@ mlflow==2.20.3 cloudpickle==2.2.1 -numpy==1.26.4 -tensorflow==2.16.1 +numpy>=1.26.4 +tensorflow==2.18.0 diff --git a/tests/data/serve_resources/mlflow/xgboost/conda.yaml b/tests/data/serve_resources/mlflow/xgboost/conda.yaml index 44ca3c4c2e..42a521ca87 100644 --- a/tests/data/serve_resources/mlflow/xgboost/conda.yaml +++ b/tests/data/serve_resources/mlflow/xgboost/conda.yaml @@ -2,14 +2,14 @@ channels: - conda-forge dependencies: - python=3.10.13 -- pip<=23.3.1 +- pip<=24.3 - pip: - - mlflow==2.11.1 + - mlflow>=2.16.1 - lz4==4.3.2 - - numpy==1.26.4 - - pandas==2.2.1 + - numpy>=2.0.0 + - pandas==2.2.3 - psutil==5.9.8 - - scikit-learn==1.3.2 - - scipy==1.11.3 + - scikit-learn==1.6.1 + - scipy==1.13.0 - xgboost==1.7.1 name: mlflow-env diff --git a/tests/data/serve_resources/mlflow/xgboost/requirements.txt b/tests/data/serve_resources/mlflow/xgboost/requirements.txt index 30fc49cc97..ed9154e18f 100644 --- a/tests/data/serve_resources/mlflow/xgboost/requirements.txt +++ b/tests/data/serve_resources/mlflow/xgboost/requirements.txt @@ -1,8 +1,8 @@ -mlflow==2.13.2 +mlflow>=2.16.1 lz4==4.3.2 -numpy==1.26.4 -pandas==2.0.3 +numpy>=2.0.0 +pandas==2.2.3 psutil==5.9.8 -scikit-learn==1.5.1 -scipy==1.11.3 +scikit-learn==1.6.1 +scipy==1.13.0 xgboost==1.7.1 diff --git a/tests/data/workflow/requirements.txt b/tests/data/workflow/requirements.txt index 44ce1d9331..a9ced4b12d 100644 --- a/tests/data/workflow/requirements.txt +++ b/tests/data/workflow/requirements.txt @@ -1 +1 @@ -scipy==1.11.3 +scipy==1.13.0 \ No newline at end of file diff --git a/tests/unit/sagemaker/jumpstart/constants.py b/tests/unit/sagemaker/jumpstart/constants.py index ae02c597da..c55fe17e1f 100644 --- a/tests/unit/sagemaker/jumpstart/constants.py +++ b/tests/unit/sagemaker/jumpstart/constants.py @@ -5361,7 +5361,7 @@ "safetensors==0.3.1", "sagemaker_jumpstart_huggingface_script_utilities==1.1.3", "sagemaker_jumpstart_script_utilities==1.1.9", - "scipy==1.11.1", + "scipy==1.13.0", "termcolor==2.3.0", "texttable==1.6.7", "tokenize-rt==5.1.0", @@ -7870,7 +7870,7 @@ "safetensors==0.3.1", "sagemaker_jumpstart_huggingface_script_utilities==1.1.3", "sagemaker_jumpstart_script_utilities==1.1.9", - "scipy==1.11.1", + "scipy==1.13.0", "termcolor==2.3.0", "texttable==1.6.7", "tokenize-rt==5.1.0", @@ -8346,7 +8346,7 @@ "safetensors==0.3.1", "sagemaker_jumpstart_huggingface_script_utilities==1.1.3", "sagemaker_jumpstart_script_utilities==1.1.9", - "scipy==1.11.1", + "scipy==1.13.0", "termcolor==2.3.0", "texttable==1.6.7", "tokenize-rt==5.1.0", @@ -12095,7 +12095,7 @@ "inference_vulnerabilities": [], "training_vulnerable": False, "training_dependencies": [ - "numpy==1.23.1", + "numpy>=2.0.0", "opencv_python==4.7.0.68", "sagemaker_jumpstart_prepack_script_utilities==1.0.0", ], @@ -14360,10 +14360,10 @@ "jmespath==1.0.1", "jsonschema==4.17.3", "multiprocess==0.70.14", - "numpy==1.26.4", + "numpy>=2.0.0", "oscrypto==1.3.0", "packaging==23.1", - "pandas==2.0.2", + "pandas==2.2.3", "pathos==0.3.0", "pkgutil-resolve-name==1.3.10", "platformdirs==3.8.0", @@ -14884,10 +14884,10 @@ "jmespath==1.0.1", "jsonschema==4.17.3", "multiprocess==0.70.14", - "numpy==1.24.3", + "numpy>=2.0.0", "oscrypto==1.3.0", "packaging==23.1", - "pandas==2.0.2", + "pandas==2.2.3", "pathos==0.3.0", "pkgutil-resolve-name==1.3.10", "platformdirs==3.8.0", @@ -17400,7 +17400,7 @@ "safetensors==0.3.1", "sagemaker_jumpstart_huggingface_script_utilities==1.1.4", "sagemaker_jumpstart_script_utilities==1.1.9", - "scipy==1.11.1", + "scipy==1.13.0", "termcolor==2.3.0", "texttable==1.6.7", "tokenize-rt==5.1.0", diff --git a/tests/unit/sagemaker/serve/detector/test_dependency_manager.py b/tests/unit/sagemaker/serve/detector/test_dependency_manager.py index 52e9822e57..bf418b44c2 100644 --- a/tests/unit/sagemaker/serve/detector/test_dependency_manager.py +++ b/tests/unit/sagemaker/serve/detector/test_dependency_manager.py @@ -21,7 +21,7 @@ DEPENDENCY_LIST = [ "requests==2.26.0", - "numpy==1.26.4", + "numpy>=2.0.0", "pandas<=1.3.3", "matplotlib<3.5.0", "scikit-learn>0.24.1", @@ -34,7 +34,7 @@ EXPECTED_DEPENDENCY_MAP = { "requests": "==2.26.0", - "numpy": "==1.26.4", + "numpy": ">=2.0.0", "pandas": "<=1.3.3", "matplotlib": "<3.5.0", "scikit-learn": ">0.24.1", From 4cd69461a685c22f91c7094545516c77cfe255c3 Mon Sep 17 00:00:00 2001 From: Roja Reddy Sareddy Date: Wed, 11 Jun 2025 14:50:37 -0700 Subject: [PATCH 2/5] Add numpy 2.0 support --- tests/data/remote_function/old_deps_requirements.txt | 3 ++- tests/unit/sagemaker/jumpstart/constants.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/data/remote_function/old_deps_requirements.txt b/tests/data/remote_function/old_deps_requirements.txt index d3bddebad1..20a3810607 100644 --- a/tests/data/remote_function/old_deps_requirements.txt +++ b/tests/data/remote_function/old_deps_requirements.txt @@ -1 +1,2 @@ -pandas==1.3.4 +numpy>=1.23.2 +pandas>=2.0.0 diff --git a/tests/unit/sagemaker/jumpstart/constants.py b/tests/unit/sagemaker/jumpstart/constants.py index c55fe17e1f..90d2e7717e 100644 --- a/tests/unit/sagemaker/jumpstart/constants.py +++ b/tests/unit/sagemaker/jumpstart/constants.py @@ -5361,7 +5361,7 @@ "safetensors==0.3.1", "sagemaker_jumpstart_huggingface_script_utilities==1.1.3", "sagemaker_jumpstart_script_utilities==1.1.9", - "scipy==1.13.0", + "scipy==1.13.0", "termcolor==2.3.0", "texttable==1.6.7", "tokenize-rt==5.1.0", From 2a3376205ca7fa52e8e5a489c3b9320729b45352 Mon Sep 17 00:00:00 2001 From: Roja Reddy Sareddy Date: Wed, 11 Jun 2025 22:53:23 -0700 Subject: [PATCH 3/5] Add numpy 2.0 support --- tests/data/remote_function/old_deps_requirements.txt | 3 +-- tests/data/serve_resources/mlflow/tensorflow/conda.yaml | 2 +- tests/data/serve_resources/mlflow/tensorflow/requirements.txt | 2 +- tests/data/workflow/requirements.txt | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/data/remote_function/old_deps_requirements.txt b/tests/data/remote_function/old_deps_requirements.txt index 20a3810607..d3bddebad1 100644 --- a/tests/data/remote_function/old_deps_requirements.txt +++ b/tests/data/remote_function/old_deps_requirements.txt @@ -1,2 +1 @@ -numpy>=1.23.2 -pandas>=2.0.0 +pandas==1.3.4 diff --git a/tests/data/serve_resources/mlflow/tensorflow/conda.yaml b/tests/data/serve_resources/mlflow/tensorflow/conda.yaml index bed6a78250..1207a858e5 100644 --- a/tests/data/serve_resources/mlflow/tensorflow/conda.yaml +++ b/tests/data/serve_resources/mlflow/tensorflow/conda.yaml @@ -5,7 +5,7 @@ dependencies: - pip<=24.3 - pip: - mlflow>=2.16.1 - - cloudpickle==2.2.1 + - cloudpickle>=2.2.1 - numpy>=1.26.4 - tensorflow==2.18.0 name: mlflow-env diff --git a/tests/data/serve_resources/mlflow/tensorflow/requirements.txt b/tests/data/serve_resources/mlflow/tensorflow/requirements.txt index bc2b89978a..7ce8c725f8 100644 --- a/tests/data/serve_resources/mlflow/tensorflow/requirements.txt +++ b/tests/data/serve_resources/mlflow/tensorflow/requirements.txt @@ -1,4 +1,4 @@ mlflow==2.20.3 -cloudpickle==2.2.1 +cloudpickle>=2.2.1 numpy>=1.26.4 tensorflow==2.18.0 diff --git a/tests/data/workflow/requirements.txt b/tests/data/workflow/requirements.txt index a9ced4b12d..f89caf8c2b 100644 --- a/tests/data/workflow/requirements.txt +++ b/tests/data/workflow/requirements.txt @@ -1 +1 @@ -scipy==1.13.0 \ No newline at end of file +scipy==1.13.0 From 572c1aab1c10b499dedbd4559a0355d4f24d4ddb Mon Sep 17 00:00:00 2001 From: Roja Reddy Sareddy Date: Thu, 12 Jun 2025 11:10:30 -0700 Subject: [PATCH 4/5] Add numpy 2.0 support --- requirements/extras/test_requirements.txt | 2 +- tests/data/serve_resources/mlflow/xgboost/conda.yaml | 4 ++-- tests/data/serve_resources/mlflow/xgboost/requirements.txt | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements/extras/test_requirements.txt b/requirements/extras/test_requirements.txt index 57d67d1751..b08b911413 100644 --- a/requirements/extras/test_requirements.txt +++ b/requirements/extras/test_requirements.txt @@ -29,7 +29,7 @@ cloudpickle==2.2.1 jsonpickle<4.0.0 PyYAML>=6.0.1 # TODO find workaround -xgboost>=1.6.2,<=1.7.6 +xgboost>=1.6.2,<=2.1.0 pillow>=10.0.1,<=11 opentelemetry-proto==1.27.0 protobuf==4.25.5 diff --git a/tests/data/serve_resources/mlflow/xgboost/conda.yaml b/tests/data/serve_resources/mlflow/xgboost/conda.yaml index 42a521ca87..e2a1fe78fc 100644 --- a/tests/data/serve_resources/mlflow/xgboost/conda.yaml +++ b/tests/data/serve_resources/mlflow/xgboost/conda.yaml @@ -6,10 +6,10 @@ dependencies: - pip: - mlflow>=2.16.1 - lz4==4.3.2 - - numpy>=2.0.0 + - numpy>=1.26.4 - pandas==2.2.3 - psutil==5.9.8 - scikit-learn==1.6.1 - scipy==1.13.0 - - xgboost==1.7.1 + - xgboost==2.1.0 name: mlflow-env diff --git a/tests/data/serve_resources/mlflow/xgboost/requirements.txt b/tests/data/serve_resources/mlflow/xgboost/requirements.txt index ed9154e18f..23693ca909 100644 --- a/tests/data/serve_resources/mlflow/xgboost/requirements.txt +++ b/tests/data/serve_resources/mlflow/xgboost/requirements.txt @@ -1,8 +1,8 @@ mlflow>=2.16.1 lz4==4.3.2 -numpy>=2.0.0 +numpy>=1.26.4 pandas==2.2.3 psutil==5.9.8 scikit-learn==1.6.1 scipy==1.13.0 -xgboost==1.7.1 +xgboost==2.1.0 From fac5a6a74de72945d828ad8bd535a6d243423a5f Mon Sep 17 00:00:00 2001 From: Roja Reddy Sareddy Date: Thu, 12 Jun 2025 14:19:32 -0700 Subject: [PATCH 5/5] Add numpy 2.0 support --- pyproject.toml | 2 +- requirements/extras/test_requirements.txt | 2 +- tests/data/serve_resources/mlflow/xgboost/conda.yaml | 2 +- tests/data/serve_resources/mlflow/xgboost/requirements.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 002202bad8..1067126248 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "google-pasta", "importlib-metadata>=1.4.0,<7.0", "jsonschema", - "numpy>=2.0.0,<2.3.0", + "numpy>=1.26.4,<2.3.0", "omegaconf>=2.2,<3", "packaging>=23.0,<25", "pandas", diff --git a/requirements/extras/test_requirements.txt b/requirements/extras/test_requirements.txt index b08b911413..57d67d1751 100644 --- a/requirements/extras/test_requirements.txt +++ b/requirements/extras/test_requirements.txt @@ -29,7 +29,7 @@ cloudpickle==2.2.1 jsonpickle<4.0.0 PyYAML>=6.0.1 # TODO find workaround -xgboost>=1.6.2,<=2.1.0 +xgboost>=1.6.2,<=1.7.6 pillow>=10.0.1,<=11 opentelemetry-proto==1.27.0 protobuf==4.25.5 diff --git a/tests/data/serve_resources/mlflow/xgboost/conda.yaml b/tests/data/serve_resources/mlflow/xgboost/conda.yaml index e2a1fe78fc..5fc090f1c6 100644 --- a/tests/data/serve_resources/mlflow/xgboost/conda.yaml +++ b/tests/data/serve_resources/mlflow/xgboost/conda.yaml @@ -11,5 +11,5 @@ dependencies: - psutil==5.9.8 - scikit-learn==1.6.1 - scipy==1.13.0 - - xgboost==2.1.0 + - xgboost==1.7.1 name: mlflow-env diff --git a/tests/data/serve_resources/mlflow/xgboost/requirements.txt b/tests/data/serve_resources/mlflow/xgboost/requirements.txt index 23693ca909..74f21cf543 100644 --- a/tests/data/serve_resources/mlflow/xgboost/requirements.txt +++ b/tests/data/serve_resources/mlflow/xgboost/requirements.txt @@ -5,4 +5,4 @@ pandas==2.2.3 psutil==5.9.8 scikit-learn==1.6.1 scipy==1.13.0 -xgboost==2.1.0 +xgboost==1.7.1