Skip to content

Fix NameError in backend.reset() due to missing import#2

Draft
google-labs-jules[bot] wants to merge 18 commits intomasterfrom
jules-1837813904151688086-d5bafc08
Draft

Fix NameError in backend.reset() due to missing import#2
google-labs-jules[bot] wants to merge 18 commits intomasterfrom
jules-1837813904151688086-d5bafc08

Conversation

@google-labs-jules
Copy link

The reset() function in src/bindings/python/src/openvino/frontend/pytorch/torchdynamo/backend.py was failing with a NameError because clear_caches was called but not imported.

This PR fixes the issue by:

  • Importing clear_caches from openvino.frontend.pytorch.torchdynamo.execute.
  • Ensuring reset() functions as intended to clear internal caches.

PR created automatically by Jules for task 1837813904151688086 started by @andersendsa

The `reset()` function in `src/bindings/python/src/openvino/frontend/pytorch/torchdynamo/backend.py` calls `clear_caches()`, but this function was not imported. This commit adds `clear_caches` to the imports from `.execute`.
@google-labs-jules
Copy link
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

andersendsa and others added 17 commits January 30, 2026 16:18
### Details:
ONNX model:
<img width="351" height="305" alt="image"
src="https://github.com/user-attachments/assets/37215659-c803-4683-8297-9ce52f4bd9e8"
/>

- Reuse `AtenCatToConcat` from PyTorch frontend to convert the similar
pattern in ONNX.
- Adds topological sort to `GraphIteratorProto` to handle ONNX graphs
where Loop nodes reference tensors defined later in node order.
- Introduces `SequenceInsert` and `ConcatFromSequence` helper ops in
frontend_common for reuse across frontends.
- Implements `SequenceConcatReplacer` transformation that rewrites
SequenceEmpty → Loop(SequenceInsert) → ConcatFromSequence into direct
Concat.
- Updates ONNX `SequenceInsert`, `ConcatFromSequence`, and `Loop`
translators to emit helper ops with preserved semantic info.
- Adds tests for topological sort and sequence concatenation patterns.

### Tickets:
 - *CVS-175206*
### Details:
 - *Support patching torch functions*
- *Create cmake target to copy python files, so that change in the .py
files triggered the new copy*

### Tickets:
 - *CVS-180119*
…penvinotoolkit#34189)

### Details:
- SetDefault is a free function, not a member method, so capturing
'this' in the update_dispatch_data_func lambda is unnecessary. Remove it
to fix -Werror,-Wunused-lambda-capture error when building with
-DENABLE_FUZZING=ON (clang + sanitizer flags).

### Tickets:
 - 181419
…olkit#34182)

### Tickets:
 - N/A

---------

