Skip to content

Commit cd86eb2

Browse files
malav-shastriMalav Shastri
andauthored
Upgrade SKLearn to 1.2.1 (#163)
* Upgrade SKLearn to 1.2.1 * Delete buildspecs and refresh pickled models * Correct local integration tests --------- Co-authored-by: Malav Shastri <[email protected]>
1 parent 838ffd2 commit cd86eb2

File tree

17 files changed

+23
-23
lines changed

17 files changed

+23
-23
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ If you want to run local integration tests, then use:
184184
185185
# Example
186186
pytest test/integration --docker-base-name preprod-sklearn ``\``
187-
--tag 1.0-1 ``\``
187+
--tag 1.2-1 ``\``
188188
--py-version 3 ``\``
189189
--framework-version |FRAMEWORK_VERSION|
190190
@@ -242,4 +242,4 @@ SageMaker Scikit-learn Container is licensed under the Apache 2.0 License. It is
242242
.com, Inc. or its affiliates. All Rights Reserved. The license is available at:
243243
http://aws.amazon.com/apache2.0/
244244

245-
.. |FRAMEWORK_VERSION| replace:: 1.0-1
245+
.. |FRAMEWORK_VERSION| replace:: 1.2-1

docker/1.0-1/base/Dockerfile.cpu renamed to docker/1.2-1/base/Dockerfile.cpu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,4 @@ ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PYTHONIOENCODING=UTF-8 LANG=C.U
116116
# Install Scikit-Learn
117117
# Scikit-learn 0.20 was the last version to support Python 2.7 and Python 3.4.
118118
# Scikit-learn now requires Python 3.6 or newer.
119-
RUN python -m pip install --no-cache -I scikit-learn==1.0.2
119+
RUN python -m pip install --no-cache -I scikit-learn==1.2.1

docker/1.0-1/extension/Dockerfile.cpu renamed to docker/1.2-1/extension/Dockerfile.cpu

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM preprod-sklearn:1.0-1
1+
FROM preprod-sklearn:1.2-1
22

3-
RUN pip freeze | grep -q 'scikit-learn==1.0.2'; \
3+
RUN pip freeze | grep -q 'scikit-learn==1.2.1'; \
44
if [ $? -eq 0 ]; \
5-
then echo 'scikit-learn version 1.0.2 requirement met'; \
6-
else echo 'ERROR: Expected scikit-learn version is 1.0.2, check base images for scikit-learn version' && \
5+
then echo 'scikit-learn version 1.2.1 requirement met'; \
6+
else echo 'ERROR: Expected scikit-learn version is 1.2.1, check base images for scikit-learn version' && \
77
exit 1; fi
88

99
RUN pip install --upgrade --no-cache --no-deps sagemaker-scikit-learn-extension==2.5.0

docker/1.0-1/extension/README.md renamed to docker/1.2-1/extension/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ The SageMaker Scikit-learn Extension Container is built in 3 steps. The first 2
88

99
The "base" Dockerfile encompass the installation of the framework and all of the dependencies needed.
1010

11-
Tagging scheme is based on <Scikit-learn_version>-<SageMaker_version>-cpu-py<python_version>. (e.g. 1.0-1-cpu-py3)
11+
Tagging scheme is based on <Scikit-learn_version>-<SageMaker_version>-cpu-py<python_version>. (e.g. 1.2-1-cpu-py3)
1212

1313
All "final" Dockerfiles build images using base images that use the tagging scheme above.
1414

1515
```
16-
docker build -t sklearn-base:1.0-1-cpu-py3 -f docker/1.0-1/base/Dockerfile.cpu .
16+
docker build -t sklearn-base:1.2-1-cpu-py3 -f docker/1.2-1/base/Dockerfile.cpu .
1717
```
1818

19-
Notice that this Dockerfile has the updated version of sklearn (1.0.2) installed.
19+
Notice that this Dockerfile has the updated version of sklearn (1.2.1) installed.
2020

2121
### Step 2: Final Image
2222

@@ -38,7 +38,7 @@ python setup.py bdist_wheel
3838
Then build the final image, like in the sagemaker-sklearn-container
3939

4040
```
41-
docker build -t preprod-sklearn:1.0-1-cpu-py3 -f docker/1.0-1/final/Dockerfile.cpu .
41+
docker build -t preprod-sklearn:1.2-1-cpu-py3 -f docker/1.2-1/final/Dockerfile.cpu .
4242
```
4343

4444
### Step 3: Build the extension image for SageMaker Scikit-learn Extension Container
@@ -47,10 +47,10 @@ The "extension" Dockerfiles encompass the installation of the SageMaker Autopilo
4747

4848
The "extension" Dockerfiles use final images for building.
4949

50-
Build the third additional Dockerfile needed for SageMaker Scikit-learn Extension Container. This Dockerfile specifies a hard dependency on a certain version of scikit-learn (i.e. v1.0.2).
50+
Build the third additional Dockerfile needed for SageMaker Scikit-learn Extension Container. This Dockerfile specifies a hard dependency on a certain version of scikit-learn (i.e. v1.2.1).
5151

5252
Tagging scheme is based on extension-<Scikit-learn-Extension_version>-<SageMaker_version>-cpu-py<python_version>. (e.g. extension-2.5-1-cpu-py3). Make sure the "extension" image is tagged in accordance with the `extension` (i.e. `extension-2.5-1-cpu-py3`).
5353

5454
```
55-
docker build -t preprod-sklearn-extension:2.5-1-cpu-py3 -f docker/1.0-1/extension/Dockerfile.cpu .
55+
docker build -t preprod-sklearn-extension:2.5-1-cpu-py3 -f docker/1.2-1/extension/Dockerfile.cpu .
5656
```

docker/1.0-1/final/Dockerfile.cpu renamed to docker/1.2-1/final/Dockerfile.cpu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
FROM sklearn-base:1.0-1
2-
ENV SAGEMAKER_SKLEARN_VERSION 1.0-1
1+
FROM sklearn-base:1.2-1
2+
ENV SAGEMAKER_SKLEARN_VERSION 1.2-1
33

44
LABEL com.amazonaws.sagemaker.capabilities.accept-bind-to-port=true
55

0 commit comments

Comments
 (0)