Skip to content

faiss_hnsw support INT8 #1990

faiss_hnsw support INT8

faiss_hnsw support INT8 #1990

Workflow file for this run

name: Unit Test
# This workflow is triggered on pushes or pull request to the repository.
on:
push:
branches:
- main
pull_request:
# File paths to consider in the event. Optional; defaults to all.
paths:
- "include/**"
- "python/**"
- "src/**"
- "thirdparty/**"
- "benchmark/**"
- "cmake/**"
- "!cmake/libs/libcardinal.cmake"
- ".github/workflows/ut.yaml"
- "CMakeLists.txt"
- "!**.md"
- "tests/**"
jobs:
ut:
name: ut on ubuntu-22.04
runs-on: ubuntu-22.04
timeout-minutes: 180
strategy:
fail-fast: true
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'none'
- name: Install Dependency
run: |
sudo apt update \
&& sudo apt install -y cmake g++ gcc libopenblas-openmp-dev libcurl4-openssl-dev libaio-dev libevent-dev python3 python3-pip lcov \
&& pip3 install conan==1.61.0 \
&& conan remote add default-conan-local https://milvus01.jfrog.io/artifactory/api/conan/default-conan-local
- name: Download Conan Artifact
uses: actions/download-artifact@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# this run-id is got from a successful "Upload Conan Artifact" workflow run on 2024/09/02,
# it will be valid till 2024/11/30
run-id: 10662401212
name: conan-asan
path: downloaded
continue-on-error: true
- name: Unpack Conan Data
run: |
if [ -f downloaded/conan.tar.gz ]; then
echo "download conan.tar.gz successfully"
cd downloaded \
&& tar xfz conan.tar.gz \
&& rm -rf conan.tar.gz /home/runner/.conan \
&& mv ./.conan /home/runner/.conan
else
echo "download conan.tar.gz fail"
fi
- name: Build
run: |
mkdir build && cd build \
&& conan install .. --build=missing -s build_type=Release -o with_ut=True -o with_diskann=True -o with_asan=True -o with_coverage=True \
&& conan build ..
# - name: Pack Conan Data
# run: |
# cd /home/runner && tar cfz conan.tar.gz .conan/
# - name: Upload Conan Artifact
# uses: actions/upload-artifact@v4
# with:
# name: conan-asan
# path: /home/runner/conan.tar.gz
- name: Run
run: |
./scripts/run_codecov.sh
- name: Archive result
uses: actions/upload-artifact@v4
with:
name: codecov-result
path: |
./lcov_output.info
*.info
*.out
codecov:
name: Upload Code Coverage
needs: [ut]
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- name: Download code coverage results
uses: actions/download-artifact@v4.1.0
with:
name: codecov-result
- name: Display structure of code coverage results
run: |
ls -lah
- name: Upload coverage to Codecov
if: "github.repository == 'zilliztech/knowhere'"
uses: codecov/codecov-action@v4
id: upload_cov
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./lcov_output.info
name: ubuntu-22.04-unittests
fail_ci_if_error: true
- name: Retry Upload coverage to Codecov
if: "${{ failure() }} && github.repository == 'zilliztech/knowhere'"
uses: codecov/codecov-action@v4
id: retry_upload_cov
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./lcov_output.info
name: ubuntu-22.04-unittests
fail_ci_if_error: true
swig-build:
name: python3 wheel
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'none'
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install Dependency
run: |
sudo apt update \
&& sudo apt install -y cmake g++ gcc libopenblas-openmp-dev libaio-dev libcurl4-openssl-dev libevent-dev libgflags-dev python3 python3-pip python3-setuptools \
&& pip3 install conan==1.61.0 pytest faiss-cpu numpy wheel \
&& pip3 install bfloat16 \
&& conan remote add default-conan-local https://milvus01.jfrog.io/artifactory/api/conan/default-conan-local
- name: Download Conan Artifact
uses: actions/download-artifact@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# this run-id is got from a successful "Upload Conan Artifact" workflow run on 2024/09/02,
# it will be valid till 2024/11/30
run-id: 10662401212
name: conan-wheel
path: downloaded
continue-on-error: true
- name: Unpack Conan Data
run: |
if [ -f downloaded/conan.tar.gz ]; then
echo "download conan.tar.gz successfully"
cd downloaded \
&& tar xfz conan.tar.gz \
&& rm -rf conan.tar.gz /home/runner/.conan \
&& mv ./.conan /home/runner/.conan
else
echo "download conan.tar.gz fail"
fi
- name: Build
run: |
mkdir build \
&& cd build \
&& conan install .. --build=missing -o with_diskann=True -s compiler.libcxx=libstdc++11 -s build_type=Release \
&& conan build ..
# - name: Pack Conan Data
# run: |
# cd /home/runner && tar cfz conan.tar.gz .conan/
# - name: Upload Conan Artifact
# uses: actions/upload-artifact@v4
# with:
# name: conan-wheel
# path: /home/runner/conan.tar.gz
- name: Swig Build
run: |
cd python && python3 setup.py bdist_wheel
- name: Install pips
run: |
cd python && pip3 install dist/*.whl
- name: Test
run: |
pytest tests/python/test_index_with_random.py