Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# See help here: https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/enabling-and-disabling-version-updates
See help here: https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/enabling-and-disabling-version-updates

version: 2
updates:
Expand Down Expand Up @@ -26,17 +26,12 @@ updates:
versioning-strategy: increase-if-necessary

#
# Python dependencies
# Python dependencies (UV workspace)
#
- package-ecosystem: "pip"
directories:
- "/"
- "./samples/"
- "./tests/python_tests/"
- "./tools/llm_bench/"
- "./tools/who_what_benchmark/"
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "daily"
time: "09:00"
timezone: "Europe/Dublin"
versioning-strategy: increase-if-necessary
open-pull-requests-limit: 5
43 changes: 38 additions & 5 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -583,13 +583,21 @@ jobs:
path: ${{ env.INSTALL_DIR }}
merge-multiple: true

- name: Setup UV
if: ${{ matrix.test.run_condition }}
uses: astral-sh/setup-uv@v4

- name: Install GenAI Wheels
if: ${{ matrix.test.run_condition }}
uses: ./src/.github/actions/install_wheel
with:
packages: "openvino;openvino_tokenizers[transformers];openvino_genai;whowhatbench"
requirements_files: "${{ env.SRC_DIR }}/tests/python_tests/requirements.txt"
local_wheel_dir: ${{ env.INSTALL_DIR }}/wheels

- name: Sync dependency groups
if: ${{ matrix.test.run_condition }}
working-directory: ${{ github.workspace }}/src
run: uv sync --extra testing-full --no-install-project --prerelease=allow

- name: Tests
if: ${{ matrix.test.run_condition }}
Expand Down Expand Up @@ -690,13 +698,23 @@ jobs:
pigz -dc ${{ env.GENAI_SAMPLES_NAME }} | tar -xf - -C ${{ env.INSTALL_DIR }}
working-directory: ${{ env.INSTALL_DIR }}

- name: Setup UV
if: ${{ matrix.test.run_condition }}
uses: astral-sh/setup-uv@v4

- name: Install GenAI wheels
if: ${{ matrix.test.run_condition }}
uses: ./src/.github/actions/install_wheel
with:
packages: "openvino;openvino_tokenizers[transformers];openvino_genai[testing]"
requirements_files: "${{ env.SRC_DIR }}/samples/requirements.txt"
local_wheel_dir: ${{ env.INSTALL_DIR }}/wheels

- name: Sync dependency groups
if: ${{ matrix.test.run_condition }}
working-directory: ${{ github.workspace }}/src
run: |
uv sync --extra samples --no-install-project --prerelease=allow
uv sync --extra testing-full --no-install-project --prerelease=allow

