Sparse MatMul Support in TorchJD for Seamless compatibility with torch.vmap() #1254
Workflow file for this run
This file contains hidden or 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: Tests | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '41 16 * * *' # Every day at 16:41 UTC (to avoid high load at exact hour values). | |
| jobs: | |
| tests-full-install: | |
| name: Run tests with full install | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false # Ensure matrix jobs keep running even if one fails | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12', '3.13'] | |
| os: [ubuntu-latest, macOS-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install default (with full options) and test dependencies | |
| run: uv pip install '.[full]' --group test | |
| - name: Run unit and doc tests with coverage report | |
| run: uv run pytest tests/unit tests/doc --cov=src --cov-report=xml | |
| - name: Upload results to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| tests-default-install: | |
| name: Run (most) tests with default install | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install default (without any option) and test dependencies | |
| run: uv pip install . --group test | |
| - name: Run unit and doc tests with coverage report | |
| run: | | |
| uv run pytest tests/unit tests/doc \ | |
| --ignore tests/unit/aggregation/test_cagrad.py \ | |
| --ignore tests/unit/aggregation/test_nash_mtl.py \ | |
| --ignore tests/doc/test_aggregation.py \ | |
| --cov=src --cov-report=xml | |
| - name: Upload results to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| build-doc: | |
| name: Build doc | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies (default with full options & doc) | |
| run: uv pip install '.[full]' --group doc | |
| - name: Build Documentation | |
| working-directory: docs | |
| run: uv run make dirhtml | |
| mypy: | |
| name: Run mypy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies (default with full options & check) | |
| run: uv pip install '.[full]' --group check | |
| - name: Run mypy | |
| run: uv run mypy src/torchjd |