Skip to content

Add python version of tilers #386

Add python version of tilers

Add python version of tilers #386

Workflow file for this run

name: Test - Accuracy
on:
workflow_dispatch:
schedule:
- cron: '11 1 * * *' # run every day at 1:11
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test_accuracy:
strategy:
fail-fast: false
matrix:
python-version: [3.8]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Create and start a virtual environment
run: |
python -m venv venv
source venv/bin/activate
- name: Install dependencies
run: |
source venv/bin/activate
python -m pip install --upgrade pip
pip install model_api/python/[tests] --extra-index-url https://download.pytorch.org/whl/cpu
- name: Prepare test data
run: |
source venv/bin/activate
python tests/python/accuracy/prepare_data.py -d data
- name: Run Python Test
run: |
source venv/bin/activate
pytest --data=./data tests/python/accuracy/test_accuracy.py
- name: Install CPP ependencies
run: |
sudo bash model_api/cpp/install_dependencies.sh
- name: Build CPP Test
run: |
mkdir build && cd build
cmake ../tests/cpp/accuracy/ -DCMAKE_CXX_FLAGS=-Werror
make -j
- name: Run CPP Test
run: |
build/test_accuracy -d data -p tests/python/accuracy/public_scope.json