added plot.py #5
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: 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: '*' | |
| jobs: | |
| test: | |
| name: ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| 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 | |
| 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 | |
| conda install matplotlib | |
| pip install h5py | |
| - name: Run benchmark | |
| shell: bash -el {0} | |
| run: | | |
| conda activate faiss | |
| python3 search.py --task task1 | |
| python3 search.py --task task2 | |
| python3 eval.py res.csv | |
| python3 plot.py --task task1 res.csv | |
| python3 plot.py --task task2 res.csv | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: Results | |
| path: | | |
| res.csv | |
| result_task1.png | |
| result_task2.png |