Skip to content

Commit

Permalink
reverting numpy to 1.19.2 to solve pyarrow integration issue, changes…
Browse files Browse the repository at this point in the history
… to resolve numpy related build issues and adding regression test
  • Loading branch information
Nikhil Raverkar committed Jul 14, 2022
1 parent f8015ce commit 88e125a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docker/0.23-1/final/Dockerfile.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ COPY dist/sagemaker_sklearn_container-2.0-py3-none-any.whl /sagemaker_sklearn_co
# https://github.com/googleapis/google-cloud-python/issues/6647
RUN 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
rm /sagemaker_sklearn_container-2.0-py3-none-any.whl && \
rm /miniconda3/lib/python3.8/site-packages/numpy-1.21.2.dist-info

ENV SAGEMAKER_TRAINING_MODULE sagemaker_sklearn_container.training:main
ENV SAGEMAKER_SERVING_MODULE sagemaker_sklearn_container.serving:main
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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
Expand Down
9 changes: 9 additions & 0 deletions test/unit/test_modules.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
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')

0 comments on commit 88e125a

Please sign in to comment.