Skip to content

Commit

Permalink
Align folder structure for Benchmark Tool (openvinotoolkit#6625)
Browse files Browse the repository at this point in the history
* openvino namespace for benchmark tool

* change readme wording

* remove duplicated  README.md
  • Loading branch information
slyubimt authored and akuporos committed Sep 29, 2021
1 parent c3aa52a commit 63fa6a2
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 24 deletions.
6 changes: 5 additions & 1 deletion tools/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
openvino.tools.benchmark.log
*.log
*.egg-info/
*.egg
__pycache__/
build/
dist/
10 changes: 3 additions & 7 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if(ENABLE_PYTHON)
# creates a copy inside bin directory for developers to have ability running python benchmark_app
add_custom_target(${TARGET_NAME} ALL
COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTHON_BRIDGE_OUTPUT_DIRECTORY}/tools
COMMAND ${CMAKE_COMMAND} -E copy_directory ${OpenVINO_SOURCE_DIR}/tools/benchmark ${PYTHON_BRIDGE_OUTPUT_DIRECTORY}/tools/benchmark
COMMAND ${CMAKE_COMMAND} -E copy_directory ${OpenVINO_SOURCE_DIR}/tools/benchmark_tool/openvino/tools/benchmark ${PYTHON_BRIDGE_OUTPUT_DIRECTORY}/tools/benchmark
)

ie_cpack_add_component(python_tools_${PYTHON_VERSION})
Expand All @@ -37,14 +37,10 @@ if(ENABLE_PYTHON)
DESTINATION deployment_tools/tools
COMPONENT python_tools)

install(FILES README.md
DESTINATION python/${PYTHON_VERSION}/openvino/tools
COMPONENT python_tools_${PYTHON_VERSION})

install(DIRECTORY benchmark
install(DIRECTORY benchmark_tool/openvino/tools/benchmark
DESTINATION python/${PYTHON_VERSION}/openvino/tools
USE_SOURCE_PERMISSIONS
COMPONENT python_tools_${PYTHON_VERSION})

ie_cpack(python_tools python_tools_${PYTHON_VERSION})
endif()
18 changes: 11 additions & 7 deletions tools/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# OpenVINO™ Python* openvino.tools package
# OpenVINO™ Python* development tools

## General
`openvino.tools` package includes:
OpenVINO includes following tools:
* openvino.tools.benchmark

Please, refer to https://docs.openvinotoolkit.org for details.

## Installation
Choose necessary Python\* version and define `PYTHONPATH` environment variable.

### Prerequisites

Install prerequisites first:

#### 1. Python

**openvino.tools** is **Python 3** library. Install it first:
Install **Python** prerequisites:

- [Python3][python3]
- [setuptools][setuptools]

Run following command to install these prerequisites on Ubuntu*:
```bash
sudo apt-get install python3 python3-dev python3-setuptools python3-pip
```
Expand Down Expand Up @@ -49,13 +49,17 @@ Virtual environment can be deactivated using command
deactivate
```

#### 2. Install package prerequisites
#### 2. Install packages

The next step is installing package prerequisites.
You can install tools by specifying path to tool with `setup.py` in `pip install` command:

```bash
python3 -m pip install -r benchmark/requirements.txt
python3 -m pip install <tools_folder>/
```
For example, to install Benchmark Tool, use the following command:
```bash
python3 -m pip install benchmark_tool/
```

### Configuration

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 4 additions & 9 deletions tools/setup.py → tools/benchmark_tool/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,15 @@
"""
from setuptools import setup, find_packages

with open('README.md', 'r', encoding='utf-8') as f:
with open('openvino/tools/benchmark/README.md', 'r', encoding='utf-8') as f:
long_description = f.read()

with open('benchmark/requirements.txt') as f:
with open('openvino/tools/benchmark/requirements.txt') as f:
required = f.read().splitlines()
required.extend(['openvino'])

pkgs = find_packages()
NAMESPACE = 'openvino.tools'

setup(
name='openvino-tools',
name='benchmark_tool',
version='0.0.0',
author='Intel® Corporation',
license='OSI Approved :: Apache Software License',
Expand All @@ -39,9 +36,7 @@
'OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
],
package_dir={''.join((NAMESPACE, '.', pkg)) : pkg.replace('.', '/')
for pkg in pkgs},
packages=[''.join((NAMESPACE, '.', pkg)) for pkg in pkgs],
packages=find_packages(),
install_requires=required,
python_requires='>=3.6',
)

0 comments on commit 63fa6a2

Please sign in to comment.