openvino/samples/python/benchmark/bert_benchmark
Ilya Lavrenov d19307ba13
Ported changes from master (#22193)
* [CI] [GHA] Introduce JS API as a part of the existing workflows (#21898)

* add js api to linux

* try inside the ov repo

* use rel path

* use a separate job for js api

* correct command formatting

* add missing var

* use spacing

* mv js building

* add node installing

* add to windows

* check pwsh and cmd running npm

* add smart CI conditions; disable for win

* use node version as env var

* extract js job into a separate workflow, add to other *nix

* fix input name

* Activate js bindings tests for arm64

* upload ov js package

* correct formatting

* add missing syntax

---------

Co-authored-by: Vishniakov Nikolai <nikolai.vishniakov@intel.com>

* Cmake Python build option flags should be added to the command in step #3 not step #4. I fixed the typo (#21993)

* [CI] [GHA] [JS API] Remove explicit default values settings in Linux ARM64 `cmake` (#22019)

* rm explicit default values settings

* Activate mac arm64 js api check

* Specify test run

---------

Co-authored-by: Vishniakov Nikolai <nikolai.vishniakov@intel.com>

* [OV JS] Activate validation for mac x86 (#22035)

* Extend validation for mac x86

* Remove extra params

* fixed broken doc links (#22088)

Co-authored-by: Przemyslaw Wysocki <przemyslaw.wysocki@intel.com>

* [GHA] Update MO deps (#22130)

* [GHA] Update MO deps

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Update .github/components.yml

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Avoid DOWNLOAD_EXTRACT_TIMESTAMP warning (#22135)

* Avoid DOWNLOAD_EXTRACT_TIMESTAMP warning

* Change applying policy condition

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

---------

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

* Fixed API validator search (#22136)

* [OV JS] Conditional enabling of JS API (#22139)

* Disable js api building for vcpkg

* Disable JS API by default

* Add disable JS API conditions in features.cmake

* Update cmake/features.cmake

* Update src/bindings/js/CMakeLists.txt

---------

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

* Fixed GHSA-h5c8-rqwp-cp95 (#22159)

* [PyOV][SAMPLES] Fix bugbear issue B038 (#22183)

* Fixed compilation on GHA CI

* Decrease number of workers for ONNX Model tests to prevent OOM kills (#22243)

* Decrease number of workers for ONNX Model tests to prevent OOM kills

* Try to use "-n auto" also

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
Co-authored-by: Andrei Kashchikhin <andrey.kashchikhin@intel.com>
Co-authored-by: Vishniakov Nikolai <nikolai.vishniakov@intel.com>
Co-authored-by: fredrickomondi <omondifredrick@gmail.com>
Co-authored-by: Santhosh Mamidisetti <92091342+SANTHOSH-MAMIDISETTI@users.noreply.github.com>
Co-authored-by: Przemyslaw Wysocki <przemyslaw.wysocki@intel.com>
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
Co-authored-by: Jan Iwaszkiewicz <jan.iwaszkiewicz@intel.com>
Co-authored-by: Andrey Babushkin <andrey.babushkin@intel.com>
2024-01-19 16:46:19 +04:00
..
README.md Port 21661 Merge Samples Articles Language Versions (#22187) 2024-01-17 13:27:12 +04:00
bert_benchmark.py Ported changes from master (#22193) 2024-01-19 16:46:19 +04:00
requirements.txt [PyOV] Add lower bound to `datasets` (#20674) 2023-10-30 11:24:37 +00:00

README.md

Bert Benchmark Python Sample

This sample demonstrates how to estimate performance of a Bert model using Asynchronous Inference Request API. Unlike demos this sample doesn't have configurable command line arguments. Feel free to modify sample's source code to try out different options.

For more detailed information on how this sample works, check the dedicated article

The sample downloads a model and a tokenizer, export the model to onnx, reads the exported model and reshapes it to enforce dynamic input shapes, compiles the resulting model, downloads a dataset and runs benchmarking on the dataset.

Requirements

The following Python API is used in the application:

Feature API Description
OpenVINO Runtime Version [openvino.runtime.get_version] Get Openvino API version.
Basic Infer Flow [openvino.runtime.Core], Common API to do inference: compile a model.
[openvino.runtime.Core.compile_model]
Asynchronous Infer [openvino.runtime.AsyncInferQueue], Do asynchronous inference.
[openvino.runtime.AsyncInferQueue.start_async],
[openvino.runtime.AsyncInferQueue.wait_all]
Model Operations [openvino.runtime.CompiledModel.inputs] Get inputs of a model.