Skip to content

model: Add LFM2.5 and LFM2 models #15386

model: Add LFM2.5 and LFM2 models

model: Add LFM2.5 and LFM2 models #15386

Workflow file for this run

# This workflow will:
# 1) install Python dependencies
# 2) run make test
name: Test
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest] #, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
include:
# Add Windows with Python 3.10 only to avoid tests taking too long
- os: windows-latest
python-version: "3.10"
steps:
- uses: actions/checkout@v6
- name: Cache Hugging Face
id: cache-hf
uses: actions/cache@v5
with:
path: ~/.cache/huggingface
key: ${{ runner.os }}-hf
- name: Install uv and set the Python version
uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
# required for evaluation the audio subset
- name: Install FFmpeg (Ubuntu)
if: runner.os != 'Windows'
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:ubuntuhandbook1/ffmpeg8
sudo apt-get update
sudo apt-get install -y ffmpeg
- name: Setup Miniconda (Windows)
if: runner.os == 'Windows'
uses: conda-incubator/setup-miniconda@v4
with:
auto-update-conda: true
miniconda-version: "latest"
activate-environment: ffmpeg
channels: conda-forge
conda-remove-defaults: true
- name: Install FFmpeg (Windows)
if: runner.os == 'Windows'
shell: pwsh
# using conda to install ffmpeg on windows, to avoid issues with dlls
run: |
conda install -y "ffmpeg=8.0.1" -c conda-forge
- name: Check FFmpeg version
run: ffmpeg -version
- name: Install dependencies
shell: bash
run: |
make install-for-tests
- name: Setup Pytorch dll PATH (Windows)
# otherwise pytorch audio cannot find pytorch dlls on windows
if: runner.os == 'Windows'
shell: pwsh
run: |
$torchLib = "D:\a\mteb\mteb\.venv\Lib\site-packages\torch\lib"
if (Test-Path $torchLib) {
echo "$torchLib" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
$env:PATH = "$torchLib;$env:PATH"
echo "PATH=$env:PATH" >> $env:GITHUB_ENV
} else {
Write-Host "Torch lib path not found: $torchLib"
}
- name: Run tests
if: runner.os != 'Windows'
shell: bash
run: |
make test
- name: Run tests on Windows
# Run tests on Windows
# this step will run the workflow twice since we have experienced
# failures when running on windows when loading the datasets
if: runner.os == 'Windows'
shell: pwsh
run: |
# run the test once and if it fails, run it again
# if it fails again, the workflow will fail.
# If it passes the first time the test will not run again
try {
make test
} catch {
Write-Host "First test run failed, retrying..."
make test
}