update ci #7
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: CI | |
on: | |
push: | |
# Sequence of patterns matched against refs/heads | |
branches: | |
# Push events on main branch | |
- main | |
- master | |
# Sequence of patterns matched against refs/tags | |
tags: "*" | |
workflow_dispatch: | |
jobs: | |
test: | |
name: ${{matrix.subset-size}} - ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
subset-size: | |
- 300K | |
- 10M | |
- 30M | |
- 100M | |
version: | |
- "1.8" | |
os: | |
- ubuntu-latest | |
arch: | |
- x64 | |
exclude: | |
- os: macOS-latest | |
arch: x86 | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: "true" | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
shell: bash -el {0} | |
run: | | |
conda create -n faiss python=3.10 | |
conda activate faiss | |
conda install -c pytorch faiss-cpu=1.7.4 mkl=2021 blas=1.0=mkl | |
conda install matplotlib scikit-learn | |
pip install h5py | |
- name: Run benchmark (size=${{ matrix.subset-size }}) | |
shell: bash -el {0} | |
run: | | |
conda activate faiss | |
chmod +x ./run_${{ matrix.subset-size }}.sh | |
./run_${{ matrix.subset-size }}.sh | |
python3 eval/eval.py --dir result | |
python3 eval/plot.py --size=${{ matrix.subset-size }} res.csv | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Results on ${{ matrix.subset-size }} | |
path: | | |
res.csv | |
result_${{ matrix.subset-size }}.png |