Skip to content

Commit 6a6443c

Browse files
authored
Fixes in documentation (openvinotoolkit#920)
* Fixes in documentation Change TF version in Ensemble example since 1.15 is no longer available in pip3. * Update docs/developer_guide.md
1 parent dde78fa commit 6a6443c

File tree

7 files changed

+29
-30
lines changed

7 files changed

+29
-30
lines changed

docs/demultiplexing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Demultiplexing in Directed Acyclic Graph Scheduler
22

33
## Pipeline branching
4-
Directed Acyclic Graph Scheduler allows creating pipelines with optional parameter `demultiply_count: `N` which adds ability to any node to slice outputs into `N` separate sub outputs and branch pipeline execution into `N` sub pipelines. Following nodes will be executed by event loop `N` times independently from each other and results will be gathered and packed into one output just before sending a response. Additionally `gather_from_node: <node_name>` parameter can be used to specify gathering at any point in Directed Acyclic Graph.`demultiply_count` node parameter value has to match first dimension of all node outputs. All node outputs have to have at least 2 dimensions.
4+
Directed Acyclic Graph Scheduler allows creating pipelines with optional parameter `demultiply_count: N` which adds ability to any node to slice outputs into `N` separate sub outputs and branch pipeline execution into `N` sub pipelines. Following nodes will be executed by event loop `N` times independently from each other and results will be gathered and packed into one output just before sending a response. Additionally `gather_from_node: <node_name>` parameter can be used to specify gathering at any point in Directed Acyclic Graph.`demultiply_count` node parameter value has to match first dimension of all node outputs. All node outputs have to have at least 2 dimensions.
55

66
## Basic demultiplexer example and metadata explanation
77
This example contains 2 consecutive models:
@@ -12,7 +12,7 @@ This example has no `gather_from_node` parameter specified in config.json config
1212

1313
![diagram](demultiplexer.svg)
1414

15-
Example configuration file with one demultiplexer:
15+
Example configuration file with one demultiplexer (remove everything after arrows in lines containing those):
1616
```
1717
{
1818
"model_config_list": [

docs/developer_guide.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ In-case of problems, see <a href="#debug">Debugging</a>.
2727
### Step 1: Compile source code
2828
1. Build the development `openvino/model_server-build` Docker* image
2929
```bash
30-
make docker_build
30+
make docker_build
31+
```
3132
or
33+
```
3234
make docker_build DLDT_PACKAGE_URL=<URL>
3335
```
3436
> **Note**: URL to OpenVINO Toolkit package can be received after registration on [OpenVINO&trade; Toolkit website](https://software.intel.com/en-us/openvino-toolkit/choose-download)
@@ -63,8 +65,8 @@ In-case of problems, see <a href="#debug">Debugging</a>.
6365
* With a Docker cache :
6466

6567
```bash
66-
OVMS_CPP_DOCKER_IMAGE=<unique_image_name> make docker_build
67-
OVMS_CPP_DOCKER_IMAGE=<unique_image_name> make test_functional
68+
OVMS_CPP_DOCKER_IMAGE=<replace_with_unique_image_name> make docker_build
69+
OVMS_CPP_DOCKER_IMAGE=<replace_with_unique_image_name> make test_functional
6870
OVMS_CPP_CONTAINTER_PORT=<unique_network_port> make test_perf
6971
```
7072

@@ -265,10 +267,10 @@ Two debugging options are available. Click on the required option :
265267
```
266268
docker run -it --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v ${PWD}:/ovms -p 9178:9178 --entrypoint bash openvino/model_server-build:latest
267269
```
268-
3. Recompile the OpenVINO Model Server with debug symbols using command.
270+
3. Assuming resnet50 model is prepared for OVMS in /models catalog recompile the OpenVINO Model Server with debug symbols using command:
269271
```
270272
[root@72dc3b874772 ovms]# bazel build //src:ovms -c dbg
271-
[root@72dc3b874772 ovms]# gdb --args ./bazel-bin/src/ovms --model_name resnet --model_path /model
273+
[root@72dc3b874772 ovms]# gdb --args ./bazel-bin/src/ovms --model_name resnet --model_path /models
272274
```
273275
> **NOTE**: For best results, use the makefile parameter `BAZEL_BUILD_TYPE=dbg` to build the dependencies in debug mode as shown above
274276

docs/east_ocr.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Below is depicted the graph implementing a complete OCR pipelines.
1212

1313
![OCR graph](east_ocr.png)
1414

15-
It includes the following Nodes:
15+
It includes the following nodes:
1616
- Model east-resnet50 - inference execution which takes the user image as input. It returns two outputs including information about all detected boxes, their location and scores.
1717
- Custom node east_ocr - it includes C++ implementation of east-resnet50 model results processing. It analyses the detected boxes coordinates, filters the results
1818
based on the configurable score level threshold and and applies non-max suppression algorithm to remove overlaping boxes. Finally the custom node east-ocr crops all detected boxes
@@ -35,7 +35,7 @@ Clone github repository:
3535
git clone https://github.com/argman/EAST
3636
cd EAST
3737
```
38-
Download and unzip the file east_icdar2015_resnet_v1_50_rbox.zip to EAST folder with the github repository.
38+
Download and unzip the file east_icdar2015_resnet_v1_50_rbox.zip as instructed in readme.md file to EAST folder with the github repository.
3939
```bash
4040
unzip ./east_icdar2015_resnet_v1_50_rbox.zip
4141
```

docs/ensemble_scheduler.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This document presents ensemble models as an example of [DAG Scheduler](dag_sche
2525
```
2626
~$ virtualenv -p python3 .tf_env
2727
~$ source .tf_env/bin/activate
28-
~$ pip3 install tensorflow==1.15
28+
~$ pip3 install tensorflow==2.3.1
2929
```
3030
3. Prepare argmax model with `(1, 1001)` input shapes to match output of googlenet and resnet output shapes. Generated model will sum inputs and calculate the index with the highest value. The model output will indicate the most likely predicted class from the ImageNet* dataset. <a name="point-3"></a>
3131
```
@@ -39,56 +39,53 @@ This document presents ensemble models as an example of [DAG Scheduler](dag_sche
3939
~$ docker run -u $(id -u):$(id -g) -v ~/models:/models:rw openvino/ubuntu18_dev:latest deployment_tools/open_model_zoo/tools/downloader/converter.py --name resnet-50-tf --download_dir /models --output_dir /models --precisions FP32
4040
4141
~$ docker run -u $(id -u):$(id -g) -v ~/models:/models:rw openvino/ubuntu18_dev:latest deployment_tools/model_optimizer/mo_tf.py --input input1,input2 --input_shape [1,1001],[1,1001] --saved_model_dir /models/public/argmax/saved_model/ --output_dir /models/public/argmax/1
42-
~$ mv ~/models/public/googlenet-v2-tf/FP32 ~/models/public/googlenet-v2-tf/1 && mv ~/models/public/resnet-50-tf/FP32 ~/models/public/resnet-50-tf/1
42+
~$ mkdir -p ovms_models/googlenet-v2-tf/1
43+
~$ mkdir -p ovms_models/resnet-50-tf/1
44+
~$ mkdir -p ovms_models/argmax/1
45+
~$ cp ~/models/public/googlenet-v2-tf/FP32/googlenet-v2-tf.{bin,xml} ~/ovms_models/googlenet-v2-tf/1/
46+
~$ cp ~/models/public/resnet-50-tf/FP32/resnet-50-tf.{bin,xml} ~/ovms_models/resnet-50-tf/1/
47+
~$ cp ~/models/public/argmax/1/saved_model.{bin,xml} ~/ovms_models/argmax/1/
4348
4449
~$ tree models/public
45-
models/public
50+
ovms_models
4651
├── argmax
4752
│ ├── 1
4853
│ │ ├── saved_model.bin
49-
│ │ ├── saved_model.mapping
5054
│ │ └── saved_model.xml
51-
│ └── saved_model
52-
│ ├── saved_model.pb
53-
│ └── variables
5455
├── googlenet-v2-tf
5556
│ ├── 1
5657
│ │ ├── googlenet-v2-tf.bin
57-
│ │ ├── googlenet-v2-tf.mapping
5858
│ │ └── googlenet-v2-tf.xml
59-
│ └── inception_v2.frozen.pb
6059
└── resnet-50-tf
6160
├── 1
6261
│ ├── resnet-50-tf.bin
63-
│ ├── resnet-50-tf.mapping
6462
│ └── resnet-50-tf.xml
65-
└── resnet_v1-50.pb
6663
```
6764

6865
### Step 2: Define required models and pipeline <a name="define-models"></a>
6966
Pipelines need to be defined in configuration file to use them. The same configuration file is used to define served models and served pipelines.
7067

7168
Use the config.json as given below
7269
```
73-
~$ cat models/config.json
70+
~$ cat ovms_models/config.json
7471
{
7572
"model_config_list": [
7673
{
7774
"config": {
7875
"name": "googlenet",
79-
"base_path": "/models/public/googlenet-v2-tf"
76+
"base_path": "/models/googlenet-v2-tf"
8077
}
8178
},
8279
{
8380
"config": {
8481
"name": "resnet",
85-
"base_path": "/models/public/resnet-50-tf"
82+
"base_path": "/models/resnet-50-tf"
8683
}
8784
},
8885
{
8986
"config": {
9087
"name": "argmax",
91-
"base_path": "/models/public/argmax"
88+
"base_path": "/models/argmax"
9289
}
9390
}
9491
],
@@ -155,7 +152,7 @@ In `model_config_list` section, three models are defined as usual. We can refer
155152

156153
1. Run command to start model server
157154
```
158-
~$ docker run --rm -v ~/models/:/models:ro -p 9100:9100 -p 8100:8100 openvino/model_server:latest --config_path /models/config.json --port 9100 --rest_port 8100
155+
~$ docker run --rm -v ~/ovms_models/:/models:ro -p 9100:9100 -p 8100:8100 openvino/model_server:latest --config_path /models/config.json --port 9100 --rest_port 8100
159156
```
160157

161158
### Step 4: Requesting the service

docs/model_version_policy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Accepted values :
1515

1616
Examples:
1717

18-
{"latest": { "num_versions":2 }} # server will serve only 2 latest versions of model
18+
{"latest": { "num_versions": 2 }} # server will serve only 2 latest versions of model
1919

20-
{"specific": { "versions":[1, 3] }} # server will serve only 1 and 3 versions of given model
20+
{"specific": { "versions": [1, 3] }} # server will serve only 1 and 3 versions of given model
2121

2222
{"all": {}} # server will serve all available versions of given model
2323

example_client/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,9 @@ usage: get_serving_meta.py [-h] [--grpc_address GRPC_ADDRESS]
397397
| Argument | Description |
398398
| :--- | :---- |
399399
| -h, --help | Show help message and exit|
400-
| --rest_url REST_URL | Specify url to REST API service. Default:http://localhost|
400+
| --rest_url REST_URL | Specify url to REST API service. Default: http://localhost|
401401
| --rest_port REST_PORT | Specify port to REST API service. Default: 9000|
402-
| --model_name MODEL_NAME| Model name to query, must be same as is in service. Default : resnet|
402+
| --model_name MODEL_NAME| Model name to query, must be same as is in service. Default: resnet|
403403
| --model_version MODEL_VERSION | Model version to query - must be numerical. List all version if omitted|
404404

405405
- Usage Example

tests/models/argmax_sum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# limitations under the License.
1515
#
1616

17-
import tensorflow as tf
17+
import tensorflow.compat.v1 as tf
1818
from tensorflow.python.saved_model import signature_constants
1919
from tensorflow.python.saved_model import tag_constants
2020
import numpy as np

0 commit comments

Comments
 (0)