Skip to content

Improve KNN Graph Construction for Handling Exact Duplicates and Numerical Precision #4878

Improve KNN Graph Construction for Handling Exact Duplicates and Numerical Precision

Improve KNN Graph Construction for Handling Exact Duplicates and Numerical Precision #4878

Workflow file for this run

name: CI
on:
push:
pull_request:
schedule:
- cron: '0 12 * * 1'
jobs:
test-windows:
name: "Test: Python ${{ matrix.python }} on windows"
runs-on: windows-latest
strategy:
matrix:
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
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
env:
TEST_FASTTEXT: true
- uses: codecov/codecov-action@v3
test-macos-linux:
name: "Test: Python ${{ matrix.python }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-12
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: Install fasttext for non-Windows machines
run: |
pip install fasttext
- name: Test with coverage
run: pytest --verbose --maxfail=3 --order-tests --cov=cleanlab/ --cov-config .coveragerc --cov-report=xml
env:
TEST_FASTTEXT: true
- uses: codecov/codecov-action@v3
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'