Add FastAPI inference example using OpenVINO (Windows-friendly)#34004
Add FastAPI inference example using OpenVINO (Windows-friendly)#34004uvv-01 wants to merge 10000 commits intoopenvinotoolkit:masterfrom
Conversation
…3494) ### Details: - *Propagate `model_dir` value from `GraphIteratorProto` to `Tensor`* ### Tickets: - *CVS-179053* --------- Signed-off-by: Maxim Vafin <maxim.vafin@intel.com> Co-authored-by: Szymon Gutaj <szymon.gutaj@intel.com>
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6.1.0 to 6.2.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/setup-node/releases">actions/setup-node's releases</a>.</em></p> <blockquote> <h2>v6.2.0</h2> <h2>What's Changed</h2> <h3>Documentation</h3> <ul> <li>Documentation update related to absence of Lockfile by <a href="https://github.com/mahabaleshwars"><code>@mahabaleshwars</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1454">actions/setup-node#1454</a></li> <li>Correct mirror option typos by <a href="https://github.com/MikeMcC399"><code>@MikeMcC399</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1442">actions/setup-node#1442</a></li> <li>Readme update on checkout version v6 by <a href="https://github.com/deining"><code>@deining</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1446">actions/setup-node#1446</a></li> <li>Readme typo fixes <a href="https://github.com/munyari"><code>@munyari</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1226">actions/setup-node#1226</a></li> <li>Advanced document update on checkout version v6 by <a href="https://github.com/aparnajyothi-y"><code>@aparnajyothi-y</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1468">actions/setup-node#1468</a></li> </ul> <h3>Dependency updates:</h3> <ul> <li>Upgrade <code>@actions/cache</code> to v5.0.1 by <a href="https://github.com/salmanmkc"><code>@salmanmkc</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1449">actions/setup-node#1449</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/mahabaleshwars"><code>@mahabaleshwars</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-node/pull/1454">actions/setup-node#1454</a></li> <li><a href="https://github.com/MikeMcC399"><code>@MikeMcC399</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-node/pull/1442">actions/setup-node#1442</a></li> <li><a href="https://github.com/deining"><code>@deining</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-node/pull/1446">actions/setup-node#1446</a></li> <li><a href="https://github.com/munyari"><code>@munyari</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-node/pull/1226">actions/setup-node#1226</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/setup-node/compare/v6...v6.2.0">https://github.com/actions/setup-node/compare/v6...v6.2.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions/setup-node/commit/6044e13b5dc448c55e2357c09f80417699197238"><code>6044e13</code></a> Docs: bump actions/checkout from v5 to v6 (<a href="https://redirect.github.com/actions/setup-node/issues/1468">#1468</a>)</li> <li><a href="https://github.com/actions/setup-node/commit/8e494633d082d609d1e9ff931be32f8a44f1f657"><code>8e49463</code></a> Fix README typo (<a href="https://redirect.github.com/actions/setup-node/issues/1226">#1226</a>)</li> <li><a href="https://github.com/actions/setup-node/commit/621ac41091d4227ef8fda5009c1ced96d8d36f7e"><code>621ac41</code></a> README.md: bump to latest released checkout version v6 (<a href="https://redirect.github.com/actions/setup-node/issues/1446">#1446</a>)</li> <li><a href="https://github.com/actions/setup-node/commit/2951748f4c016b747952f8ca7e75fc64f2f62b53"><code>2951748</code></a> Bump <code>@actions/cache</code> to v5.0.1 (<a href="https://redirect.github.com/actions/setup-node/issues/1449">#1449</a>)</li> <li><a href="https://github.com/actions/setup-node/commit/21ddc7bc1fef4bd313efce0335fdcbf81827182c"><code>21ddc7b</code></a> Correct mirror option typos (<a href="https://redirect.github.com/actions/setup-node/issues/1442">#1442</a>)</li> <li><a href="https://github.com/actions/setup-node/commit/65d868f8d4d85d7d4abb7de0875cde3fcc8798f5"><code>65d868f</code></a> Update Documentation for Lockfile (<a href="https://redirect.github.com/actions/setup-node/issues/1454">#1454</a>)</li> <li>See full diff in <a href="https://github.com/actions/setup-node/compare/395ad3262231945c25e8478fd5baf05154b1d79f...6044e13b5dc448c55e2357c09f80417699197238">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
openvinotoolkit#33551) Updates the requirements on [scipy](https://github.com/scipy/scipy) to permit the latest version. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/scipy/scipy/releases">scipy's releases</a>.</em></p> <blockquote> <h1>SciPy 1.17.0 Release Notes</h1> <p>SciPy <code>1.17.0</code> is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with <code>python -Wd</code> and check for <code>DeprecationWarning</code> s). Our development attention will now shift to bug-fix releases on the <code>1.17.x</code> branch, and on adding new features on the main branch.</p> <p>This release requires Python <code>3.11</code>-<code>3.14</code> and NumPy <code>1.26.4</code> or greater.</p> <h1>Highlights of this release</h1> <ul> <li>Many SciPy functions have gained native support for batching of N-dimensional array input and additional support for the array API standard. An overall summary of the latter is now available in a <a href="https://scipy.github.io/devdocs/dev/api-dev/array_api.html#api-coverage">set of tables</a>.</li> <li>In <code>scipy.sparse</code>, <code>coo_array</code> now supports indexing. This includes integers, slices, arrays, <code>np.newaxis</code>, <code>Ellipsis</code>, in 1D, 2D and the relatively new nD. In <code>scipy.sparse.linalg</code>, ARPACK and PROPACK rewrites from Fortran77 to C now empower the use of external pseudorandom number generators, e.g. from numpy.</li> <li>In <code>scipy.spatial</code>, <code>transform.Rotation</code> and <code>transform.RigidTransform</code> have been extended to support N-D arrays. <code>geometric_slerp</code> now has support for extrapolation.</li> <li><code>scipy.stats</code> has gained the matrix t and logistic distributions and many performance and accuracy improvements.</li> <li>Initial support for 64-bit integer (ILP64) BLAS and LAPACK libraries has been added, including for MKL and Apple Accelerate. Please report any issues with ILP64 you encounter.</li> </ul> <h1>New features</h1> <h1><code>scipy.integrate</code> improvements</h1> <ul> <li>The integration routines <code>dopri5</code>, <code>dopri853</code>, <code>LSODA</code>, <code>vode</code>, and <code>zvode</code> have been ported from Fortran77 to C.</li> <li><code>scipy.integrate.quad</code> now has a fast path for returning 0 when the integration interval is empty.</li> <li>The <code>BDF</code>, <code>DOP853</code>, <code>RK23</code>, <code>RK45</code>, <code>OdeSolver</code>, <code>DenseOutput</code>, <code>ode</code>, and <code>complex_ode</code> classes now support subscription, making them generic types, for compatibility with <code>scipy-stubs</code>.</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/scipy/scipy/commit/8c75ae75176236f233824e9a0483c26a69e6dfec"><code>8c75ae7</code></a> REL: 1.17.0 "final" release commit [wheel build]</li> <li><a href="https://github.com/scipy/scipy/commit/9d7f110540b5f054cfd99820b5eb02b56a7f2aab"><code>9d7f110</code></a> Merge pull request <a href="https://redirect.github.com/scipy/scipy/issues/24298">#24298</a> from tylerjereddy/treddy_prep_1.17.0_final</li> <li><a href="https://github.com/scipy/scipy/commit/94373b602e384cf613e1287b209609a7908c6f5e"><code>94373b6</code></a> MAINT: test wheels [wheel build]</li> <li><a href="https://github.com/scipy/scipy/commit/723f4e2f83214c237d6afa8a9761f4ef1e00c1fe"><code>723f4e2</code></a> DOC: update 1.17.0 relnotes</li> <li><a href="https://github.com/scipy/scipy/commit/bf042f043f1f59a1856827c249453d899abc12fc"><code>bf042f0</code></a> CI: ensure we use pinned scipy-openblas version also in ILP64 job</li> <li><a href="https://github.com/scipy/scipy/commit/3e00a04941ca2e7cacf6130fd9c28a8aeeefcad8"><code>3e00a04</code></a> CI: fix issue with ILP64 job; point to fixed numpy/meson commit</li> <li><a href="https://github.com/scipy/scipy/commit/39bceab6f85ae717595c2291f6efe0ca29c53ee0"><code>39bceab</code></a> BUG: stats: fix va_args memory corruption bug</li> <li><a href="https://github.com/scipy/scipy/commit/8f563872fa61c891fede2b547c02190413ec9858"><code>8f56387</code></a> DOC: update 1.17.0 release notes</li> <li><a href="https://github.com/scipy/scipy/commit/c50e9c03eafec0bb7703acafffc948deb78a567c"><code>c50e9c0</code></a> Merge pull request <a href="https://redirect.github.com/scipy/scipy/issues/24304">#24304</a> from ev-br/edit_relnotes_for_ILP64</li> <li><a href="https://github.com/scipy/scipy/commit/b204495c6122f3670c67000ae29963676024be87"><code>b204495</code></a> DOC: clarify ILP64 support caveats in the release notes, remove mentions of O...</li> <li>Additional commits viewable in <a href="https://github.com/scipy/scipy/compare/v1.11.1...v1.17.0">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Przemyslaw Wysocki <przemyslaw.wysocki@intel.com>
### Details: - *update logic of default prefer threads latency for i5_1335U* ### Tickets: - *CVS-178991*
openvinotoolkit#33541) …ociated with the subprocess module openvinotoolkit#1 ### Details: - Mitigate Bandit errors ### Tickets: - CVS-177661 Co-authored-by: Przemyslaw Wysocki <przemyslaw.wysocki@intel.com>
…nvinotoolkit#33473) ### Details: - Add Dynamic logic of `Col2Im` - Please note that `IE_GPU` tests were not conducted as I am working in a Colab environment. - This PR is related on openvinotoolkit#33386 ### Tickets: - Fixes openvinotoolkit#33472 <details> <summary> Test Result Logs </summary> > !/content/openvino/bin/intel64/Debug/ov_onnx_frontend_tests --gtest_filter=*col2im* ```sh Running main() from /content/openvino/src/frontends/tests/frontend/shared/gtest_main_manifest/main.cpp:20 Note: Google Test filter = *col2im*:-:ONNXLoadTest/FrontEndLoadFromTest.testLoadFromTwoFiles/onnx:ONNXLoadTest/FrontEndLoadFromTest.testLoadFromTwoStreams/onnx [==========] Running 18 tests from 3 test suites. [----------] Global test environment set-up. [----------] 6 tests from INTERPRETER [ RUN ] INTERPRETER.onnx_col2im_default [ INFO ] Verifying match of <= 22 mantissa bits (24 bits precision - 2 tolerance). 0 value(s) below min_signal: 0 Loosest match found is 24 mantissa bits. [ OK ] INTERPRETER.onnx_col2im_default (68 ms) [ RUN ] INTERPRETER.onnx_col2im_dilations [ INFO ] Verifying match of <= 22 mantissa bits (24 bits precision - 2 tolerance). 0 value(s) below min_signal: 0 Loosest match found is 24 mantissa bits. [ OK ] INTERPRETER.onnx_col2im_dilations (53 ms) [ RUN ] INTERPRETER.onnx_col2im_pads [ INFO ] Verifying match of <= 22 mantissa bits (24 bits precision - 2 tolerance). 0 value(s) below min_signal: 0 Loosest match found is 24 mantissa bits. [ OK ] INTERPRETER.onnx_col2im_pads (52 ms) [ RUN ] INTERPRETER.onnx_col2im_strides [ INFO ] Verifying match of <= 22 mantissa bits (24 bits precision - 2 tolerance). 0 value(s) below min_signal: 0 Loosest match found is 24 mantissa bits. [ OK ] INTERPRETER.onnx_col2im_strides (51 ms) [ RUN ] INTERPRETER.onnx_col2im_batch [ INFO ] Verifying match of <= 22 mantissa bits (24 bits precision - 2 tolerance). 0 value(s) below min_signal: 0 Loosest match found is 24 mantissa bits. [ OK ] INTERPRETER.onnx_col2im_batch (55 ms) [ RUN ] INTERPRETER.onnx_col2im_channel [ INFO ] Verifying match of <= 22 mantissa bits (24 bits precision - 2 tolerance). 0 value(s) below min_signal: 0 Loosest match found is 24 mantissa bits. [ OK ] INTERPRETER.onnx_col2im_channel (55 ms) [----------] 6 tests from INTERPRETER (334 ms total) [----------] 6 tests from IE_GPU [ RUN ] IE_GPU.onnx_col2im_default unknown file: Failure C++ exception with description "Exception from src/inference/src/cpp/core.cpp:116: Exception from src/inference/src/dev/plugin.cpp:53: Check 'contexts.count(device_id)' failed at src/plugins/intel_gpu/src/plugin/plugin.cpp:287: [GPU] Context was not initialized for 0 device " thrown in the test body. [ FAILED ] IE_GPU.onnx_col2im_default (33 ms) [ RUN ] IE_GPU.onnx_col2im_dilations unknown file: Failure C++ exception with description "Exception from src/inference/src/cpp/core.cpp:116: Exception from src/inference/src/dev/plugin.cpp:53: Check 'contexts.count(device_id)' failed at src/plugins/intel_gpu/src/plugin/plugin.cpp:287: [GPU] Context was not initialized for 0 device " thrown in the test body. [ FAILED ] IE_GPU.onnx_col2im_dilations (8 ms) [ RUN ] IE_GPU.onnx_col2im_pads unknown file: Failure C++ exception with description "Exception from src/inference/src/cpp/core.cpp:116: Exception from src/inference/src/dev/plugin.cpp:53: Check 'contexts.count(device_id)' failed at src/plugins/intel_gpu/src/plugin/plugin.cpp:287: [GPU] Context was not initialized for 0 device " thrown in the test body. [ FAILED ] IE_GPU.onnx_col2im_pads (8 ms) [ RUN ] IE_GPU.onnx_col2im_strides unknown file: Failure C++ exception with description "Exception from src/inference/src/cpp/core.cpp:116: Exception from src/inference/src/dev/plugin.cpp:53: Check 'contexts.count(device_id)' failed at src/plugins/intel_gpu/src/plugin/plugin.cpp:287: [GPU] Context was not initialized for 0 device " thrown in the test body. [ FAILED ] IE_GPU.onnx_col2im_strides (10 ms) [ RUN ] IE_GPU.onnx_col2im_batch unknown file: Failure C++ exception with description "Exception from src/inference/src/cpp/core.cpp:116: Exception from src/inference/src/dev/plugin.cpp:53: Check 'contexts.count(device_id)' failed at src/plugins/intel_gpu/src/plugin/plugin.cpp:287: [GPU] Context was not initialized for 0 device " thrown in the test body. [ FAILED ] IE_GPU.onnx_col2im_batch (7 ms) [ RUN ] IE_GPU.onnx_col2im_channel unknown file: Failure C++ exception with description "Exception from src/inference/src/cpp/core.cpp:116: Exception from src/inference/src/dev/plugin.cpp:53: Check 'contexts.count(device_id)' failed at src/plugins/intel_gpu/src/plugin/plugin.cpp:287: [GPU] Context was not initialized for 0 device " thrown in the test body. [ FAILED ] IE_GPU.onnx_col2im_channel (8 ms) [----------] 6 tests from IE_GPU (74 ms total) [----------] 6 tests from IE_CPU [ RUN ] IE_CPU.onnx_col2im_default [ INFO ] Verifying match of <= 22 mantissa bits (24 bits precision - 2 tolerance). 0 value(s) below min_signal: 0 Loosest match found is 24 mantissa bits. [ OK ] IE_CPU.onnx_col2im_default (109 ms) [ RUN ] IE_CPU.onnx_col2im_dilations [ INFO ] Verifying match of <= 22 mantissa bits (24 bits precision - 2 tolerance). 0 value(s) below min_signal: 0 Loosest match found is 24 mantissa bits. [ OK ] IE_CPU.onnx_col2im_dilations (106 ms) [ RUN ] IE_CPU.onnx_col2im_pads [ INFO ] Verifying match of <= 22 mantissa bits (24 bits precision - 2 tolerance). 0 value(s) below min_signal: 0 Loosest match found is 24 mantissa bits. [ OK ] IE_CPU.onnx_col2im_pads (105 ms) [ RUN ] IE_CPU.onnx_col2im_strides [ INFO ] Verifying match of <= 22 mantissa bits (24 bits precision - 2 tolerance). 0 value(s) below min_signal: 0 Loosest match found is 24 mantissa bits. [ OK ] IE_CPU.onnx_col2im_strides (105 ms) [ RUN ] IE_CPU.onnx_col2im_batch [ INFO ] Verifying match of <= 22 mantissa bits (24 bits precision - 2 tolerance). 0 value(s) below min_signal: 0 Loosest match found is 24 mantissa bits. [ OK ] IE_CPU.onnx_col2im_batch (110 ms) [ RUN ] IE_CPU.onnx_col2im_channel [ INFO ] Verifying match of <= 22 mantissa bits (24 bits precision - 2 tolerance). 0 value(s) below min_signal: 0 Loosest match found is 24 mantissa bits. [ OK ] IE_CPU.onnx_col2im_channel (107 ms) [----------] 6 tests from IE_CPU (643 ms total) [----------] Global test environment tear-down [==========] 18 tests from 3 test suites ran. (1051 ms total) [ PASSED ] 12 tests. [ FAILED ] 6 tests, listed below: [ FAILED ] IE_GPU.onnx_col2im_default [ FAILED ] IE_GPU.onnx_col2im_dilations [ FAILED ] IE_GPU.onnx_col2im_pads [ FAILED ] IE_GPU.onnx_col2im_strides [ FAILED ] IE_GPU.onnx_col2im_batch [ FAILED ] IE_GPU.onnx_col2im_channel 6 FAILED TESTS ``` </details> --------- Co-authored-by: Maksim Kutakov <maksim.kutakov@intel.com>
…x UNITY build conflicts (openvinotoolkit#33134) Add using declarations and namespace aliases to improve code readability after removing using namespace directives. ### Details: Remove using namespace directives that cause name conflicts in UNITY builds and replace them with explicit using declarations and namespace aliases for improved readability. - Remove using namespace ov::op and using namespace ov::pass::pattern directives - Add specific using declarations (e.g., using ov::pass::pattern::wrap_type;) only when a construct is used 2+ times in a file - Add namespace aliases (e.g., namespace v0 = ov::op::v0;) only when a version namespace is used 2+ times in a file - Replace fully qualified names with short forms where declarations are added ### Tickets: - 177276
### Details: - *Disable idle pruning if property is set* ### Tickets: - *CVS-178801* --------- Signed-off-by: Bogdan Pereanu <bogdan.pereanu@intel.com> Signed-off-by: alexandruenache1111 <alexandru.enache@intel.com> Co-authored-by: alexandruenache1111 <alexandru.enache@intel.com>
We are enabling CoPilot models on OV GPU. For one of the models, the issue happens at https://github.com/openvinotoolkit/openvino/blob/71d7d40b18f31beb2cf1db0f26cd212f9bacd45e/src/common/low_precision_transformations/src/reduce_sum.cpp#L74 DqPrecision is set to FP32 which results in the below issue. <img width="1907" height="1014" alt="ReduceSum-trans" src="https://github.com/user-attachments/assets/a41f32ae-1bc2-4c29-bb44-5b86811487f8" /> <img width="1907" height="1008" alt="reduce-sum-layer" src="https://github.com/user-attachments/assets/88c6983c-ce3c-4745-8c8f-b7fa595a73a1" /> ### Tickets: - *CVS-177907* --------- Co-authored-by: Vladislav Golubev <vladislav.golubev@intel.com>
…r_inputs (openvinotoolkit#33604) ### Issue: - `user->get_output_layout()` in `mark_if_data_flow()` is being called before user layouts are calculated. - In large graphs, this can trigger deep recursive layout computation from mid‑graph nodes back to inputs, which may lead to stack overflow. ### Root Cause: - `mark_if_data_flow()` runs during `mark_nodes` traversal and can evaluate GEMM users whose layouts are not yet cached. - When `get_output_layout()` is called on such nodes, it falls back to `calc_output_layouts()` and recursively requests input layouts, causing a deep call chain in large models. ### Fix: - Create a separate function, `mark_if_gemm_data_flow()` to mark `data_flow` for the case of `Constant -> Convert -> Gemm` pattern. - The function should be called from `reorder_inputs`. - For information on the pattern`, please refer [PR#32817](openvinotoolkit#32817) #### Checklist - [x] Is it a proper fix? - [ ] Did you include test case for this fix, if necessary? - [ ] Did you review existing test that can be extended to cover this scenario? ### Tickets: - 178999
…32708) ### Details: According to [onnx GQA spec](https://github.com/microsoft/onnxruntime/blob/main/docs/ContribOperators.md#com.microsoft.GroupQueryAttention), `position_ids` and `attention_bias` are passed as inputs. Current OV ONNX frontend which has initial support of GQA(openvinotoolkit#28163) doesn't parse this information. This PR is to address this issue. ### Tickets: - *CVS-176214* --------- Co-authored-by: czekun <chen.zekun@intel.com>
…penvinotoolkit#33607) Fix Bandit B404 security warning by adding nosec B404 comments to subprocess imports. Addresses SDL438 - Align Use of Python with Bandit Guidance. Ticket: CVS-177660
…toolkit#33624) ### Details: - Now the test checks only the first part of its autogenerated name and if op appeared at least once in model ### Tickets: - [CVS-179371](https://jira.devtools.intel.com/browse/CVS-179371)
### Details: - *Fix length of read raw data* ### Tickets: - *CVS-178939* --------- Signed-off-by: Maxim Vafin <maxim.vafin@intel.com>
…#33611) ### Details: - change type of `m_plugin_path` to `std::filesystem::path` - `get_directory()` returns the current directory if there is no parent_path ### Tickets: - [CVS-178043](https://jira.devtools.intel.com/browse/CVS-178043)
### Tickets: - *177309* --------- Co-authored-by: Alina Kladieva <alina.kladieva@intel.com>
### Details: - Avoids internal compiler error in Visual Studio 2022 version 17.8.22 (and probably other versions) by simplifying the use of macro PRECISION_LIMITS_FOR to require fewer inferred conversions. Compiler error (from original code): ``` 1>------ Build started: Project: openvino_transformations_obj, Configuration: RelWithDebInfo x64 ------ 1>convert_quantize_dequantize.cpp 1>C:\Users\elpalmer\IntelGit\openvino\src\common\transformations\src\transformations\common_optimizations\convert_quantize_dequantize.cpp(146,1): error C1001: Internal compiler error. 1>C:\Users\elpalmer\IntelGit\openvino\src\common\transformations\src\transformations\common_optimizations\convert_quantize_dequantize.cpp(146,1): error C1001: (compiler file 'D:\a\_work\1\s\src\vctools\Compiler\CxxFE\sl\p1\c\convert.cpp', line 11356) 1>C:\Users\elpalmer\IntelGit\openvino\src\common\transformations\src\transformations\common_optimizations\convert_quantize_dequantize.cpp(146,1): error C1001: To work around this problem, try simplifying or changing the program near the locations listed above. 1>C:\Users\elpalmer\IntelGit\openvino\src\common\transformations\src\transformations\common_optimizations\convert_quantize_dequantize.cpp(146,1): error C1001: If possible please provide a repro here: https://developercommunity.visualstudio.com 1>C:\Users\elpalmer\IntelGit\openvino\src\common\transformations\src\transformations\common_optimizations\convert_quantize_dequantize.cpp(146,1): error C1001: Please choose the Technical Support command on the Visual C++ 1>C:\Users\elpalmer\IntelGit\openvino\src\common\transformations\src\transformations\common_optimizations\convert_quantize_dequantize.cpp(146,1): error C1001: Help menu, or open the Technical Support help file for more information 1>Done building project "openvino_transformations_obj.vcxproj" -- FAILED. ``` --------- Co-authored-by: Eric Palmer <epalmer@adobe.com> Co-authored-by: Pawel Raasz <pawel.raasz@intel.com>
### Details: - *Enable GraphIterator interface by default* - *Add tests for legacy behavior in the GHA* - *Fix issue in `OpExtension` test* - *Fix issue with Unicode paths* ### Tickets: - *CVS-179282* --------- Signed-off-by: Maxim Vafin <maxim.vafin@intel.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
### Details: - Restoring the logic added in openvinotoolkit#28343 that was unfairly removed in openvinotoolkit#30554 by mistake ### Tickets: - E#198339
…penvinotoolkit#33540) Updates the requirements on [build](https://github.com/pypa/build) to permit the latest version. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/pypa/build/releases">build's releases</a>.</em></p> <blockquote> <h2>1.4.0</h2> <ul> <li>Add <code>--quiet</code> flag (PR <a href="https://redirect.github.com/pypa/build/issues/947">#947</a>)</li> <li>Add option to dump PEP 517 metadata with <code>--metadata</code> (PR <a href="https://redirect.github.com/pypa/build/issues/940">#940</a>, PR <a href="https://redirect.github.com/pypa/build/issues/943">#943</a>)</li> <li>Support <code>UV</code> environment variable (PR <a href="https://redirect.github.com/pypa/build/issues/971">#971</a>)</li> <li>Remove a workaround for 3.14b1 (PR <a href="https://redirect.github.com/pypa/build/issues/960">#960</a>)</li> <li>In 3.14 final release, <code>color</code> defaults to <code>True</code> already (PR <a href="https://redirect.github.com/pypa/build/issues/962">#962</a>)</li> <li>Pass sp-repo-review (PR <a href="https://redirect.github.com/pypa/build/issues/942">#942</a>)</li> <li>In pytest configuration, <code>log_level</code> is better than <code>log_cli_level</code> (PR <a href="https://redirect.github.com/pypa/build/issues/950">#950</a>)</li> <li>Split up typing and mypy (PR <a href="https://redirect.github.com/pypa/build/issues/944">#944</a>)</li> <li>Use <code>types-colorama</code> (PR <a href="https://redirect.github.com/pypa/build/issues/945">#945</a>)</li> <li>In docs, first argument for <code>_has_dependency</code> is a name (PR <a href="https://redirect.github.com/pypa/build/issues/970">#970</a>)</li> <li>Fix test failure when <code>flit-core</code> is installed (PR <a href="https://redirect.github.com/pypa/build/issues/921">#921</a>)</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/pypa/build/blob/main/CHANGELOG.rst">build's changelog</a>.</em></p> <blockquote> <h1>1.4.0 (2026-01-08)</h1> <ul> <li>Add <code>--quiet</code> flag (:pr:<code>947</code>)</li> <li>Add option to dump PEP 517 metadata with <code>--metadata</code> (:pr:<code>940</code>, :pr:<code>943</code>)</li> <li>Support <code>UV</code> environment variable (:pr:<code>971</code>)</li> <li>Remove a workaround for 3.14b1 (:pr:<code>960</code>)</li> <li>In 3.14 final release, <code>color</code> defaults to <code>True</code> already (:pr:<code>962</code>)</li> <li>Pass sp-repo-review (:pr:<code>942</code>)</li> <li>In pytest configuration, <code>log_level</code> is better than <code>log_cli_level</code> (:pr:<code>950</code>)</li> <li>Split up typing and mypy (:pr:<code>944</code>)</li> <li>Use <code>types-colorama</code> (:pr:<code>945</code>)</li> <li>In docs, first argument for <code>_has_dependency</code> is a name (PR :pr:<code>970</code>)</li> <li>Fix test failure when <code>flit-core</code> is installed (PR :pr:<code>921</code>)</li> </ul> <h1>1.3.0 (2025-08-01)</h1> <ul> <li>Add <code>--config-json</code> (PR :pr:<code>916</code>, fixes issue :issue:<code>900</code>)</li> <li>Drop Python 3.8 (PR :pr:<code>891</code>)</li> <li>Test on Python 3.14, colorful help on 3.14+ (PR :pr:<code>895</code>)</li> <li>Fix <code>ModuleNotFoundError</code> when <code>pip</code> is not installed (PR :pr:<code>898</code>)</li> <li>Disable use of <code>pip install --python</code> for debundled pip (PR :pr:<code>861</code>)</li> <li>Don't pass no-wheel to virtualenv if it would warn (PR :pr:<code>892</code>)</li> <li>Optimize our tests to run faster (PR :pr:<code>871</code>, :pr:<code>872</code>, :pr:<code>738</code>)</li> <li>Allow running our tests without virtualenv (PR :pr:<code>911</code>)</li> <li>Fix issues in our tests (PR :pr:<code>824</code>, :pr:<code>918</code>, :pr:<code>870</code>, :pr:<code>915</code>, :pr:<code>862</code>, :pr:<code>863</code>, :pr:<code>899</code>, :pr:<code>896</code>, :pr:<code>854</code>)</li> <li>Use SPDX identifiers for our license metadata (PR :pr:<code>914</code>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pypa/build/commit/54f238d1664124e06a68c6c22fd5b1418fa5feb2"><code>54f238d</code></a> chore: prepare for 1.4.0 (<a href="https://redirect.github.com/pypa/build/issues/972">#972</a>)</li> <li><a href="https://github.com/pypa/build/commit/f219276a6e2c6c8222780ba518ce52444a91deaa"><code>f219276</code></a> docs: first argument for _has_dependency is a name (<a href="https://redirect.github.com/pypa/build/issues/970">#970</a>)</li> <li><a href="https://github.com/pypa/build/commit/7adb29e69d2744acc5391d3c58d234388a9ac0ed"><code>7adb29e</code></a> fix: support UV environment variable (<a href="https://redirect.github.com/pypa/build/issues/971">#971</a>)</li> <li><a href="https://github.com/pypa/build/commit/a40623b20de5d29c80b569283191d65e630f4fc0"><code>a40623b</code></a> build(deps): bump actions/attest-build-provenance in the actions group (<a href="https://redirect.github.com/pypa/build/issues/968">#968</a>)</li> <li><a href="https://github.com/pypa/build/commit/c8fae3459dbe4456d82d705c6a3f1869b0b26e5c"><code>c8fae34</code></a> pre-commit: bump repositories (<a href="https://redirect.github.com/pypa/build/issues/965">#965</a>)</li> <li><a href="https://github.com/pypa/build/commit/ed9c379f51abca7c0c0ae20bee66aa548d597dc3"><code>ed9c379</code></a> build(deps): bump actions/download-artifact in the actions group</li> <li><a href="https://github.com/pypa/build/commit/0e44fd22f35c7b3c14d6410bbd8912dafba0e4a9"><code>0e44fd2</code></a> Add <code>quiet</code> flag (<a href="https://redirect.github.com/pypa/build/issues/947">#947</a>)</li> <li><a href="https://github.com/pypa/build/commit/60e15ed4cb31209f0e07de750c831cdb3911c62c"><code>60e15ed</code></a> chore: color defaults to True in 3.14 (<a href="https://redirect.github.com/pypa/build/issues/962">#962</a>)</li> <li><a href="https://github.com/pypa/build/commit/0486d9df2e6caf7c04a3991824093eb6a16e7f29"><code>0486d9d</code></a> pre-commit: bump repositories (<a href="https://redirect.github.com/pypa/build/issues/961">#961</a>)</li> <li><a href="https://github.com/pypa/build/commit/393b775480523247c1ad07b8da9bb8c23c5cd0fa"><code>393b775</code></a> MNT: remove workaround for 3.14b1 (<a href="https://redirect.github.com/pypa/build/issues/960">#960</a>)</li> <li>Additional commits viewable in <a href="https://github.com/pypa/build/compare/0.0.1...1.4.0">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Przemyslaw Wysocki <przemyslaw.wysocki@intel.com>
…t#33613) - avoid multiple dlopens when loading the plugin - create another flavor of load_extensions function which takes DSO handle (instead of DSO name) - add -fno-gnu-unique for NPU plugin when compiled with gcc. Unique symbols prevent the library from being unloaded.
### Details: - Remove big template code from Constant operator - It may reduce binary size of OpenVINO and other libraries as code is main OV library checked on gcc-11 clang-18 - For types not supported by OV there is double conversion used. It is recommend to used types supported by OV ### Tickets: - CVS-152745 --------- Signed-off-by: Pawel Raasz <pawel.raasz@intel.com>
### Details: - `mac-13` is being deprecated as per actions/runner-images#13046, there were plans to remove x86_64 mac from OpenVINO's GHA, so we might as well do it now. ### Tickets: - *176452*
…ws (openvinotoolkit#33442) ### Tickets: - CVS-126388 --------- Signed-off-by: Alina Kladieva <alina.kladieva@intel.com>
…otoolkit#33598) - Disambiguated variable naming for the sake of static analysis by Coverity - The issue stemmed from reuse of a variable with meaning change which wasn't grasped by Coverity ### Tickets: - CVS-179042
### Details: - *Fix issue with reading optional types* ### Tickets: - *CVS-178939* --------- Signed-off-by: Maxim Vafin <maxim.vafin@intel.com>
…32583) ### Details: - *Custom OP support multiple outputs nodes.* - Two limitations: - Multiple outputs doesn't support to insert reorder primitive, because following node can't get correct idx when shape infer after inserting new primitive. - `Custom Op` on static models do not support multiple outputs because multiple outputs on static models are not a normal process but a very irregular practice. The behavior of `Custom Op` is also not fixed, so it is disabled to avoid introducing new problems. ### Tickets: - *CVS-175808* --------- Signed-off-by: xiping.yan <xiping.yan@intel.com> Signed-off-by: xipingya <xiping.yan@intel.com> Co-authored-by: River Li <river.li@intel.com> Co-authored-by: Chen Peter <peter.chen@intel.com>
…vinotoolkit#33674) ``` /__w/openvino/openvino/.github/actions/handle_docker/get_images_to_build.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives from distutils.util import strtobool Traceback (most recent call last): File "/__w/openvino/openvino/.github/actions/handle_docker/get_images_to_build.py", line 10, in <module> from helpers import * File "/__w/openvino/openvino/.github/actions/handle_docker/helpers.py", line 7, in <module> from ghapi.all import GhApi File "/usr/local/lib/python3.10/dist-packages/ghapi/all.py", line 1, in <module> from .core import * File "/usr/local/lib/python3.10/dist-packages/ghapi/core.py", line 7, in <module> from fastcore.all import * File "/usr/local/lib/python3.10/dist-packages/fastcore/all.py", line 9, in <module> from .script import * File "/usr/local/lib/python3.10/dist-packages/fastcore/script.py", line 15, in <module> from .docments import docments File "/usr/local/lib/python3.10/dist-packages/fastcore/docments.py", line 359 sig_str = f"def {get_name(self.obj)}(\n {'\n '.join(lines)}\n{self._ret_str}" ^ SyntaxError: f-string expression part cannot include a backslash ``` Pinning fastcore to last working release. Alternative would be to move this action to use python3.12. AnswerDotAI/fastcore#751 https://jira.devtools.intel.com/browse/CVS-179495
### Details: Fix Coverity defect type: Variable copied when it could be moved, for: src/frontends/pytorch/src/op/loop.cpp Coiverity issues id: - 2536356 - 2536355 - 2536354 - 2536353 - 2536352 ### Tickets: - *ticket-id*
Reverts openvinotoolkit#33199 Ticket: 179141
examples/fastapi/fastapi_infer.py
Outdated
| core = Core() | ||
| compiled_model = None | ||
| input_layer = None | ||
| output_layer = None |
There was a problem hiding this comment.
| core = Core() | |
| compiled_model = None | |
| input_layer = None | |
| output_layer = None | |
| compiled_model = None | |
| output_layer = None |
Not used
examples/fastapi/fastapi_infer.py
Outdated
| @app.post("/infer-image") | ||
| async def infer_image(file: UploadFile = File(...)): | ||
| image_bytes = await file.read() | ||
| input_tensor = preprocess_image(image_bytes) |
There was a problem hiding this comment.
ValueError should be gracefully handled here, with appropriate return code, like 415 or 422.
There was a problem hiding this comment.
Pull request overview
This PR adds a FastAPI-based inference example using OpenVINO to help users quickly serve models via a REST API, with a focus on Windows compatibility.
Changes:
- New FastAPI inference server with image classification endpoint
- ImageNet labels file for classification results
- Updated .gitignore to exclude Python virtual environments and downloaded models
Reviewed changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| examples/fastapi/fastapi_infer.py | FastAPI server implementing image classification using OpenVINO with MobileNet-v2 |
| examples/fastapi/imagenet_labels.txt | ImageNet class labels (first 10 entries only) |
| .gitignore | Adds ignores for virtual environments, model downloads, and Python cache files |
Comments suppressed due to low confidence (1)
examples/fastapi/imagenet_labels.txt:1
- The ImageNet labels file only contains 10 labels, but ImageNet has 1000 classes. When the model predicts a class ID >= 10, line 88 in fastapi_infer.py (
IMAGENET_LABELS[idx]) will raise an IndexError. Either include all 1000 labels or add bounds checking to handle missing labels gracefully.
tench
examples/fastapi/fastapi_infer.py
Outdated
| output_layer = None | ||
|
|
||
| # ---------------- Startup event: load labels & model ---------------- | ||
| @app.on_event("startup") |
There was a problem hiding this comment.
The on_event decorator is deprecated in FastAPI. Use lifespan context manager instead for application startup/shutdown logic. Replace with @asynccontextmanager and app = FastAPI(lifespan=lifespan_context).
examples/fastapi/fastapi_infer.py
Outdated
| print(f"Loaded {len(IMAGENET_LABELS)} ImageNet labels ✅") | ||
|
|
||
| # Load and compile OpenVINO model | ||
| model_path = "public/mobilenet-v2-pytorch/FP16/mobilenet-v2-pytorch.xml" |
There was a problem hiding this comment.
If the model file doesn't exist at this hardcoded path, the application will crash on startup with an unclear error. Add explicit file existence checking and provide a helpful error message directing users to download the model first.
| model_path = "public/mobilenet-v2-pytorch/FP16/mobilenet-v2-pytorch.xml" | |
| model_path = os.path.join( | |
| base_dir, | |
| "public", | |
| "mobilenet-v2-pytorch", | |
| "FP16", | |
| "mobilenet-v2-pytorch.xml", | |
| ) | |
| if not os.path.exists(model_path): | |
| raise RuntimeError( | |
| f"OpenVINO model file not found at '{model_path}'. " | |
| "Please download the 'mobilenet-v2-pytorch' model (FP16) from the " | |
| "Open Model Zoo and place it at this path before starting the app." | |
| ) |
There was a problem hiding this comment.
Better use Path from pathlib
apaniukov
left a comment
There was a problem hiding this comment.
You should add a readme.md file in the fastapi folder, with:
- Short description of the example
- How to get the model, so it loads from
"public/mobilenet-v2-pytorch/FP16/mobilenet-v2-pytorch.xml" - How to create a venv and install requirements
- How to start the server
- How to query the server using CLI tool and/or Swagger and example of the output
107c846 to
dd3f7c4
Compare
|
Hi all, New PR: uvv-01/openvinonew#34338 This new PR includes: FastAPI inference example with Windows-friendly setup README instructions for model download, virtual environment setup, server start, and example queries Patch file with final reviewer-requested fixes Replaced deprecated @app.on_event("startup") with FastAPI lifespan context Removed large offline wheel files from the repository Only includes the relevant commits for a clean PR Please refer to the new PR for review and merging. Thank you for your time! |

What does this PR do?
Adds a minimal FastAPI-based inference example using OpenVINO, aimed at helping users quickly serve models via a REST API.
resolved #33970
Why is this needed?
What’s included
Follow-ups