Skip to content

Commit b682f42

Browse files
Merge pull request #600 from spolti/250509_sync_master
250509 sync master
2 parents 64db702 + 3deee8d commit b682f42

File tree

197 files changed

+122263
-32985
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+122263
-32985
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Thanks for sending a pull request! Here are some tips for you:
22
1. If this is your first time, read our contributor guidelines https://www.kubeflow.org/docs/about/contributing/ and developer guide https://github.com/kserve/kserve/blob/master/docs/DEVELOPER_GUIDE.md
3-
2. Before raising a PR, please run `make go-lint` and `make py-fmt` to check the code style.
3+
2. Before raising a PR, please run `make precommit` to check the code style.
44
3. If you want *faster* PR reviews, read how: https://git.k8s.io/community/contributors/guide/pull-requests.md#best-practices-for-faster-reviews
55
4. Follow the instructions for writing a release note: https://git.k8s.io/community/contributors/guide/release-notes.md
66
5. If the PR is unfinished, see how to mark it: https://git.k8s.io/community/contributors/guide/pull-requests.md#marking-unfinished-pull-requests

.github/workflows/automated-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
# Bump Versions
4444
make bump-version
4545
./hack/generate-install.sh $RELEASE_TAG
46-
./hack/python-release.sh
46+
make poetry-lock
4747
4848
# Update Release Branch and Push Tag
4949
git diff

.github/workflows/e2e-test.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -120,26 +120,8 @@ jobs:
120120
compression-level: 0
121121
if-no-files-found: error
122122

123-
poetry-check:
124-
runs-on: ubuntu-latest
125-
steps:
126-
- name: Checkout source
127-
uses: actions/checkout@v4
128-
129-
- name: Setup Python
130-
uses: actions/setup-python@v5
131-
with:
132-
python-version: "3.9"
133-
134-
- name: Install Poetry and version plugin
135-
run: ./test/scripts/gh-actions/setup-poetry.sh
136-
137-
- name: Check poetry lock file consistency
138-
run: ./test/scripts/gh-actions/check-poetry-lockfile.sh
139-
140123
predictor-runtime-build:
141124
runs-on: ubuntu-latest
142-
needs: [poetry-check]
143125
steps:
144126
- name: Checkout source
145127
uses: actions/checkout@v4
@@ -232,7 +214,6 @@ jobs:
232214

233215
explainer-runtime-build:
234216
runs-on: ubuntu-latest
235-
needs: [poetry-check]
236217
steps:
237218
- name: Checkout source
238219
uses: actions/checkout@v4
@@ -258,7 +239,6 @@ jobs:
258239

259240
graph-tests-images-build:
260241
runs-on: ubuntu-latest
261-
needs: [poetry-check]
262242
steps:
263243
- name: Checkout source
264244
uses: actions/checkout@v4

.github/workflows/golangci-lint.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.github/workflows/huggingface-cpu-docker-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
with:
4141
platforms: linux/amd64
4242
context: python
43-
file: python/huggingface_server_cpu_openvino.Dockerfile
43+
file: python/huggingface_server_cpu.Dockerfile
4444
push: false
4545
# https://github.com/docker/buildx/issues/1533
4646
provenance: false
@@ -94,7 +94,7 @@ jobs:
9494
with:
9595
platforms: linux/amd64
9696
context: python
97-
file: python/huggingface_server_cpu_openvino.Dockerfile
97+
file: python/huggingface_server_cpu.Dockerfile
9898
push: true
9999
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}
100100
# https://github.com/docker/buildx/issues/1533
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Huggingface CPU Openvino Docker Publisher
2+
3+
on:
4+
push:
5+
# Publish `master` as Docker `latest` image.
6+
branches:
7+
- master
8+
9+
# Publish `v1.2.3` tags as releases.
10+
tags:
11+
- v*
12+
# Run tests for any PRs.
13+
pull_request:
14+
15+
env:
16+
IMAGE_NAME: huggingfaceserver
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
# Run tests.
24+
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
25+
test:
26+
runs-on: ubuntu-latest
27+
28+
steps:
29+
- name: Checkout source
30+
uses: actions/checkout@v4
31+
32+
- name: Free-up disk space
33+
uses: ./.github/actions/free-up-disk-space
34+
35+
- name: Setup Docker Buildx
36+
uses: docker/setup-buildx-action@v3
37+
38+
- name: Run tests
39+
uses: docker/build-push-action@v5
40+
with:
41+
platforms: linux/amd64
42+
context: python
43+
file: python/huggingface_server_cpu_openvino.Dockerfile
44+
push: false
45+
# https://github.com/docker/buildx/issues/1533
46+
provenance: false
47+
48+
# Push image to GitHub Packages.
49+
# See also https://docs.docker.com/docker-hub/builds/
50+
push:
51+
# Ensure test job passes before pushing image.
52+
needs: test
53+
54+
runs-on: ubuntu-latest
55+
if: github.event_name == 'push'
56+
57+
steps:
58+
- name: Checkout source
59+
uses: actions/checkout@v4
60+
61+
- name: Free-up disk space
62+
uses: ./.github/actions/free-up-disk-space
63+
64+
- name: Setup Docker Buildx
65+
uses: docker/setup-buildx-action@v3
66+
67+
- name: Login to DockerHub
68+
uses: docker/login-action@v3
69+
with:
70+
username: ${{ secrets.DOCKER_USER }}
71+
password: ${{ secrets.DOCKER_PASSWORD }}
72+
73+
- name: Export version variable
74+
run: |
75+
IMAGE_ID=kserve/$IMAGE_NAME
76+
77+
# Change all uppercase to lowercase
78+
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
79+
80+
# Strip git ref prefix from version
81+
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
82+
83+
# Strip "v" prefix from tag name
84+
# [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
85+
86+
# Use Docker `latest` tag convention
87+
[ "$VERSION" == "master" ] && VERSION=latest
88+
89+
# Add "-openvnino" suffix to the version
90+
VERSION="${VERSION}-openvino"
91+
92+
echo VERSION=$VERSION >> $GITHUB_ENV
93+
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_ENV
94+
95+
- name: Build and push
96+
uses: docker/build-push-action@v5
97+
with:
98+
platforms: linux/amd64
99+
context: python
100+
file: python/huggingface_server_cpu_openvino.Dockerfile
101+
push: true
102+
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}
103+
# https://github.com/docker/buildx/issues/1533
104+
provenance: false

