Fix same test bug #167
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: Testing | |
on: [push, pull_request] | |
jobs: | |
pytest: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04] | |
python-version: ['3.8'] | |
torch-version: [2.0.0, 2.2.0] | |
steps: | |
- name: Checkout with submodules | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Free up disk space | |
if: ${{ runner.os == 'Linux' }} | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
- name: Setup venv | |
run: | | |
python -m venv flk-env | |
source flk-env/bin/activate | |
- name: Install setup dependencies (PyTorch ${{ matrix.torch-version }}+cpu) | |
run: | | |
source flk-env/bin/activate | |
echo "Python is located at $(which python)" | |
pip install --upgrade pip setuptools wheel ninja | |
pip install numpy | |
pip install torch==${{ matrix.torch-version }} --extra-index-url https://download.pytorch.org/whl/cpu | |
python -c "import torch; print('PyTorch:', torch.__version__)" | |
python -c "import torch; print('CUDA:', torch.version.cuda)" | |
python -c "import torch; print('CUDA Available:', torch.cuda.is_available())" | |
- name: Install main package | |
run: | | |
source flk-env/bin/activate | |
pip install --no-build-isolation --editable .[test] | |
- name: Run test-suite | |
run: | | |
source flk-env/bin/activate | |
pytest --cov-report=term-missing --cov-report=xml:coverage.xml --cov=falkon --cov-config pyproject.toml |