From 2268f2f069a22404d6759fc7c0263d192eca1f43 Mon Sep 17 00:00:00 2001 From: Nikhil Raverkar Date: Fri, 15 Jul 2022 10:08:55 -0400 Subject: [PATCH] reverting numpy to 1.19.2, updating boto3 to 1.24.17, fixing docker build issue and adding regression test --- docker/0.23-1/final/Dockerfile.cpu | 3 ++- requirements.txt | 6 +++--- test-requirements.txt | 2 +- test/unit/test_modules.py | 8 ++++++++ 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/docker/0.23-1/final/Dockerfile.cpu b/docker/0.23-1/final/Dockerfile.cpu index bfc91a3..f9f65a4 100644 --- a/docker/0.23-1/final/Dockerfile.cpu +++ b/docker/0.23-1/final/Dockerfile.cpu @@ -9,7 +9,8 @@ RUN python -m pip install -r /requirements.txt && \ COPY dist/sagemaker_sklearn_container-2.0-py3-none-any.whl /sagemaker_sklearn_container-2.0-py3-none-any.whl # https://github.com/googleapis/google-cloud-python/issues/6647 -RUN rm -rf /miniconda3/lib/python3.7/site-packages/numpy-1.19.4.dist-info && \ +RUN conda install numpy --force-reinstall && \ + rm -rf /miniconda3/lib/python3.7/site-packages/numpy-1.19.4.dist-info && \ pip install --no-cache /sagemaker_sklearn_container-2.0-py3-none-any.whl && \ rm /sagemaker_sklearn_container-2.0-py3-none-any.whl diff --git a/requirements.txt b/requirements.txt index cbb1251..10814d0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,12 @@ -boto3==1.16.4 -botocore==1.19.4 +boto3==1.24.17 +botocore==1.27.18 cryptography==35.0.0 Flask==1.1.1 itsdangerous==2.0.1 gunicorn==20.0.4 model-archiver==1.0.3 multi-model-server==1.1.1 -numpy==1.21.0 +numpy==1.19.2 pandas==1.1.3 psutil==5.7.2 python-dateutil==2.8.1 diff --git a/test-requirements.txt b/test-requirements.txt index 04b7ce6..116f48b 100755 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,6 +1,6 @@ Flask PyYAML -boto3>=1.13.17 +boto3>=1.24.17 coverage docker-compose flake8 diff --git a/test/unit/test_modules.py b/test/unit/test_modules.py index 1277993..41acffa 100644 --- a/test/unit/test_modules.py +++ b/test/unit/test_modules.py @@ -1,4 +1,12 @@ +import pandas as pd + + def test_pandas_version(): import pandas as pd major, minor, patch = pd.__version__.split('.') assert major == '1' + + +def test_pyarrow_to_parquet_conversion_regression_issue_106(): + df = pd.DataFrame({'x': [1, 2]}) + df.to_parquet('test.parquet', engine='pyarrow')