| name: tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install | |
| run: | | |
| pip install --upgrade pip | |
| pip install torch --index-url https://download.pytorch.org/whl/cpu | |
| pip install -e ".[dev]" | |
| - name: Test (CPU, no Triton) | |
| run: pytest tests/ -v --tb=short | |
| - name: Check imports | |
| run: | | |
| python -c "from sparsevlm import apply_sparsevlm, reset_n_vis; print('OK')" | |
| python -c "from kernels.rank_estimator import sketch_rank; print('OK')" | |
| python -c "from kernels.varlen_packing import pack_varlen_batch; print('OK')" | |
| python -c "from kernels.token_scorer import sparsevlm_score; print('OK')" | |