Skip to content

Commit

Permalink
Merge branch 'master' into coverity/fix-issues-in-istreams-executor
Browse files Browse the repository at this point in the history
  • Loading branch information
praasz authored Mar 1, 2024
2 parents 1cf81c4 + 45ce9e7 commit 0caaf48
Show file tree
Hide file tree
Showing 107 changed files with 1,688 additions and 561 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/job_python_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ jobs:
- name: PyTorch torch.export Layer Tests
if: ${{ fromJSON(inputs.affected-components).PyTorch_FE.test && runner.arch != 'ARM64' }} # Ticket: 126287
run: |
python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/pytorch_tests -m precommit_torch_export --junitxml=${INSTALL_TEST_DIR}/TEST-pytorch.xml
python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/pytorch_tests -n logical -m precommit_torch_export --junitxml=${INSTALL_TEST_DIR}/TEST-pytorch.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP32
Expand Down
26 changes: 16 additions & 10 deletions samples/js/node/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# OpenVINO™ JavaScript API examples of usage
# OpenVINO™ Node.js Bindings Examples of Usage

## Installation of openvino-node package
From *openvino/src/bindings/js/node* run `npm i` to download OpenVINO™ runtime, install requirements, build bindings and compile TypeScript code to JavaScript
## Install

On the *.nix systems run `source openvino/src/bindings/js/node/scripts/setupvars.sh` to add path to OpenVINO™ runtime libraries in `LD_LIBRARY_PATH` variable
To run samples, install dependencies first. In current directory run:
```bash
npm install
```

Note: Perform these steps also before running notebooks.

## Samples

