Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Python 3.10 #605

Merged
merged 9 commits into from
Apr 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [ '3.7', '3.8', '3.9' ]
include: # Run macos and windows tests on python 3.9 only
- os: windows-latest
python-version: '3.9'
- os: macos-latest
python-version: '3.9'
python-version: [ '3.7', '3.8', '3.9', '3.10' ]
include: # Run macos and windows tests on only one python version
- os: windows-latest
python-version: '3.9' # PyTorch doesn't yet have 3.10 support on Windows (https://pytorch.org/get-started/locally/#windows-python)
- os: macos-latest
python-version: '3.10'

steps:
- name: Checkout code
Expand All @@ -50,7 +50,9 @@ jobs:
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade --upgrade-strategy eager -r requirements/dev.txt
python -m pip install --upgrade --upgrade-strategy eager -e .
if [ "$RUNNER_OS" != "Windows" ]; then # Skip distributed tests on windows for now (Windows support for ray is experimental https://docs.ray.io/en/latest/installation.html#windows-support)
if [ "$RUNNER_OS" != "Windows" ] && [ ${{ matrix.python }} < '3.10' ]; then
# Windows support for ray is experimental (https://docs.ray.io/en/latest/installation.html#windows-support)
# Python 3.10 is not yet supported (https://github.com/ray-project/ray/blob/master/python/setup.py#L24)
python -m pip install --upgrade --upgrade-strategy eager -e .[ray]
fi
python -m pip install --upgrade --upgrade-strategy eager -e .[shap]
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/test_all_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
fail-fast: false # Continue to run other builds despite a failure
matrix:
os: [ubuntu-latest]
python-version: [ '3.7', '3.8', '3.9' ]
include: # Run macos and windows tests on python 3.9 only
python-version: [ '3.7', '3.8', '3.9', '3.10' ]
include: # Run macos and windows tests on only one python version
- os: windows-latest
python-version: '3.9'
python-version: '3.9' # PyTorch doesn't yet have 3.10 support on Windows (https://pytorch.org/get-started/locally/#windows-python)
- os: macos-latest
python-version: '3.9'
python-version: '3.10'

steps:
- name: Checkout code
Expand All @@ -41,7 +41,9 @@ jobs:
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade --upgrade-strategy eager -r requirements/dev.txt -r testing/requirements.txt
python -m pip install --upgrade --upgrade-strategy eager -e .
if [ "$RUNNER_OS" != "Windows" ]; then # Skip distributed tests on windows for now (Windows support for ray is experimental https://docs.ray.io/en/latest/installation.html#windows-support)
if [ "$RUNNER_OS" != "Windows" ] && [ ${{ matrix.python }} < '3.10' ]; then
# Windows support for ray is experimental (https://docs.ray.io/en/latest/installation.html#windows-support)
# Python 3.10 is not yet supported (https://github.com/ray-project/ray/blob/master/python/setup.py#L24)
python -m pip install --upgrade --upgrade-strategy eager -e .[ray]
fi
python -m pip install --upgrade --upgrade-strategy eager -e .[shap]
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/test_changed_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [ '3.7', '3.8', '3.9' ]
include: # Run macos and windows tests on python 3.9 only
python-version: [ '3.7', '3.8', '3.9', '3.10' ]
include: # Run macos and windows tests on only one python version
- os: windows-latest
python-version: '3.9'
python-version: '3.9' # PyTorch doesn't yet have 3.10 support on Windows (https://pytorch.org/get-started/locally/#windows-python)
- os: macos-latest
python-version: '3.9'
python-version: '3.10'

steps:
- name: Checkout code
Expand All @@ -57,7 +57,9 @@ jobs:
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade --upgrade-strategy eager -r requirements/dev.txt -r testing/requirements.txt
python -m pip install --upgrade --upgrade-strategy eager -e .
if [ "$RUNNER_OS" != "Windows" ]; then # Skip distributed tests on windows for now (Windows support for ray is experimental https://docs.ray.io/en/latest/installation.html#windows-support)
if [ "$RUNNER_OS" != "Windows" ] && [ ${{ matrix.python }} < '3.10' ]; then
# Windows support for ray is experimental (https://docs.ray.io/en/latest/installation.html#windows-support)
# Python 3.10 is not yet supported (https://github.com/ray-project/ray/blob/master/python/setup.py#L24)
python -m pip install --upgrade --upgrade-strategy eager -e .[ray]
fi
python -m pip install --upgrade --upgrade-strategy eager -e .[shap]
Expand Down
2 changes: 1 addition & 1 deletion alibi/explainers/tests/test_shap_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,7 @@ def test_explain_tree(caplog, monkeypatch, mock_tree_shap_explainer, data_type,
explainer._check_explainer_setup.assert_not_called()
explainer._check_interactions.assert_called_with(False, background_data, None)
else:
explainer._check_interactions.asert_not_called()
explainer._check_interactions.assert_not_called()
explainer._check_explainer_setup.assert_called_with(background_data, explainer.model_output, None)

explainer._build_explanation.assert_called_once()
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def readme():
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: Apache Software License",
"Topic :: Scientific/Engineering",
],
Expand Down