Skip to content

Commit ab4cf52

Browse files
committed
Don't embed into openvino namespace
Ticket 134085 @sovrasov, this requires updating Geti Python part Merge after openvinotoolkit#163
1 parent a1e3679 commit ab4cf52

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+18
-10321
lines changed

.github/workflows/test_precommit.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ jobs:
1212
run: git --no-pager diff --check $(git hash-object -t tree /dev/null)
1313
- name: Prohibit non ASCII chars in file names
1414
run: test $(git diff --name-only --diff-filter=A -z $(git hash-object -t tree /dev/null) | LC_ALL=C tr -d '[ -~]\0' | wc -c) == 0
15-
- name: "! git grep -n '[^ -~]' -- ':(exclude)model_api/python/openvino/model_api/README.md'"
16-
run: "! git grep -n '[^ -~]' -- ':(exclude)model_api/python/openvino/model_api/README.md'"
15+
- run: "! git grep -n '[^ -~]' -- ':(exclude)model_api/python/model_api/README.md'"
1716
- uses: actions/setup-python@v4
1817
with:
1918
python-version: 3.8
@@ -30,7 +29,7 @@ jobs:
3029
- name: Check style with black
3130
run: |
3231
source venv/bin/activate
33-
black --extend-exclude model_api/python/openvino/__init__.py --check .
32+
black --check .
3433
- name: Check style with isort
3534
run: |
3635
source venv/bin/activate
@@ -173,7 +172,7 @@ jobs:
173172
run: |
174173
python -m pip install --upgrade pip
175174
python -m pip install model_api/python/[ovms,tests]
176-
python -c "from openvino.model_api.models import DetectionModel; DetectionModel.create_model('ssd_mobilenet_v1_fpn_coco').save('ovms_models/ssd_mobilenet_v1_fpn_coco/1/ssd_mobilenet_v1_fpn_coco.xml')"
175+
python -c "from model_api.models import DetectionModel; DetectionModel.create_model('ssd_mobilenet_v1_fpn_coco').save('ovms_models/ssd_mobilenet_v1_fpn_coco/1/ssd_mobilenet_v1_fpn_coco.xml')"
177176
docker run -d --rm -v $GITHUB_WORKSPACE/ovms_models/:/models -p 9000:9000 -p 8000:8000 openvino/model_server:latest --model_path /models/ssd_mobilenet_v1_fpn_coco/ --model_name ssd_mobilenet_v1_fpn_coco --port 9000 --rest_port 8000 --log_level DEBUG --target_device CPU
178177
python tests/cpp/precommit/prepare_data.py -d data -p tests/cpp/precommit/public_scope.json
179178
python examples/python/serving_api/run.py data/coco128/images/train2017/000000000009.jpg # detects 4 objects

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Model API searches for additional information required for model inference, data
4444
## Usage
4545
### Python
4646
```python
47-
from openvino.model_api.models import DetectionModel
47+
from model_api.models import DetectionModel
4848

4949
# Create a model (downloaded and cached automatically for OpenVINO Model Zoo models)
5050
# Use URL to work with served model, e.g. "localhost:9000/models/ssdlite_mobilenet_v2"

examples/cpp/synchronous_api/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This example demonstrates how to use a C++ API of OpenVINO Model API for synchro
2525
```
2626
- Download a model by running a Python code with Model API, see Python [exaple](../../python/synchronous_api/README.md):
2727
```python
28-
from openvino.model_api.models import DetectionModel
28+
from model_api.models import DetectionModel
2929
3030
model = DetectionModel.create_model("ssd_mobilenet_v1_fpn_coco",
3131
download_dir="tmp")

examples/python/asynchronous_api/run.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import sys
1919

2020
import cv2
21-
from openvino.model_api.models import DetectionModel
21+
from model_api.models import DetectionModel
2222

2323

2424
def main():

examples/python/serving_api/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This example demonstrates how to use a Python API of OpenVINO Model API for a re
1414
```
1515
- Download a model by running a Python code with Model API, see Python [exaple](../../python/synchronous_api/README.md) and resave a configured model at OVMS friendly folder layout:
1616
```python
17-
from openvino.model_api.models import DetectionModel
17+
from model_api.models import DetectionModel
1818
1919
DetectionModel.create_model("ssd_mobilenet_v1_fpn_coco").save("/home/user/models/ssd_mobilenet_v1_fpn_coco/1/ssd_mobilenet_v1_fpn_coco.xml")
2020
```

examples/python/serving_api/run.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import sys
1919

2020
import cv2
21-
from openvino.model_api.models import DetectionModel
21+
from model_api.models import DetectionModel
2222

2323

2424
def main():

examples/python/synchronous_api/run.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import sys
1919

2020
import cv2
21-
from openvino.model_api.models import (
21+
from model_api.models import (
2222
ClassificationModel,
2323
DetectionModel,
2424
SegmentationModel,

model_api/python/openvino/__init__.py

-62
This file was deleted.

model_api/python/openvino/model_api/README.md

-147
This file was deleted.

model_api/python/openvino/model_api/__init__.py

Whitespace-only changes.

model_api/python/openvino/model_api/adapters/__init__.py

-32
This file was deleted.

0 commit comments

Comments
 (0)