.github/workflows/precommit-check.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "Precommit Check"
2+
3+
on:
4+
pull_request:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
precommit-check:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout source code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Go
18+
uses: actions/setup-go@v5
19+
with:
20+
go-version-file: go.mod
21+
22+
- name: Setup Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.12"
26+
27+
- name: Install dependencies
28+
run: |
29+
go mod download
30+
cd qpext && go mod download
31+
32+
- name: Check
33+
shell: bash
34+
run: |
35+
make check

.github/workflows/python-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/checkout@v4
2020

2121
- name: Set up Python
22-
uses: actions/setup-python@v2
22+
uses: actions/setup-python@v5
2323
with:
2424
python-version: "3.11"
2525

.github/workflows/python-test.yml

Lines changed: 50 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,6 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
jobs:
15-
lint:
16-
runs-on: ubuntu-latest
17-
strategy:
18-
matrix:
19-
python-version: ["3.11"]
20-
name: Lint
21-
steps:
22-
- name: Check out source repository
23-
uses: actions/checkout@v4
24-
- name: Set up Python environment ${{ matrix.python-version }}
25-
uses: actions/setup-python@v5
26-
with:
27-
python-version: ${{ matrix.python-version }}
28-
- name: Lint with flake8
29-
uses: py-actions/flake8@v2
30-
with:
31-
args: "--config .flake8"
32-
path: "."
33-
- name: Check formatting with black
34-
uses: psf/black@stable
35-
with:
36-
options: "--check --diff --config python/pyproject.toml"
37-
src: "."
38-
version: "~= 24.3"
3915
build:
4016
runs-on: ubuntu-latest
4117
strategy:
@@ -252,7 +228,7 @@ jobs:
252228
source paddleserver/.venv/bin/activate
253229
pytest --cov=paddleserver ./paddleserver
254230
255-
# ----------------------------------------Huggingface Server Unit Tests------------------------------------------------
231+
# ----------------------------------------Huggingface OpenVino Server Unit Tests------------------------------------------------
256232
# load cached huggingface venv if cache exists
257233
- name: Load cached huggingface venv
258234
id: huggingface-dependencies
@@ -285,7 +261,55 @@ jobs:
285261
cd python/huggingfaceserver
286262
bash tests/setup_vllm.sh
287263
poetry run -- pytest --cov=huggingfaceserver -vv
264+
env:
265+
VLLM_TARGET_DEVICE: openvino
288266

289267
- name: Free space after tests
290268
run: |
291-
df -hT
269+
df -hT
270+
# ----------------------------------------Huggingface CPU Server Unit Tests------------------------------------------------
271+
# load cached huggingface cpu venv if cache exists
272+
- name: Load cached huggingface cpu venv
273+
id: huggingface-cpu-dependencies
274+
uses: actions/cache@v4
275+
with:
276+
path: /mnt/python/huggingfaceserver-cpu-venv
277+
key: huggingface-cpu-venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/kserve/poetry.lock', '**/huggingfaceserver/poetry.lock') }}
278+
# install huggingface cpu server dependencies if cache does not exist
279+
- name: Configure poetry for huggingface cpu server
280+
run: |
281+
poetry config virtualenvs.path /mnt/python/huggingfaceserver-cpu-venv
282+
poetry config virtualenvs.in-project false
283+
# make poetry visible for vllm cpu installation
284+
- name: Install Poetry Plugins cpu
285+
run: |
286+
poetry self add poetry-version-plugin
287+
- name: Install huggingface cpu dependencies
288+
run: |
289+
sudo mkdir -p /mnt/python/huggingfaceserver-cpu-venv
290+
# change permission so that poetry can install without sudo
291+
sudo chown -R $USER /mnt/python/huggingfaceserver-cpu-venv
292+
cd python/huggingfaceserver
293+
make install_cpu_dependencies
294+
295+
- name: Install huggingface cpu server
296+
run: |
297+
cd python/huggingfaceserver
298+
make dev_install
299+
- name: Test huggingfaceserver cpu
300+
run: |
301+
sudo apt-get update
302+
sudo apt-get install -y libnuma-dev
303+
cd python/huggingfaceserver
304+
bash tests/setup_vllm.sh
305+
poetry run -- pytest --cov=huggingfaceserver -vv -k 'not test_vllm'
306+
# TODO: The following tests need to be reworked since IPEX support is relatively new for both vLLM and KServe
307+
# poetry run -- pytest --cov=huggingfaceserver -vv tests/test_vllm_chat_with_reasoning.py
308+
# poetry run -- pytest --cov=huggingfaceserver -vv tests/test_vllm_chat_with_tools.py
309+
# poetry run -- pytest --cov=huggingfaceserver -vv tests/test_vllm_generative.py
310+
env:
311+
VLLM_ENGINE_ITERATION_TIMEOUT_S: 3600
312+
313+
- name: Free space after cpu tests
314+
run: |
315+
df -hT

0 commit comments

Comments
 (0)