- hello_classification
- hello_reshape_ssd
- classification_sample_async
Expand All @@ -17,10 +20,13 @@ Note: Perform these steps also before running notebooks.
Use [Node.js Notebooks (REPL)](https://marketplace.visualstudio.com/items?itemName=donjayamanne.typescript-notebook)
VSCode extension to run these notebook samples

Make sure that `LD_LIBRARY_PATH` variable contains path to OpenVINO runtime folder

- ./notebooks
- 001-hello-world.nnb
- 003-hello-segmentation.nnb
- 004-hello-detection.nnb
- 213-question-answering.nnb
- 001-hello-world.nnb
- 003-hello-segmentation.nnb
- 004-hello-detection.nnb
- 213-question-answering.nnb

## See Also

* [OpenVINO™ JavaScript API Developer Documentation](../../../src/bindings/js/docs/README.md#openvino-node-package-developer-documentation)
* [OpenVINO™ README](../../../README.md)
8 changes: 5 additions & 3 deletions samples/js/node/classification_sample_async/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Image Classification Async NodeJS Sample
# Image Classification Async Node.js Sample

Models with only 1 input and output are supported.

Run:
`node classification_sample_async.js -m *path_to_model_file* -i *path_to_img1* -i *path_to_img2* -d AUTO`
```bash
node classification_sample_async.js -m *path_to_model_file* -i *path_to_img1* -i *path_to_img2* -d AUTO
```

Other details see in /samples/python/classification_sample_async/README.md
Other details see in [../../../python/classification_sample_async/README.md](../../../python/classification_sample_async/README.md)
8 changes: 5 additions & 3 deletions samples/js/node/hello_classification/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Hello Classification NodeJS Sample
# Hello Classification Node.js Sample

Models with only 1 input and output are supported.

Run:
`node hello_classification.js *path_to_model_file* *path_to_img* AUTO`
```bash
node hello_classification.js *path_to_model_file* *path_to_img* AUTO
```

Other details see in /samples/python/hello_classification/README.md
Other details see in [../../../python/hello_classification/README.md](../../../python/hello_classification/README.md)
9 changes: 6 additions & 3 deletions samples/js/node/hello_reshape_ssd/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Hello Reshape SSD NodeJS Sample
# Hello Reshape SSD Node.js Sample

Models with only 1 input and output are supported.

Run:
`node hello_reshape_ssd.js *path_to_model_file* *path_to_img* AUTO`
```bash
node hello_reshape_ssd.js *path_to_model_file* *path_to_img* AUTO
```

Other details see in [../../../python/hello_reshape_ssd/README.md](../../../python/hello_reshape_ssd/README.md)

Other details see in /samples/python/hello_reshape_ssd/README.md
2 changes: 1 addition & 1 deletion src/bindings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ OpenVINO provides bindings for several languages:
* [c](./c)
* [python](./python)
* [javascript](./js)
* [nodejs](./js/nodejs)
* [node.js](./js/node)

## See also
* [OpenVINO™ README](../../README.md)
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/js/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# OpenVINO™ JavaScript API

- `./node` - openvino-node NPM package with Node.js bindings
- [./node](./node) - **openvino-node** npm package with OpenVINO Node.js bindings
83 changes: 81 additions & 2 deletions src/bindings/js/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,83 @@
# Javascript bindings
# OpenVINO™ JavaScript Bindings

## Folders

- `./docs` - documentation
- `./node` - openvino-node NPM package with Node.js bindings
- `./node` - openvino-node npm package

## openvino-node Package Developer Documentation

### Components

- [include](../node/include/) - header files for current API.
- [lib](../node/lib/) - TypeScript sources for current API.
- [src](../node/src/) - C++ sources for current API.
- [tests](../node/tests/) - tests directory for current API.

### Build

- Make sure that all submodules are updated:
```bash
git submodule update --init --recursive
```
- Create the *build* directory:
```bash
mkdir build && cd build
```
- Configure building of the binaries:
```bash
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_FASTER_BUILD=ON \
-DCPACK_GENERATOR=NPM \
-DENABLE_SYSTEM_TBB=OFF -UTBB* \
-DENABLE_TESTS=OFF \
-DENABLE_SAMPLES=OFF \
-DENABLE_WHEEL=OFF \
-DENABLE_PYTHON=OFF \
-DENABLE_INTEL_GPU=OFF \
-DCMAKE_INSTALL_PREFIX=../src/bindings/js/node/bin \
..
```
- Build the bindings:
```bash
cmake --build . --config Release --verbose -j4
```
- Install binaries for the *openvino-node* package:
```bash
cmake --install .
```
- Navigate to the *npm* package folder:
```bash
cd ../src/bindings/js/node
```
- Now, you can install dependencies packages and transpile ts to js code:
```bash
npm install
```
- Run tests to make sure that **openvino-node** has been built successfully:
```bash
npm run test
```

## Usage

- Add the **openvino-node** package to your project by specifying it in **package.json**:
```json
"openvino-node": "file:*path-to-current-directory*"
```
- Make sure to require it:
```js
const { addon: ov } = require('openvino-node');
```

## Samples

[OpenVINO™ Node.js Bindings Examples of Usage](../../../../samples/js/node/README.md)

## See Also

* [OpenVINO™ README](../../../../README.md)
* [OpenVINO™ Core Components](../../../README.md)
* [OpenVINO™ JavaScript API](../README.md)
* [OpenVINO™ Node.js Bindings](../node/README.md)
1 change: 1 addition & 0 deletions src/bindings/js/node/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ include
lib
src
tests
thirdparty

.eslintrc.js
CMakeLists.txt
Expand Down
71 changes: 28 additions & 43 deletions src/bindings/js/node/README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,35 @@
# OpenVINO Node.js API

## Components

- [include](./include/) - header files for current API.
- [lib](./lib/) - TypeScript sources for current API.
- [src](./src/) - C++ sources for current API.
- [tests](./tests/) - tests directory for current API.

## Build

- Make sure that all submodules are updated `git submodule update --init --recursive`
- Create build dir `mkdir build && cd build`
- Configure binaries building:
```bash
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_FASTER_BUILD=ON \
-DCPACK_GENERATOR=NPM \
-DENABLE_SYSTEM_TBB=OFF -UTBB* \
-DENABLE_TESTS=OFF \
-DENABLE_SAMPLES=OFF \
-DENABLE_WHEEL=OFF \
-DENABLE_PYTHON=OFF \
-DENABLE_INTEL_GPU=OFF \
-DCMAKE_INSTALL_PREFIX=../src/bindings/js/node/bin \
..
```
- Build bindings:
`cmake --build . --config Release --verbose -j4`
- Install binaries for openvino-node package:
`cmake --install .`
- Go to npm package folder `cd ../src/bindings/js/node`
- Now you can install dependencies packages and transpile ts to js code. Run `npm install`
- Run tests `npm run test` to make sure that **openvino-node** built successfully
# OpenVINO™ Node.js Bindings

Use OpenVINO JavaScript API for your Node.js application.

## Usage

- Add `openvino-node` package in your project, specify in **package.json**: `"openvino-node": "file:*path-to-current-directory*"`
- Require by: `const ov = require('openvino-node');`
Install the **openvino-node** package:
```bash
npm install openvino-node
```

Use the **openvino-node** package:
```js
const { addon: ov } = require('openvino-node');
```

## Build From Sources

For more details, refer to the [OpenVINO™ JavaScript API Developer Documentation](https://github.com/openvinotoolkit/openvino/blob/master/src/bindings/js/docs/README.md#openvino-node-package-developer-documentation)

## Documentation & Samples

- [OpenVINO™ Node.js API](https://docs.openvino.ai/2024/api/nodejs_api/nodejs_api.html)
- [OpenVINO™ Node.js Bindings Examples of Usage](https://github.com/openvinotoolkit/openvino/blob/master/samples/js/node/README.md)

## Samples
## See Also

[Samples & notebooks of OpenVINO Node.js API](../../../../samples/js/node/README.md)
* [OpenVINO™ README](https://github.com/openvinotoolkit/openvino/blob/master/README.md)
* [OpenVINO™ Core Components](https://github.com/openvinotoolkit/openvino/blob/master/src/README.md)
* [OpenVINO™ Python API](https://github.com/openvinotoolkit/openvino/blob/master/src/bindings/python/README.md)
* [OpenVINO™ Other Bindings](https://github.com/openvinotoolkit/openvino/blob/master/src/bindings/README.md)

## See also
[License](https://github.com/openvinotoolkit/openvino/blob/master/LICENSE)

* [OpenVINO™ README](../../../../README.md)
* [OpenVINO™ Core Components](../../../README.md)
* [OpenVINO™ JavaScript API](../README.md)
Copyright © 2018-2024 Intel Corporation
4 changes: 2 additions & 2 deletions src/bindings/js/node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0caaf48

Please sign in to comment.