Co-authored-by: Pawel Raasz <pawel.raasz@intel.com>
…nvertTruncation nodes (openvinotoolkit#34148)

### Details:
- Add `jit_convert_saturation_emitter` and
`jit_convert_truncation_emitter`
 - Enable testing for `Convert`-related snippets func tests

### Tickets:
 - N/A
### Details:
 - *Add L2 norm metric*
 - *Also refactored code checking precisions*

### Tickets:
 - *[EISW-203213](https://jira.devtools.intel.com/browse/EISW-203213)*

---------

Co-authored-by: Vladislav Golubev <vladislav.golubev@intel.com>
## Details
- add .github/copilot-instructions.md for OpenVINO
- define reviewer priorities: correctness, security, performance,
API/binding consistency, and test impact
- codify component-aware checks aligned with CODEOWNERS/labeler/CI
workflows
- define severity levels and actionable review comment format

## Motivation
Improve automated PR review quality and consistency for OpenVINO with
repository-specific guidance.
…olkit#34208)

Bumps
[actions/dependency-review-action](https://github.com/actions/dependency-review-action)
from 4.8.2 to 4.8.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/dependency-review-action/releases">actions/dependency-review-action's
releases</a>.</em></p>
<blockquote>
<h2>4.8.3</h2>
<h2>Dependency Review Action v4.8.3</h2>
<p>This is a bugfix release that updates a number of upstream
dependencies and includes a fix for the earlier feature that detected
oversized summaries and upload them as artifacts, which could
occasionally crash the action.</p>
<p>We have also updated the release process to use a long-lived
<code>v4</code> <strong>branch</strong> for the action, instead of a
force-pushed tag, which aligns better with git branching strategies; the
change should be transparent to end users.</p>
<h2>What's Changed</h2>
<ul>
<li>GitHub Actions can't push to our protected main by <a
href="https://github.com/dangoor"><code>@​dangoor</code></a> in <a
href="https://redirect.github.com/actions/dependency-review-action/pull/1017">actions/dependency-review-action#1017</a></li>
<li>Bump actions/stale from 9.1.0 to 10.1.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/dependency-review-action/pull/995">actions/dependency-review-action#995</a></li>
<li>Bump github/codeql-action from 3 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/dependency-review-action/pull/1003">actions/dependency-review-action#1003</a></li>
<li>Bump actions/setup-node from 4 to 6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/dependency-review-action/pull/1005">actions/dependency-review-action#1005</a></li>
<li>Upgrade glob to address a vulnerability by <a
href="https://github.com/brrygrdn"><code>@​brrygrdn</code></a> in <a
href="https://redirect.github.com/actions/dependency-review-action/pull/1024">actions/dependency-review-action#1024</a></li>
<li>Bump js-yaml by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/dependency-review-action/pull/1020">actions/dependency-review-action#1020</a></li>
<li>Addressing vulnerabilities by <a
href="https://github.com/Ahmed3lmallah"><code>@​Ahmed3lmallah</code></a>
in <a
href="https://redirect.github.com/actions/dependency-review-action/pull/1036">actions/dependency-review-action#1036</a></li>
<li>Bump fast-xml-parser from 5.3.3 to 5.3.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/dependency-review-action/pull/1050">actions/dependency-review-action#1050</a></li>
<li>Bump fast-xml-parser from 5.3.5 to 5.3.6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/dependency-review-action/pull/1053">actions/dependency-review-action#1053</a></li>
<li>Properly truncate long summaries and catch errors by <a
href="https://github.com/juxtin"><code>@​juxtin</code></a> in <a
href="https://redirect.github.com/actions/dependency-review-action/pull/1052">actions/dependency-review-action#1052</a></li>
<li>Bump spdx-expression-parse from 3.0.1 to 4.0.0 in the spdx-licenses
group across 1 directory by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/dependency-review-action/pull/931">actions/dependency-review-action#931</a></li>
<li>Changes for Release 4.8.3 by <a
href="https://github.com/ahpook"><code>@​ahpook</code></a> in <a
href="https://redirect.github.com/actions/dependency-review-action/pull/1054">actions/dependency-review-action#1054</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/dependency-review-action/compare/v4.8.2..v4.8.3">https://github.com/actions/dependency-review-action/compare/v4.8.2..v4.8.3</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/dependency-review-action/commit/05fe4576374b728f0c523d6a13d64c25081e0803"><code>05fe457</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/dependency-review-action/issues/1054">#1054</a>
from actions/ahpook/release-4.8.3</li>
<li><a
href="https://github.com/actions/dependency-review-action/commit/3a8496cb71ebae2e228d1c4a47974cdc724cf07d"><code>3a8496c</code></a>
Update generated package files for v4.8.3</li>
<li><a
href="https://github.com/actions/dependency-review-action/commit/0f22a0159293e2496eef4ce36c3b7b3b31081f7d"><code>0f22a01</code></a>
Update CONTRIBUTING for new release process</li>
<li><a
href="https://github.com/actions/dependency-review-action/commit/58be34364db3f04dc3de8db0417b5d18451a4fdf"><code>58be343</code></a>
Updating package versions for 4.8.3</li>
<li><a
href="https://github.com/actions/dependency-review-action/commit/9284e0c621cb66311d82087d9ea1f539e40da6eb"><code>9284e0c</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/dependency-review-action/issues/931">#931</a>
from actions/dependabot/npm_and_yarn/spdx-licenses-20...</li>
<li><a
href="https://github.com/actions/dependency-review-action/commit/8b766562f01731bcb0f65222324f2152d142a19a"><code>8b76656</code></a>
Bump spdx-expression-parse in the spdx-licenses group across 1
directory</li>
<li><a
href="https://github.com/actions/dependency-review-action/commit/43f5f029f51af9c859564cae942f58ea63a22100"><code>43f5f02</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/dependency-review-action/issues/1052">#1052</a>
from actions/juxtin/fix-long-summaries</li>
<li><a
href="https://github.com/actions/dependency-review-action/commit/f0033fc4d6972851b5170177d58a8da79811a797"><code>f0033fc</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/dependency-review-action/issues/1053">#1053</a>
from actions/dependabot/npm_and_yarn/fast-xml-parser...</li>
<li><a
href="https://github.com/actions/dependency-review-action/commit/b379e2e05ffa2e429ca97047d4c2738a0039425e"><code>b379e2e</code></a>
Bump fast-xml-parser from 5.3.5 to 5.3.6</li>
<li><a
href="https://github.com/actions/dependency-review-action/commit/2e1cf54a500fb2037239e92489ed0bad323c8c68"><code>2e1cf54</code></a>
Properly truncate long summaries and catch errors</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/dependency-review-action/compare/3c4e3dcb1aa7874d2c16be7d79418e9b7efd6261...05fe4576374b728f0c523d6a13d64c25081e0803">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/dependency-review-action&package-manager=github_actions&previous-version=4.8.2&new-version=4.8.3)](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 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>
…nds (openvinotoolkit#34230)

### Details:
Added retries for `git checkout` command in my own `actions/checkout`
fork - it might help when GitHub itself is unstable, like with recent
issue
```
Checking out the ref
  /usr/bin/git checkout --progress --force -B master refs/remotes/origin/master
  warning: unrecognized pattern: '.github/actions/wait-for-check-completion'
  warning: disabling cone pattern matching
  Error: fatal: could not read Username for 'https://github.com': terminal prompts disabled
  Error: fatal: the remote end hung up unexpectedly
  Error: fatal: could not fetch 93428f3 from promisor remote
  Error: The process '/usr/bin/git' failed with exit code 128
```
for example.

### Ticket
- *CVS-181095*
…otoolkit#34185)

### Details:
This is a follow-up for
openvinotoolkit#33739 .
Unfortunately, `pip` logs don't provide enough information to debug it
further. In this PR I've made an attempt to create a wrapper script that
patches [`_ensure_api_header()`
method](https://github.com/pypa/pip/blob/545eda389c41478e2f99d23212254d757d8c2cef/src/pip/_internal/index/collector.py#L64)
to print diagnostic data when there's no `Content-Type` header in
response.

### Tickets:
 - *CVS-158400*
…openvinotoolkit#33929)

### Details:
- *Importing standard allocation support was added into Level Zero and
removed from internal NPU level zero extensions. Plugin must be updated
to use new structures from LevelZero instead of internal extension
implementation.*

### Tickets:
 - *CVS-181814*

---------

Signed-off-by: Bogdan Pereanu <bogdan.pereanu@intel.com>
### Details:
 - *Use FilteredConfig to not cast from Config since it is not needed*
- *Use a default function to be able to check all the needed properties,
not only turbo*
 - *Each user might create their own function for checking properties*
- *Rename namespace driver_compiler_utils to compiler_utils since it is
used for both plugin and driver compiler*
 - *Rename file from vcl_serializer to model_serializer*
 - *Optimize get_supported_properties to query the driver only once*

### Tickets:
 - *N/A*

---------

Signed-off-by: Bogdan Pereanu <bogdan.pereanu@intel.com>
…penvinotoolkit#34222)

### Tickets:
 - N/A

### AI Assistance:
 - AI assistance used: no
### Details:
 - Remove deprecation warnings suppression from libs compilation

### Tickets:
 - CVS-180707
- Fix `NameError` in `backend.py` by importing `clear_caches` from `execute.py`.
- Update copyright headers in 4 files (`patch_model.py`, `test_backend.py`, `main.cpp`, `test_torch_frontend.py`) to fix CI failures.

Co-authored-by: andersendsa <199610634+andersendsa@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants