-
Notifications
You must be signed in to change notification settings - Fork 300
UV Migration #2953
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
base: master
Are you sure you want to change the base?
UV Migration #2953
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates the project from pip-based dependency management to UV for improved performance and reliability. The migration consolidates various requirement files into structured pyproject.toml configurations with UV workspace support.
- Removed all
requirements.txtandsetup.pyfiles across tools and tests - Added UV workspace configuration with three workspace members: llm_bench, who_what_benchmark, and cacheviz
- Updated documentation to recommend UV installation and usage over pip commands
Reviewed Changes
Copilot reviewed 23 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/who_what_benchmark/ | Converted from setup.py/requirements.txt to pyproject.toml with optional dependencies for GPTQ |
| tools/llm_bench/ | Migrated multiple requirement files to consolidated pyproject.toml with conversion and GPTQ extras |
| tools/cacheviz/ | Simple conversion from requirements.txt to pyproject.toml |
| tests/python_tests/ | Removed requirements.txt, dependencies moved to main pyproject.toml |
| samples/ | Removed requirement files, dependencies consolidated into main pyproject.toml dependency groups |
| pyproject.toml | Added UV workspace config, dependency groups, and custom index sources |
| README files | Updated installation instructions to recommend UV over pip |
| .github/ | Added UV setup/sync actions and updated Dependabot for UV support |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
samples/requirements.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These 3 files are included into openvino genai archive describing what needs to be installed in this case. I think they should stay
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So for now don't remove any requirements.txt from the project?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's OK to remove tests/python_tests/requirements.txt and requirements-build.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validation team isn't ready for that change probably. @sbalandi can this change be kept?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's discuss it with validation team, I will write letter
| packages=find_packages(), | ||
| install_requires=required, | ||
| entry_points={"console_scripts": ["wwb=whowhatbench.wwb:main"]}, | ||
| package_data={"whowhatbench": ["prompts/*.yaml"]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there also prompts in the package, when wwb is installed with UV?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, missed this one. Fixed 👍
ed9a90d to
e2c20f0
Compare
.github/actions/setup-uv/action.yml
Outdated
| @@ -0,0 +1,30 @@ | |||
| name: 'Setup UV' | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uv provided install/setup actions - https://docs.astral.sh/uv/guides/integration/github/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
.github/actions/uv-sync/action.yml
Outdated
| @@ -0,0 +1,61 @@ | |||
| name: 'UV Sync Dependencies' | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that sync should be done by dependabot
.github/actions/uv-sync/action.yml
Outdated
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Install local wheels |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need one more action, please use .github/actions/install_wheel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
| testing = ["pytest>=6.0"] | ||
|
|
||
| [dependency-groups] | ||
| samples = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks, like those dependencies should be in the [project.optional-dependencies] section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved them 👍
|
Did you check that dependabot updates all requirements from the uv.lock file? Previously it didn't and we decided to use poetry instead. |
060715e to
4cdc7e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we still use it in Jenkins
4cdc7e8 to
5965241
Compare
5965241 to
6742fbc
Compare
Migrate dependency management to UV
This PR migrates the project from pip/requirements.txt to UV for faster and more reliable dependency management.
Changes:
requirements.txtfiles topyproject.tomlwith UV workspace configurationpyproject.tomlfiles for tools:cacheviz,llm_bench, andwho_what_benchmarkrequirements.txtfiles andsetup.pyfiles