Skip to content

Commit 37d3db6

Browse files
authored
Merge branch 'master' into feat/tgi-optimum-release
2 parents f4bdfec + d15a639 commit 37d3db6

File tree

7 files changed

+113
-9
lines changed

7 files changed

+113
-9
lines changed
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: CI Health
2+
on:
3+
schedule:
4+
- cron: "0 */3 * * *"
5+
workflow_dispatch:
6+
7+
permissions:
8+
id-token: write # This is required for requesting the JWT
9+
10+
jobs:
11+
codestyle-doc-tests:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Configure AWS Credentials
15+
uses: aws-actions/configure-aws-credentials@v4
16+
with:
17+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
18+
aws-region: us-west-2
19+
role-duration-seconds: 10800
20+
- name: Run Codestyle & Doc Tests
21+
uses: aws-actions/aws-codebuild-run-build@v1
22+
with:
23+
project-name: sagemaker-python-sdk-ci-health-codestyle-doc-tests
24+
unit-tests:
25+
runs-on: ubuntu-latest
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
python-version: ["py38", "py39", "py310"]
30+
steps:
31+
- name: Configure AWS Credentials
32+
uses: aws-actions/configure-aws-credentials@v4
33+
with:
34+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
35+
aws-region: us-west-2
36+
role-duration-seconds: 10800
37+
- name: Run Unit Tests
38+
uses: aws-actions/aws-codebuild-run-build@v1
39+
with:
40+
project-name: sagemaker-python-sdk-ci-health-unit-tests
41+
env-vars-for-codebuild: |
42+
PY_VERSION
43+
env:
44+
PY_VERSION: ${{ matrix.python-version }}
45+
integ-tests:
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Configure AWS Credentials
49+
uses: aws-actions/configure-aws-credentials@v4
50+
with:
51+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
52+
aws-region: us-west-2
53+
role-duration-seconds: 10800
54+
- name: Run Integ Tests
55+
uses: aws-actions/aws-codebuild-run-build@v1
56+
id: codebuild
57+
with:
58+
project-name: sagemaker-python-sdk-ci-health-integ-tests
59+
slow-tests:
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Configure AWS Credentials
63+
uses: aws-actions/configure-aws-credentials@v4
64+
with:
65+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
66+
aws-region: us-west-2
67+
role-duration-seconds: 10800
68+
- name: Run Slow Tests
69+
uses: aws-actions/aws-codebuild-run-build@v1
70+
with:
71+
project-name: sagemaker-python-sdk-ci-health-slow-tests
72+
localmode-tests:
73+
runs-on: ubuntu-latest
74+
steps:
75+
- name: Configure AWS Credentials
76+
uses: aws-actions/configure-aws-credentials@v4
77+
with:
78+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
79+
aws-region: us-west-2
80+
role-duration-seconds: 10800
81+
- name: Run Local Mode Tests
82+
uses: aws-actions/aws-codebuild-run-build@v1
83+
with:
84+
project-name: sagemaker-python-sdk-ci-health-localmode-tests
85+
notebook-tests:
86+
runs-on: ubuntu-latest
87+
steps:
88+
- name: Configure AWS Credentials
89+
uses: aws-actions/configure-aws-credentials@v4
90+
with:
91+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
92+
aws-region: us-west-2
93+
role-duration-seconds: 10800
94+
- name: Run Notebook Tests
95+
uses: aws-actions/aws-codebuild-run-build@v1
96+
with:
97+
project-name: sagemaker-python-sdk-ci-health-notebook-tests

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ Before sending us a pull request, please ensure that:
7777
1. Install coverage using `pip install .[test]`
7878
1. cd into the sagemaker-python-sdk folder: `cd sagemaker-python-sdk` or `cd /environment/sagemaker-python-sdk`
7979
1. Run the following tox command and verify that all code checks and unit tests pass: `tox tests/unit`
80-
81-
You can also run a single test with the following command: `tox -e py310 -- -s -vv <path_to_file><file_name>::<test_function_name>`
80+
1. You can also run a single test with the following command: `tox -e py310 -- -s -vv <path_to_file><file_name>::<test_function_name>`
81+
1. You can run coverage via runcvoerage env : `tox -e runcoverage -- tests/unit` or `tox -e py310 -- tests/unit --cov=sagemaker --cov-append --cov-report xml`
8282
* Note that the coverage test will fail if you only run a single test, so make sure to surround the command with `export IGNORE_COVERAGE=-` and `unset IGNORE_COVERAGE`
8383
* Example: `export IGNORE_COVERAGE=- ; tox -e py310 -- -s -vv tests/unit/test_estimator.py::test_sagemaker_model_s3_uri_invalid ; unset IGNORE_COVERAGE`
8484

