-
Notifications
You must be signed in to change notification settings - Fork 365
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
Updated release file for erroranalysis
#2289
Changes from 6 commits
7336bf4
f11192d
84d70c9
9170329
29f345d
f544ab7
e4540a0
b15705a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
name: CI Python Vision | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- "erroranalysis/**" | ||
- "rai_test_utils/**" | ||
- ".github/workflows/CI-python-vision.yml" | ||
|
||
jobs: | ||
ci-python: | ||
strategy: | ||
matrix: | ||
packageDirectory: | ||
["erroranalysis", "rai_test_utils"] | ||
operatingSystem: [ubuntu-latest, macos-latest, windows-latest] | ||
pythonVersion: ["3.8", "3.9", "3.10"] | ||
exclude: | ||
- operatingSystem: macos-latest | ||
pythonVersion: "3.8" | ||
|
||
runs-on: ${{ matrix.operatingSystem }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.pythonVersion }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.pythonVersion }} | ||
|
||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
auto-update-conda: true | ||
python-version: ${{ matrix.pythonVersion }} | ||
|
||
- if: ${{ matrix.operatingSystem != 'macos-latest' }} | ||
name: Install pytorch on non-MacOS | ||
shell: bash -l {0} | ||
run: | | ||
conda install --yes --quiet pytorch torchvision captum cpuonly -c pytorch | ||
|
||
- if: ${{ matrix.operatingSystem == 'macos-latest' }} | ||
name: Install Anaconda packages on MacOS, which should not include cpuonly according to official docs | ||
shell: bash -l {0} | ||
run: | | ||
conda install --yes --quiet pytorch torchvision captum -c pytorch | ||
|
||
- if: ${{ matrix.operatingSystem == 'macos-latest' }} | ||
name: Install latest lightgbm from conda-forge for MacOS | ||
shell: bash -l {0} | ||
run: | | ||
conda install --yes --quiet lightgbm -c conda-forge | ||
Advitya17 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Setup tools | ||
shell: bash -l {0} | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install --upgrade setuptools | ||
pip install --upgrade "pip-tools<=7.1.0" | ||
|
||
- name: Install package dependencies | ||
shell: bash -l {0} | ||
run: | | ||
pip install -r requirements-dev.txt | ||
working-directory: ${{ matrix.packageDirectory }} | ||
|
||
- name: Install package extras | ||
shell: bash -l {0} | ||
run: | | ||
pip install -r requirements-object-detection.txt | ||
working-directory: ${{ matrix.packageDirectory }} | ||
|
||
- name: Install package | ||
shell: bash -l {0} | ||
run: | | ||
pip install -v -e . | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So this is without the extras (which would be pip install .[object-detection]). What about with extras? I'm a bit confused honestly, because you installed the requirements for the extras above. So this is neither really (?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @romanlutz I installed |
||
working-directory: ${{ matrix.packageDirectory }} | ||
|
||
- name: Pip freeze | ||
Advitya17 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
shell: bash -l {0} | ||
run: | | ||
pip freeze > installed-requirements-dev.txt | ||
cat installed-requirements-dev.txt | ||
working-directory: raiwidgets | ||
|
||
- name: Upload requirements | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: requirements-dev.txt | ||
path: raiwidgets/installed-requirements-dev.txt | ||
|
||
- name: Run tests | ||
shell: bash -l {0} | ||
run: | | ||
pytest --durations=10 --doctest-modules --junitxml=junit/test-results.xml --cov=${{ matrix.packageDirectory }} --cov-report=xml --cov-report=html | ||
working-directory: ${{ matrix.packageDirectory }} | ||
|
||
- name: Upload code coverage results | ||
Advitya17 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.packageDirectory }}-code-coverage-results | ||
path: ${{ matrix.packageDirectory }}/htmlcov | ||
# Use always() to always run this step to publish test results when there are test failures | ||
if: ${{ always() }} | ||
|
||
- if: ${{ (matrix.operatingSystem == 'windows-latest') && (matrix.pythonVersion == '3.8') }} | ||
name: Upload to codecov | ||
id: codecovupload1 | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
directory: ${{ matrix.packageDirectory }} | ||
env_vars: OS,PYTHON | ||
fail_ci_if_error: false | ||
files: ./${{ matrix.packageDirectory }}/coverage.xml | ||
flags: unittests | ||
name: codecov-umbrella | ||
verbose: true | ||
|
||
- if: ${{ (steps.codecovupload1.outcome == 'failure') && (matrix.pythonVersion == '3.8') && (matrix.operatingSystem == 'windows-latest') }} | ||
name: Retry upload to codecov | ||
id: codecovupload2 | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
directory: ${{ matrix.packageDirectory }} | ||
env_vars: OS,PYTHON | ||
fail_ci_if_error: false | ||
files: ./${{ matrix.packageDirectory }}/coverage.xml | ||
flags: unittests | ||
name: codecov-umbrella | ||
verbose: true | ||
|
||
- name: Set codecov status | ||
if: ${{ (matrix.pythonVersion == '3.8') && (matrix.operatingSystem == 'windows-latest') }} | ||
shell: bash | ||
run: | | ||
if ${{ (steps.codecovupload1.outcome == 'success') || (steps.codecovupload2.outcome == 'success') }} ; then | ||
echo fine | ||
else | ||
exit 1 | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
erroranalysis supports 3.6 onwards. Are we willing to drop support for them? If so, please update the setup.py file. Not testing and hoping that it works sounds dangerous to me.
@imatiach-msft FYI