Skip to content

Bump scikit-learn from 1.1.2 to 1.5.0 in /tfx_addons/feature_selection #534

Bump scikit-learn from 1.1.2 to 1.5.0 in /tfx_addons/feature_selection

Bump scikit-learn from 1.1.2 to 1.5.0 in /tfx_addons/feature_selection #534

Workflow file for this run

name: Examples CI
on:
push:
paths:
- 'tfx_addons/**'
- 'examples/**'
- '.github/workflows/ci_examples.yml'
- '.github/workflows/filter_examples.py'
- 'setup.py'
- 'pyproject.toml'
branches:
- main
- r*
pull_request:
paths:
- 'tfx_addons/**'
- 'examples/**'
- '.github/workflows/ci_examples.yml'
- '.github/workflows/filter_examples.py'
- 'setup.py'
- 'pyproject.toml'
branches:
- main
- r*
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
filter_examples:
# Dynamic matrix trick inspired by https://www.cynkra.com/blog/2020-12-23-dynamic-gha/
runs-on: ubuntu-latest
timeout-minutes: 60
outputs:
projects: ${{ steps.set-matrix.outputs.projects }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Get Changed Files
id: changed_files
uses: trilom/[email protected]
with:
output: json
- name: Filter example projects
id: set-matrix
run: |
echo "projects=$(python ./.github/workflows/filter_examples.py $HOME/files.json)" >> $GITHUB_OUTPUT
ci-examples:
runs-on: ubuntu-latest
needs: filter_examples
timeout-minutes: 60
if: needs.filter_examples.outputs.projects != '[]'
strategy:
# Test for each project in parallel using ci_max and ci_min to ensure
# tested in range of tfx/tensorflow supported versions
matrix:
project: ${{fromJson(needs.filter_examples.outputs.projects)}}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Cache python environment
uses: actions/cache@v2
with:
# Cache installed dependencies
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirement.txt + project name
key: ${{ runner.os }}-pip-ciexamples-${{ matrix.project }}-${{ hashFiles(format('examples/{0}/requirements.txt', matrix.project)) }}
restore-keys: |
${{ runner.os }}-pip-ciexamples-${{ matrix.project }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel pytest
cd examples/${{ matrix.project }}
pip install -r requirements.txt
- name: Run tests
run: |
cd examples/${{ matrix.project }}
python -m pytest .