replace Datalab load/save from pickle to json #5400
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 12 * * 1' | |
jobs: | |
test-all-os: | |
name: "Test: Python ${{ matrix.python }} on ${{ matrix.os }}" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-13 | |
- windows-latest | |
python: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Download cleanvision test data | |
run: | | |
git clone https://github.com/cleanlab/assets.git | |
mv assets/cleanlab_test_data ./tests/datalab/data | |
- name: Install cleanlab | |
run: pip install -e ".[all]" | |
- name: Install development dependencies | |
run: pip install -r requirements-dev.txt | |
- name: Overwrite tensorflow version on Windows | |
if: runner.os == 'Windows' | |
run: | | |
pip uninstall -y tensorflow | |
pip install tensorflow-cpu<2.16 | |
- name: Test with coverage | |
run: pytest --verbose --maxfail=3 --order-tests --cov=cleanlab/ --cov-config .coveragerc --cov-report=xml | |
- uses: codecov/codecov-action@v3 | |
with: | |
version: "v0.7.3" | |
test-without-extras-min-versions: | |
name: Test without optional dependencies and with minimum compatible versions of dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Install cleanlab | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
- name: Install test dependencies | |
run: | | |
pip install pytest pipdeptree hypothesis | |
pipdeptree -j > deps.json | |
- name: Install minimum versions | |
run: | | |
python ./.github/get_min_dependencies.py | |
pip install -r requirements-min.txt | |
- name: Run tests | |
run: | | |
pytest tests/test_multilabel_classification.py tests/test_multiannotator.py tests/test_filter_count.py | |
typecheck: | |
name: Type check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install ".[all]" # install dependencies | |
pip install -r requirements-dev.txt # install development dependencies and type stubs | |
- name: Type check | |
run: mypy --install-types --non-interactive cleanlab | |
fmt: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: psf/black@stable | |
flake8: | |
name: Check for unused/wildcard imports | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install flake8 | |
run: pip install flake8 | |
- name: Lint with flake8 | |
run: flake8 cleanlab tests | |
nblint: | |
name: Lint Notebooks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cleanlab/nblint-action@v1 | |
with: | |
directory: 'docs' |