- name: Setup Node
if: ${{ matrix.test.run_condition }}
Expand Down Expand Up @@ -776,12 +794,21 @@ jobs:
- name: Fix C++ samples permissions
run: chmod +x ${{ env.INSTALL_DIR }}/samples_bin/*

- name: Setup UV
uses: astral-sh/setup-uv@v4

- name: Install GenAI wheels
uses: ./src/.github/actions/install_wheel
with:
packages: "openvino;openvino_tokenizers[transformers];openvino_genai[testing]"
requirements_files: "${{ env.SRC_DIR }}/samples/requirements.txt;${{ env.SRC_DIR }}/tools/llm_bench/requirements.txt"
local_wheel_dir: ${{ env.INSTALL_DIR }}/wheels

- name: Sync dependency groups
working-directory: ${{ github.workspace }}/src
run: |
uv sync --extra samples --no-install-project --prerelease=allow
uv sync --extra testing-full --no-install-project --prerelease=allow
uv sync --package llm_bench --prerelease=allow

- name: gtests unit tests
if: ${{ fromJSON(needs.smart_ci.outputs.affected_components).continuous_batching }}
Expand Down Expand Up @@ -919,12 +946,18 @@ jobs:
-B ${{ env.BUILD_DIR }}
cmake --build ${{ env.BUILD_DIR}} --config Release --parallel $(nproc) --target py_openvino_genai --verbose

- name: Setup UV
uses: astral-sh/setup-uv@v4

- name: Install dependencies
uses: ./src/.github/actions/install_wheel
with:
packages: openvino;openvino_tokenizers[transformers]
requirements_files: "${{ env.SRC_DIR }}/tests/python_tests/requirements.txt"
packages: "openvino;openvino_tokenizers[transformers]"
local_wheel_dir: ${{ env.INSTALL_DIR }}/wheels

- name: Sync dependency groups
working-directory: ${{ github.workspace }}/src
run: uv sync --extra testing-full --no-install-project --prerelease=allow

- name: Run test_llm_pipeline.py when -DENABLE_XGRAMMAR=OFF
env:
Expand Down
32 changes: 29 additions & 3 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -510,13 +510,21 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'

- name: Setup UV
if: ${{ matrix.test.run_condition }}
uses: astral-sh/setup-uv@v4

- name: Install GenAI Wheels
if: ${{ matrix.test.run_condition }}
uses: ./src/.github/actions/install_wheel
with:
packages: "openvino;openvino_tokenizers[transformers];openvino_genai;whowhatbench"
requirements_files: "${{ env.SRC_DIR }}/tests/python_tests/requirements.txt"
local_wheel_dir: ${{ env.INSTALL_DIR }}/wheels

- name: Sync dependency groups
if: ${{ matrix.test.run_condition }}
working-directory: ${{ github.workspace }}/src
run: uv sync --extra testing-full --no-install-project --prerelease=allow

- name: Tests
if: ${{ matrix.test.run_condition }}
Expand Down Expand Up @@ -592,13 +600,23 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'

- name: Setup UV
if: ${{ matrix.test.run_condition }}
uses: astral-sh/setup-uv@v4

- name: Install GenAI wheels
if: ${{ matrix.test.run_condition }}
uses: ./src/.github/actions/install_wheel
with:
packages: "openvino;openvino_tokenizers[transformers];openvino_genai[testing]"
requirements_files: "${{ env.SRC_DIR }}/samples/requirements.txt"
local_wheel_dir: ${{ env.INSTALL_DIR }}/wheels

- name: Sync dependency groups
if: ${{ matrix.test.run_condition }}
working-directory: ${{ github.workspace }}/src
run: |
uv sync --extra samples --no-install-project --prerelease=allow
uv sync --extra testing-full --no-install-project --prerelease=allow

# transformers >= 4.52 require torch >= 2.6 and raise an error otherwise:
# ValueError: Due to a serious vulnerability issue in `torch.load`, even with `weights_only=True`, we now require users to upgrade torch to at least v2.6 in order to use the function. This version restriction does not apply when loading files with safetensors.
Expand Down Expand Up @@ -684,12 +702,20 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'

- name: Setup UV
uses: astral-sh/setup-uv@v4

- name: Install GenAI wheels
uses: ./src/.github/actions/install_wheel
with:
packages: "openvino;openvino_tokenizers[transformers];openvino_genai[testing]"
requirements_files: "${{ env.SRC_DIR }}/samples/requirements.txt"
local_wheel_dir: ${{ env.INSTALL_DIR }}/wheels

- name: Sync dependency groups
working-directory: ${{ github.workspace }}/src
run: |
uv sync --extra samples --no-install-project --prerelease=allow
uv sync --extra testing-full --no-install-project --prerelease=allow

- name: gtests unit tests
run: |
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/manylinux_2_28.yml
Original file line number Diff line number Diff line change
Expand Up @@ -521,13 +521,21 @@ jobs:
path: ${{ env.INSTALL_DIR }}
merge-multiple: true

- name: Setup UV
if: ${{ matrix.test.run_condition }}
uses: astral-sh/setup-uv@v4

- name: Install GenAI Wheels
if: ${{ matrix.test.run_condition }}
uses: ./src/.github/actions/install_wheel
with:
packages: "openvino;openvino_tokenizers[transformers];openvino_genai;whowhatbench"
requirements_files: "${{ env.SRC_DIR }}/tests/python_tests/requirements.txt"
local_wheel_dir: ${{ env.INSTALL_DIR }}/wheels

- name: Sync dependency groups
if: ${{ matrix.test.run_condition }}
working-directory: ${{ github.workspace }}/src
run: uv sync --extra testing-full --no-install-project --prerelease=allow

- name: Tests
if: ${{ matrix.test.run_condition }}
Expand Down
35 changes: 32 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -672,13 +672,22 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'

- name: Setup UV
if: ${{ matrix.test.run_condition }}
uses: astral-sh/setup-uv@v4

- name: Install GenAI Wheels
if: ${{ matrix.test.run_condition }}
uses: ./src/.github/actions/install_wheel
with:
packages: "openvino;openvino_tokenizers[transformers];openvino_genai;whowhatbench"
requirements_files: "${{ env.SRC_DIR }}/tests/python_tests/requirements.txt"
local_wheel_dir: ${{ env.INSTALL_DIR }}/wheels

- name: Sync dependency groups
if: ${{ matrix.test.run_condition }}
working-directory: ${{ github.workspace }}/src
shell: bash
run: uv sync --extra testing-full --no-install-project --prerelease=allow

- name: Tests
if: ${{ matrix.test.run_condition }}
Expand Down Expand Up @@ -771,13 +780,24 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'

- name: Setup UV
if: ${{ matrix.test.run_condition }}
uses: astral-sh/setup-uv@v4

- name: Install GenAI wheels
if: ${{ matrix.test.run_condition }}
uses: ./src/.github/actions/install_wheel
with:
packages: "openvino;openvino_tokenizers[transformers];openvino_genai[testing]"
requirements_files: "${{ env.SRC_DIR }}/samples/requirements.txt"
local_wheel_dir: ${{ env.INSTALL_DIR }}/wheels

- name: Sync dependency groups
if: ${{ matrix.test.run_condition }}
working-directory: ${{ github.workspace }}/src
shell: bash
run: |
uv sync --extra samples --no-install-project --prerelease=allow
uv sync --extra testing-full --no-install-project --prerelease=allow

- name: Setup NodeJS
if: ${{ matrix.test.run_condition }}
Expand Down Expand Up @@ -850,12 +870,21 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'

- name: Setup UV
uses: astral-sh/setup-uv@v4

- name: Install GenAI wheels
uses: ./src/.github/actions/install_wheel
with:
packages: "openvino;openvino_tokenizers[transformers];openvino_genai[testing]"
requirements_files: "${{ env.SRC_DIR }}/samples/requirements.txt"
local_wheel_dir: ${{ env.INSTALL_DIR }}/wheels

- name: Sync dependency groups
working-directory: ${{ github.workspace }}/src
shell: bash
run: |
uv sync --extra samples --no-install-project --prerelease=allow
uv sync --extra testing-full --no-install-project --prerelease=allow

- name: gtests unit tests
run: |
Expand Down
85 changes: 83 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "2026.0.0.0"
description = "Library of the most popular Generative AI model pipelines, optimized execution methods, and samples"
requires-python = ">=3.10"
readme = { file = "src/README.md", content-type="text/markdown" }
license = { "file" = "LICENSE" }
license = { file = "LICENSE" }
authors = [
{ name = "OpenVINO Developers", email = "openvino@intel.com" },
]
Expand All @@ -29,14 +29,95 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython"
]
dependencies = [
"openvino_tokenizers~=2026.0.0.0.dev"
"openvino~=2026.0.0.0.dev",
"openvino-tokenizers~=2026.0.0.0.dev",
]

[project.optional-dependencies]
testing = ["pytest>=6.0"]
samples = [
"librosa==0.11.0",
"pillow==12.0.0",
"json5==0.12.1",
"pydantic==2.12.3",
]
samples-export = [
"optimum-intel[nncf]==1.26.0",
"numpy==1.26.4; platform_system == 'Darwin' and platform_machine == 'x86_64' and python_version < '3.13'",
"numpy>=2.1.0; python_version >= '3.13'",
"safetensors==0.6.2; platform_system == 'Darwin' and platform_machine == 'x86_64'",
"einops==0.8.1",
"transformers-stream-generator==0.0.5",
"diffusers==0.35.2",
"timm==1.0.21",
"torchvision==0.17.2; platform_system == 'Darwin' and platform_machine == 'x86_64'",
"torchvision==0.23.0; platform_system != 'Darwin' or platform_machine != 'x86_64'",
"transformers==4.55.4",
"hf-transfer==0.1.9",
"backoff==2.2.1",
"peft==0.17.1",
]
testing-full = [
"diffusers==0.35.2",
"optimum-intel==1.26.0",
"numpy==1.26.4; platform_system == 'Darwin' and platform_machine == 'x86_64' and python_version < '3.13'",
"numpy>=2.1.0; python_version >= '3.13'",
"safetensors==0.6.2; platform_system == 'Darwin' and platform_machine == 'x86_64'",
"pytest==8.4.2",
"transformers==4.55.4",
"hf-transfer==0.1.9",
"gguf==0.17.1",
"langchain-community==0.4",
"langchain-core==1.0.1",
"einops==0.8.1",
"torchvision==0.17.2; platform_system == 'Darwin' and platform_machine == 'x86_64'",
"torchvision==0.23.0; platform_system != 'Darwin' or platform_machine != 'x86_64'",
"timm==1.0.21",
"librosa==0.11.0",
"soundfile==0.13.1",
"datasets==4.1.1; sys_platform == 'linux'",
"datasets==3.6.0; sys_platform != 'linux'",
"torchcodec==0.7.0; sys_platform == 'linux'",
"rouge==1.0.1",
"peft==0.17.1",
]
dev = [
"pytest>=6.0",
"pytest-xdist",
"ruff",
]

[tool.uv.workspace]
members = [
"tools/cacheviz",
]

[tool.uv]
index-strategy = "unsafe-best-match"

[[tool.uv.index]]
name = "openvino-nightly"
url = "https://storage.openvinotoolkit.org/simple/wheels/nightly"
explicit = true

[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true

[tool.uv.sources]
openvino-genai = { workspace = true }
openvino = { index = "openvino-nightly" }
openvino-tokenizers = { index = "openvino-nightly" }
torch = { index = "pytorch-cpu" }
torchvision = { index = "pytorch-cpu" }

[tool.py-build-cmake.module]
directory = "src/python"

[tool.py-build-cmake.editable]
mode = "wrapper"

[tool.py-build-cmake.sdist]
include = ["CMakeLists.txt", "LICENSE", "third-party-programs.txt", "SECURITY.md", "cmake", "src", "thirdparty"]

Expand Down
3 changes: 0 additions & 3 deletions requirements-build.txt

This file was deleted.

Loading
Loading