Skip to content

Fix missing default partition_id in openvino_execute #31021

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mohiuddin-khan-shiam
Copy link

What & why

execute(executor="strictly_openvino") crashed with
TypeError: openvino_execute() missing 1 required positional argument: 'partition_id'.

The internal helper openvino_execute() expected partition_id but its sole external caller (strictly-openvino path) didn’t supply one. This made the “strictly_openvino” mode unusable.

How

Added a default value (partition_id: int = 0) to the function signature:

def openvino_execute(
    gm: GraphModule,
    *args,
    executor_parameters=None,
    partition_id: int = 0,   # new default
    options=None,
):

No logic changes; existing callers still work, and the user-facing strictly-openvino execution path now runs without error.

### What & why
[execute(executor="strictly_openvino")](cci:1://file:///d:/Github/openvino/src/bindings/python/src/openvino/frontend/pytorch/torchdynamo/execute.py:46:0-59:25) crashed with
`TypeError: openvino_execute() missing 1 required positional argument: 'partition_id'`.

The internal helper [openvino_execute()](cci:1://file:///d:/Github/openvino/src/bindings/python/src/openvino/frontend/pytorch/torchdynamo/execute.py:73:0-116:19) expected `partition_id` but its sole external caller (strictly-openvino path) didn’t supply one. This made the “strictly_openvino” mode unusable.

### How
Added a default value (`partition_id: int = 0`) to the function signature:

```python
def openvino_execute(
    gm: GraphModule,
    *args,
    executor_parameters=None,
    partition_id: int = 0,   # new default
    options=None,
):
```
No logic changes; existing callers still work, and the user-facing strictly-openvino execution path now runs without error.
@mohiuddin-khan-shiam mohiuddin-khan-shiam requested a review from a team as a code owner June 17, 2025 19:31
@github-actions github-actions bot added category: Python API OpenVINO Python bindings category: PyTorch FE OpenVINO PyTorch Frontend labels Jun 17, 2025
@sys-openvino-ci sys-openvino-ci added the ExternalPR External contributor label Jun 17, 2025
@mlukasze mlukasze requested review from mvafin and removed request for a team June 18, 2025 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Python API OpenVINO Python bindings category: PyTorch FE OpenVINO PyTorch Frontend ExternalPR External contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants