Skip to content

Add linear probing pipeline on top of frozen MR-RATE encoder #44

Add linear probing pipeline on top of frozen MR-RATE encoder

Add linear probing pipeline on top of frozen MR-RATE encoder #44

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip packages
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('contrastive-pretraining/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r contrastive-pretraining/requirements.txt
pip install -e contrastive-pretraining/mr_rate/ -e contrastive-pretraining/vision_encoder/
- name: Run tests with coverage
run: |
python -m pytest --cov-report=xml
working-directory: contrastive-pretraining
- name: Upload coverage to Codecov
if: matrix.python-version == '3.12'
uses: codecov/codecov-action@v4
with:
file: contrastive-pretraining/coverage.xml
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}