Skip to content

Commit

Permalink
[Build] Fix issues (#1361)
Browse files Browse the repository at this point in the history
## Description

Address a number of issues in the builds

- The `macos-latest` runner is now ARM based and doesn't have older Python versions. Stick with `macos-12` for now
- Fix a variable name which had started upsetting `flake8`
- Upper bound on `scikeras` to at least get the TensorFlow test running again
- Update various GitHub Action versions

## Tests
<!--- Select all that apply by putting an x between the brackets: [x] -->
- [ ] no new tests required
- [ ] new tests added
- [x] existing tests adjusted

## Documentation
<!--- Select all that apply. -->
- [x] no documentation changes needed
- [ ] user guide added or updated
- [ ] API docs added or updated
- [ ] example notebook added or updated

## Screenshots
<!--- If your PR makes changes to visualizations (e.g., matplotlib code) or the website, please include a screenshot of the result. -->
  • Loading branch information
riedgar-ms committed May 10, 2024
1 parent 23789b2 commit d88402f
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 19 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build-test.yml
Expand Up @@ -21,7 +21,7 @@ jobs:
all-deps:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-12]
python: ["3.8", "3.9", "3.10", "3.11"]
requirementsPinned: ["false"]
uses: ./.github/workflows/test-all-deps.yml
Expand All @@ -34,7 +34,7 @@ jobs:
minimal-deps:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-12]
python: ["3.8", "3.9", "3.10", "3.11"]
uses: ./.github/workflows/test-minimal-deps.yml
with:
Expand All @@ -49,6 +49,7 @@ jobs:
os: [ubuntu-latest]
python: ["3.11"]
mlpackage: [lightgbm, xgboost, tensorflow, pytorch]
fail-fast: false
uses: ./.github/workflows/test-other-ml.yml
with:
os: ${{ matrix.os }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linting.yml
Expand Up @@ -14,8 +14,8 @@ jobs:
linting-flake8:
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python }}
- run: pip install -r requirements-dev.txt
Expand All @@ -27,5 +27,5 @@ jobs:
# .pre-commit-config.yaml
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: psf/black@23.9.1
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Expand Up @@ -12,7 +12,7 @@ jobs:
# to see all issues rather than just the first failure.
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-12]
python: ["3.8", "3.9", "3.10", "3.11"]
requirementsPinned: ["true", "false"]
uses: ./.github/workflows/test-all-deps.yml
Expand All @@ -28,7 +28,7 @@ jobs:
# to see all issues rather than just the first failure.
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-12]
python: ["3.8", "3.9", "3.10", "3.11"]
uses: ./.github/workflows/test-minimal-deps.yml
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-wheel.yml
Expand Up @@ -19,7 +19,7 @@ jobs:
build-wheel:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -41,10 +41,10 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-12]
python-version: ['3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-all-deps.yml
Expand Up @@ -27,7 +27,7 @@ jobs:
env:
MPLBACKEND: Agg
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get commit date
id: get_date
shell: bash
Expand All @@ -37,7 +37,7 @@ jobs:
AGE=$((CURRENT_DATE - COMMIT_DATE))
echo "AGE=$AGE" >> $GITHUB_OUTPUT
echo "AGE in seconds: $AGE"
- uses: actions/setup-python@v3
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python }}
- run: python scripts/install_requirements.py --pinned ${{ inputs.requirementsPinned }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-minimal-deps.yml
Expand Up @@ -23,7 +23,7 @@ jobs:
# we only upload results if the current commit is under 48 hours old
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get commit date
id: get_date
shell: bash
Expand All @@ -33,7 +33,7 @@ jobs:
AGE=$((CURRENT_DATE - COMMIT_DATE))
echo "AGE=$AGE" >> $GITHUB_OUTPUT
echo "AGE in seconds: $AGE"
- uses: actions/setup-python@v3
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python }}
- run: pip install .
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/test-other-ml.yml
Expand Up @@ -21,8 +21,8 @@ jobs:
baseDir: test_othermlpackages
condaEnv: test-conda-env
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python }}
- run: |
Expand All @@ -41,9 +41,11 @@ jobs:
- run: |
source /usr/share/miniconda/etc/profile.d/conda.sh
conda activate $condaEnv
echo
conda list
echo
# Override the filterwarnings set in the TOML file
python -m pytest -o filterwarnings=default --cov=fairlearn --cov-report=xml $baseDir/test_${{inputs.mlpackage}}.py
python -v -m pytest -o filterwarnings=default --cov=fairlearn --cov-report=xml $baseDir/test_${{inputs.mlpackage}}.py
name: Run ${{matrix.mlpackage}} tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
Expand Down
2 changes: 1 addition & 1 deletion test/unit/adversarial/test_adversarial_mitigation.py
Expand Up @@ -105,7 +105,7 @@ def test_model_early_stop(torch):
max_iter=10,
random_state=1,
progress_updates=0.0000001,
callbacks=lambda object, step: step > 5,
callbacks=lambda callback_obj, step: step > 5,
)
mitigator.fit(X, Y, sensitive_features=Z)
assert mitigator.step_ == 6
Expand Down
2 changes: 1 addition & 1 deletion test_othermlpackages/conda-tensorflow.yaml
Expand Up @@ -9,4 +9,4 @@ dependencies:
- pytest-cov
- tensorflow
- pip:
- scikeras[tensorflow-cpu]
- scikeras[tensorflow-cpu]<0.13

0 comments on commit d88402f

Please sign in to comment.