README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ SageMaker Python SDK
2222
:target: https://sagemaker.readthedocs.io/en/stable/
2323
:alt: Documentation Status
2424

25+
.. image:: https://github.com/benieric/sagemaker-python-sdk/actions/workflows/codebuild-ci-health.yml/badge.svg
26+
:target: https://github.com/benieric/sagemaker-python-sdk/actions/workflows/codebuild-ci-health.yml
27+
:alt: CI Health
28+
2529
SageMaker Python SDK is an open source library for training and deploying machine learning models on Amazon SageMaker.
2630

2731
With the SDK, you can train and deploy models using popular deep learning frameworks **Apache MXNet** and **TensorFlow**.

src/sagemaker/estimator.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3285,10 +3285,7 @@ class Framework(EstimatorBase):
32853285
"""
32863286

32873287
_framework_name = None
3288-
UNSUPPORTED_DLC_IMAGE_FOR_SM_PARALLELISM = (
3289-
"2.0.1-gpu-py310-cu121",
3290-
"2.0-gpu-py310-cu121",
3291-
)
3288+
UNSUPPORTED_DLC_IMAGE_FOR_SM_PARALLELISM = ("2.0.1-gpu-py310-cu121",)
32923289

32933290
def __init__(
32943291
self,

src/sagemaker/fw_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@
161161
"2.2.0",
162162
]
163163

164-
165164
TORCH_DISTRIBUTED_GPU_SUPPORTED_FRAMEWORK_VERSIONS = [
166165
"1.13.1",
167166
"2.0.0",

tests/unit/test_fw_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -933,6 +933,7 @@ def test_validate_smdataparallel_args_not_raises():
933933
("ml.p3.16xlarge", "pytorch", "2.0.0", "py310", smdataparallel_enabled),
934934
("ml.p3.16xlarge", "pytorch", "2.0.1", "py310", smdataparallel_enabled),
935935
("ml.p3.16xlarge", "pytorch", "2.1.0", "py310", smdataparallel_enabled),
936+
("ml.p3.16xlarge", "pytorch", "2.2.0", "py310", smdataparallel_enabled),
936937
("ml.p3.16xlarge", "tensorflow", "2.4.1", "py3", smdataparallel_enabled_custom_mpi),
937938
("ml.p3.16xlarge", "tensorflow", "2.4.1", "py37", smdataparallel_enabled_custom_mpi),
938939
("ml.p3.16xlarge", "tensorflow", "2.4.3", "py3", smdataparallel_enabled_custom_mpi),
@@ -957,6 +958,7 @@ def test_validate_smdataparallel_args_not_raises():
957958
("ml.p3.16xlarge", "pytorch", "2.0.0", "py310", smdataparallel_enabled_custom_mpi),
958959
("ml.p3.16xlarge", "pytorch", "2.0.1", "py310", smdataparallel_enabled_custom_mpi),
959960
("ml.p3.16xlarge", "pytorch", "2.1.0", "py310", smdataparallel_enabled_custom_mpi),
961+
("ml.p3.16xlarge", "pytorch", "2.2.0", "py310", smdataparallel_enabled_custom_mpi),
960962
]
961963
for instance_type, framework_name, framework_version, py_version, distribution in good_args:
962964
fw_utils._validate_smdataparallel_args(

tox.ini

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,17 @@ commands =
8686
pip install 'torchvision==0.15.2+cpu' -f 'https://download.pytorch.org/whl/torch_stable.html'
8787
pip install 'dill>=0.3.8'
8888

89-
pytest --cov=sagemaker --cov-append {posargs}
90-
{env:IGNORE_COVERAGE:} coverage report -i --fail-under=86
89+
pytest {posargs}
9190
deps = .[test]
9291
depends =
9392
{py38,py39,py310,p311}: clean
9493

94+
[testenv:runcoverage]
95+
description = run unit tests with coverage
96+
commands =
97+
pytest --cov=sagemaker --cov-append {posargs}
98+
{env:IGNORE_COVERAGE:} coverage report -i --fail-under=86
99+
95100
[testenv:flake8]
96101
skipdist = true
97102
skip_install = true

0 commit comments

Comments
 (0)