Skip to content

Commit abf972d

Browse files
Merge branch 'master' of github.com:openvinotoolkit/model_api into ashwin/add_docs
2 parents 0da4468 + 903070f commit abf972d

File tree

25 files changed

+1045
-742
lines changed

25 files changed

+1045
-742
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Once you're done, someone will review your PR shortly (see the section "Who can
1414

1515
Fixes # (issue)
1616

17-
1817
## Before submitting
18+
1919
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
2020
- [ ] Did you make sure to update the documentation with your changes?
2121
- [ ] Did you write any new necessary tests?

.github/workflows/pre_commit.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Pre-Commit Checks
2+
permissions: read-all
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
types:
10+
- opened
11+
- reopened
12+
- synchronize
13+
- ready_for_review
14+
workflow_dispatch: # run on request (no need for PR)
15+
16+
jobs:
17+
Code-Quality-Checks:
18+
runs-on: ubuntu-20.04
19+
steps:
20+
- name: CHECKOUT REPOSITORY
21+
uses: actions/checkout@v4
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.10"
26+
- name: Install dependencies
27+
run: pip install 'model_api/python/.[full]'
28+
- name: Run pre-commit checks
29+
run: pre-commit run --all-files

.github/workflows/test_accuracy.yml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,38 @@ jobs:
88
test_accuracy:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
12-
- uses: actions/setup-python@v4
13-
with:
14-
python-version: 3.9
15-
cache: pip
16-
- name: Create and start a virtual environment
17-
run: |
18-
python -m venv venv
19-
source venv/bin/activate
20-
- name: Install dependencies
21-
run: |
22-
source venv/bin/activate
23-
python -m pip install --upgrade pip
24-
pip install model_api/python/[tests] --extra-index-url https://download.pytorch.org/whl/cpu
25-
- name: Prepare test data
26-
run: |
27-
source venv/bin/activate
28-
python tests/python/accuracy/prepare_data.py -d data
29-
- name: Run Python Test
30-
run: |
31-
source venv/bin/activate
32-
pytest --data=./data tests/python/accuracy/test_accuracy.py
33-
DATA=data pytest --data=./data tests/python/accuracy/test_YOLOv8.py
34-
- name: Install CPP ependencies
35-
run: |
36-
sudo bash model_api/cpp/install_dependencies.sh
37-
- name: Build CPP Test
38-
run: |
39-
mkdir build && cd build
40-
cmake ../tests/cpp/accuracy/ -DCMAKE_CXX_FLAGS=-Werror
41-
make -j
42-
- name: Run CPP Test
43-
run: |
44-
build/test_accuracy -d data -p tests/python/accuracy/public_scope.json
45-
DATA=data build/test_YOLOv8
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-python@v4
13+
with:
14+
python-version: 3.9
15+
cache: pip
16+
- name: Create and start a virtual environment
17+
run: |
18+
python -m venv venv
19+
source venv/bin/activate
20+
- name: Install dependencies
21+
run: |
22+
source venv/bin/activate
23+
python -m pip install --upgrade pip
24+
pip install model_api/python/[tests] --extra-index-url https://download.pytorch.org/whl/cpu
25+
- name: Prepare test data
26+
run: |
27+
source venv/bin/activate
28+
python tests/python/accuracy/prepare_data.py -d data
29+
- name: Run Python Test
30+
run: |
31+
source venv/bin/activate
32+
pytest --data=./data tests/python/accuracy/test_accuracy.py
33+
DATA=data pytest --data=./data tests/python/accuracy/test_YOLOv8.py
34+
- name: Install CPP ependencies
35+
run: |
36+
sudo bash model_api/cpp/install_dependencies.sh
37+
- name: Build CPP Test
38+
run: |
39+
mkdir build && cd build
40+
cmake ../tests/cpp/accuracy/ -DCMAKE_CXX_FLAGS=-Werror
41+
make -j
42+
- name: Run CPP Test
43+
run: |
44+
build/test_accuracy -d data -p tests/python/accuracy/public_scope.json
45+
DATA=data build/test_YOLOv8

0 commit comments

Comments
 (0)