Skip to content

Conversation

@redradist
Copy link
Contributor

@redradist redradist commented Sep 19, 2025

Description

Update setup.py to be usable for PyPi.
Create initial package for openvino-nvidia plugin in PyPi, see https://pypi.org/project/openvino-nvidia

@redradist redradist requested a review from a team as a code owner September 19, 2025 11:04
@github-actions github-actions bot added category: NVIDIA plugin OpenVINO NVIDIA plugin dependencies Pull requests that update a dependency file labels Sep 19, 2025
@redradist redradist force-pushed the refactoring/prepare-setup-py-for-pypi branch from b7942b2 to c95a838 Compare September 19, 2025 11:06
@redradist
Copy link
Contributor Author

redradist commented Sep 19, 2025

@ilya-lavrenov @p-durandin Now cherry on cake - python package

@p-durandin
Copy link
Contributor

build_jenkins

Copy link
Contributor

@p-wysocki p-wysocki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the README.md file makes sense, there are a lot of typos and its style could be aligned to the style of the rest of the file. Could you please correct it or at least run it through an LLM to improve formatting and typos?

### Building the package
To build it, use simply the following command:
```bash
python3 ./wheel/setup.py bdist_wheel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calling bdist_wheel manually has been deprecated for a while, going as far as an official Python blog saying that they mustn't be run anymore. The recommended replacement is python -m build which requires build dependency. Could you please check if running it is compatible and works well? We shouldn't introduce functionality based on outdated, possibly broken command.

Same goes for setup.py install below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The functionality could be done iteratively.
In my current python environment python -m build failed due to missed dependencies (probably because I have custom build for python)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of introducing a functionality which we know may be broken/is not only not recommended, but soft-forbidden by Python docs. These things tend to stick around as a "TODO" and later cause issues at the most inconvenient time.

I haven't maintained NVIDIA plugin before so IMO my opinion can be overridden if you wish to do so (cc @p-durandin). If we decide to merge it as-is at the very least let's create a ticket to update the build method.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@p-wysocki thanks, lets merge with creating github issue

@redradist redradist force-pushed the refactoring/prepare-setup-py-for-pypi branch from c95a838 to f70c98c Compare September 19, 2025 13:31
…as provided and openvino downloaded from the internet
… plugin; update README.,d by adding the section related to how build python package for NVIDIA plugin
@redradist redradist force-pushed the refactoring/prepare-setup-py-for-pypi branch from f70c98c to 42c4f44 Compare September 19, 2025 13:31
@redradist
Copy link
Contributor Author

While the README.md file makes sense, there are a lot of typos and its style could be aligned to the style of the rest of the file. Could you please correct it or at least run it through an LLM to improve formatting and typos?

@p-wysocki Looks like fixed all typos

@redradist redradist requested a review from p-wysocki September 19, 2025 13:36
Copy link
Contributor

@p-wysocki p-wysocki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM if it wasn't for the outdated wheel build/install method I mentioned in one of my comments. I'd prefer it to be done properly to avoid problems in the future.

Should we update the CI somehow to test this? I'm not familiar with openvino_contrib pipelines.

@p-durandin, is there a designated maintainer for this repo?


__version__ = "2024.1.0"

__version__ = "2025.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should be setting this dynamically based on openvino version, or at least set it to an upcoming 2025.4.0 if we plan to release it? I'm not sure how it should be done, @artanokhov do you know?

One way or another, if we'd like to set this dynamically, this is a topic for a different PR.

Copy link
Contributor Author

@redradist redradist Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should be setting this dynamically based on openvino version, or at least set it to an upcoming 2025.4.0 if we plan to release it?

@p-wysocki Have not idea, I am not the official maintainer of NVIDIA plugin, I am the former developer of it and I know pretty good its architecture.
In future I expect Intel will publish packages for openvino-nvidia, but for this proper CI should be configured

### Building the package
To build it, use simply the following command:
```bash
python3 ./wheel/setup.py bdist_wheel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of introducing a functionality which we know may be broken/is not only not recommended, but soft-forbidden by Python docs. These things tend to stick around as a "TODO" and later cause issues at the most inconvenient time.

I haven't maintained NVIDIA plugin before so IMO my opinion can be overridden if you wish to do so (cc @p-durandin). If we decide to merge it as-is at the very least let's create a ticket to update the build method.

@p-wysocki p-wysocki requested a review from almilosz September 19, 2025 13:57
@redradist
Copy link
Contributor Author

@p-wysocki I've played with it little bit, it requires some changes here and there to implement it using python3 -m pip build
Maybe lets implement it as refactoring ?
Currently this PR mostly to fix some issues related to setup.py, to be able finally create PyPi package

@mlukasze
Copy link

build_jenkins

@p-wysocki p-wysocki self-requested a review September 23, 2025 13:23
@p-wysocki
Copy link
Contributor

Overall LGTM if it wasn't for the bdist_wheel thing. I'm leaving the decision to the openvino_contrib maintainers.

@p-durandin p-durandin enabled auto-merge (squash) September 23, 2025 14:57
@p-durandin p-durandin merged commit 3f4eeda into openvinotoolkit:master Sep 24, 2025
13 checks passed
@p-durandin
Copy link
Contributor

To be followed in #1011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: NVIDIA plugin OpenVINO NVIDIA plugin dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants